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

Submitted by:  Matt McCutchen <hashproduct>
Submitted on:  Sat 28 Nov 2009 01:44:14 AM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: Fixed
Privacy: PublicAssigned 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>
Project 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>

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 30 Dec 2009 06:01:06 PM UTCmeyeringStatusNone=>Fixed
      Open/ClosedOpen=>Closed
    Sat 28 Nov 2009 03:50:20 AM UTChashproductCarbon-Copy-=>Added hashproduct

    Back to the top


    Powered by Savane 3.1-cleanup1