Paul Eggert <[EMAIL PROTECTED]> wrote: > I looked at POSIX and found some other incompatibilities with > coreutils chown and chgrp. Here's a proposed patch to fix everything > I found. When in doubt I did what BSD does. Sorry about the size, > but there do seem to be a lotta gotchas in this area. > > 2004-05-18 Paul Eggert <[EMAIL PROTECTED]> > > Several fixes to chgrp and chown for compatibility with POSIX and BSD: > > Check for incompatible options. When -R and --dereference are > both used, then either -H or -L must also be used. When -R and -h > are both used, then -P must be in effect. > > -H, -L, and -P have no effect unless -R is also specified. > If -P and -R are both specified, -h is assumed. > > Do not optimize away the chown() system call when the file's owner > and group already have the desired value. This optimization was > incorrect, as it failed to updated the last-changed time and reset > special permission bits, as POSIX requires. > > Do not report an error if the owner or group of a > recursively-encountered symbolic link cannot be updated because > the file system does not support it.
Thanks, Paul! I hate to look a gift horse in the mouth, but would you mind adding test scripts to go along with some of those changes? chown and chgrp have relatively little test coverage and are disproportionately security-sensitive. _______________________________________________ Bug-coreutils mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/bug-coreutils
