OpenSolaris

Printable Version Enter a New Search
Bug ID 6332352
Synopsis acltotext(3SEC) can overwrite the acl pointer it returns
State 10-Fix Delivered (Fix available in build)
Category:Subcategory library:other
Keywords
Responsible Engineer Hamish Mccracken
Reported Against
Duplicate Of
Introduced In solaris_2.5
Commit to Fix snv_29
Fixed In snv_29
Release Fixed solaris_nevada(snv_29) , solaris_10u2(s10u2_06) (Bug ID:2130421)
Related Bugs 2129862 , 2131139
Submit Date 4-October-2005
Last Update Date 3-December-2005
Description
$ cat /etc/passwd | grep test
test:x:100:1::/home/test:/bin/sh
test1:x:101:1::/home/test1:/bin/sh

$ getfacl testdir/testfile1
# file: testdir/testfile1
# owner: 124892
# group: staff
user::rw-
user:test:rwx           #effective:r--
user:test1:rwx          #effective:r--
group::r--              #effective:r--
mask:r--
other:r--

# userdel test
# userdel test1

$ getfacl testdir/testfile1

# file: testdir/testfile1
# owner: 124892
# group: staff
user::rw-
user:100:rwx            #effective:r--
user:101:rwx          #effective:r--
group::r--              #effective:r--
mask:r--
other:r--

$ tar cvfp test.tar testdir/testfile1
a testdir/ 0K
a testdir/testfile1 0K
$

$ tar xvfp test.tar testdir
tar: blocksize = 6
x testdir, 0 bytes, 0 tape blocks
user 100 not found
aclfromtext failed
unrecognized attr type
x testdir/testfile1, 0 bytes, 0 tape blocks
$

-----

Without going into too much detail, when "tar cvfp..." is run, acltotext() is called.  Within that function, as the various parts of the acl associated with testdir/testfile1 are collected, at a certain point:

"user::rw-,user:100:rwx,"
becomes
"user::rw-,user:100:rwx,user:"
becomes
"user::rw-,user:100:rwx,us12345"

The latter step should have resulted in "user::rw-,user:100:rwx,user:12345".

When "tar xvfp..." is run, aclfromtext() is called.  This works fine until "us12345" is found, which induces a failure because it is not in the correct "user:<uid>:..." format.
Work Around
N/A
Comments
N/A