src/chown-core.c will replace setuid bits after the syscall has
stripped them.  It is prefaced with a comment:

              /* The change succeeded.  On some systems, the chown function
                 resets the `special' permission bits.  When run by a
                 `privileged' user, this program must ensure that at least
                 the set-uid and set-group ones are still set.  */

This can lead to some unpleasant race conditions.  Please consider
implementing an option to disable the chmod() which does this.
Ideally it would be chown's default behavior.


_______________________________________________
Bug-fileutils mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/bug-fileutils

Reply via email to