bugGNU Core Utilities - Bugs: bug #28113, chown silently fails to set...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #28113: chown silently fails to set uid/gid of ([ug]id_t) -1

Submitter:  Matt McCutchen <hashproduct>
Submitted:  Sat 28 Nov 2009 01:44:14 AM UTC
   
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  Fixed
Privacy:  Public Assigned to:  None
Open/Closed:  Closed

Wed 30 Dec 2009 06:01:06 PM UTC, comment #1: 

This was fixed in coreutils-8.2 via a change in gnulib's userspec.c.  Unfortunately, it wasn't mentioned in NEWS.

Jim Meyering <meyering>
Group administrator
Sat 28 Nov 2009 01:44:14 AM UTC, original submission:  

chown(2) and related system calls treat ([ug]id_t) -1 as a special value meaning "don't change this field".  If chown(1) is called with a uid or gid of ([ug]id_t) -1 (typically 4294967295), it naively passes the value on to the system call and, as a result, silently fails to do what the user asked.  It should issue an error message in this case.  If the user had actually wanted to not change a particular field, he/she would have used the appropriate chown(1) syntax: "OWNER:" or ":GROUP".

Steps to reproduce:
$ touch test
$ chown 4294967295:4294967295 test
No error, but "test" still has the same ownership as before.

Tested with Fedora coreutils-7.2-4.fc11.x86_64 and with the latest coreutils from the repository.

The problem came up at:
https://sourceforge.net/mailarchive/forum.php?thread_name=1259202707.2009.382.camel%40mattlaptop2.local&forum_name=rsnapshot-discuss

Matt McCutchen <hashproduct>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by meyering (Posted a comment)
  • -email is unavailable- added by hashproduct (Voted in favor of this item)
  • -email is unavailable- added by hashproduct (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2009-12-30 meyering StatusNone Fixed
        Open/ClosedOpen Closed
    2009-11-28 hashproduct Carbon-Copy- Added hashproduct

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code