>Number:         157308
>Category:       bin
>Synopsis:       getextattr(8) incorrect listing of attibutes with glob on 
>whole directory.
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed May 25 03:50:06 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator:     Jason Hellenthal
>Release:        8.2-STABLE r222214
>Organization:
>Environment:
FreeBSD disbatch.dataix.local 8.2-STABLE FreeBSD 8.2-STABLE #0 r222214 Tue May 
24 01:32:38 EDT 2011   jh...@dataix.net:/usr/obj/usr/src/sys/DISBATCH  i386
>Description:
Invoking getextattr(8) on a glob pattern that matches the whole contents of a 
directory or possibly even a smaller part of the contents display incorrect 
attributes other than what was set.

Invoking getextattr(8) on a single file results in correctly displaying the 
value.

To rule out possible flukes of nature and scripting I copied the explained 
below 'bin' directory to a seperate filesystem and removed '[' all 'symlinks' 
and 'direct links' so all that was left were actual files that were only single 
copies of themself and the situation still repeated across multiple machines.

This was tested with '/rescue' '/bin' '/sbin' with the same results.
>How-To-Repeat:
Set the attributes using short example script here via (root):
--------------------------------------------------
#!/bin/sh
for file in /bin/*; do
    setextattr system NAME `basename $file` $file
done
--------------------------------------------------

Then ensure the attributes are set (should show 'NAME' for every file)
lsextattr system /bin/*

Then display single correct name (should show 'realpath')
getextattr system NAME /bin/realpath

Then display list of incorrect names. (Starts displaying incorrectly for larger 
name than the previously displayed name)(Notice realpath displays as 
'realpathmeme')
getextattr system NAME /bin/*

Bad output:
./[     ./test
./bash  ./bash
./cat   ./cath
./chflags       ./chflags
./chio  ./chioags
./chmod ./chmodgs
./cp    ./cpmodgs
./csh   ./tcshdgs
./date  ./datedgs
./dd    ./ddtedgs
./df    ./dftedgs
./domainname    ./domainname
./echo  ./echoinname
./ed    ./redoinname
./expr  ./exprinname
./getfacl       ./getfaclame
./hostname      ./hostnameme
./kenv  ./kenvnameme
./kill  ./killnameme
./ksh   ./ksh93ameme
./ksh93 ./ksh93ameme
./link  ./lnh93ameme
./ln    ./lnh93ameme
./ls    ./lsh93ameme
./mkdir ./mkdirameme
./mv    ./mvdirameme
./pax   ./paxirameme
./pgrep ./pkillameme
./pkill ./pkillameme
./ps    ./psillameme
./pwait ./pwaitameme
./pwd   ./pwditameme
./rcp   ./rcpitameme
./realpath      realpathmeme
./red   ./redathmeme
./rm    ./unlinkmeme
./rmail ./rmailkmeme
./rmdir ./rmdirkmeme
./setfacl       ./setfacleme
./sh    ./shtfacleme
./sleep ./sleepcleme
./stty  ./sttypcleme
./sync  ./syncpcleme
./tcsh  ./tcshpcleme
./test  ./testpcleme
./unlink        ./unlinkleme
./uuidgen       ./uuidgeneme

>Fix:
Unknown at this time 'WIP'

>Release-Note:
>Audit-Trail:
>Unformatted:
_______________________________________________
freebsd-bugs@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"

Reply via email to