minor rdist bug
David L. Stevens
dls at j.cc.purdue.edu
Wed Oct 22 00:26:22 AEST 1986
Index: /usr/src/ucb/rdist/server.c 4.3BSD
Description:
rdist doesn't propagate sticky bits.
Repeat-By:
touch /tmp/hose;chmod 1751 /tmp/hose;rdist -c /tmp/hose <machine>
Fix:
The fix is simply to set the mask of bits which require a chmod()
to include the sticky bit, as well as the setuid and setgid bits.
Diffs follow.
*** OLD server.c Tue Oct 21 09:15:06 1986
--- server.c Tue Oct 21 09:10:29 1986
***************
*** 1035,1041
if (userid)
setreuid(userid, 0);
if (chown(file, uid, gid) < 0 ||
! (mode & 06000) && chmod(file, mode) < 0) {
note("%s: chown or chmod failed: file %s: %s",
host, file, sys_errlist[errno]);
}
--- 1035,1041 -----
if (userid)
setreuid(userid, 0);
if (chown(file, uid, gid) < 0 ||
! (mode & 07000) && chmod(file, mode) < 0) {
note("%s: chown or chmod failed: file %s: %s",
host, file, sys_errlist[errno]);
}
--
+-DLS (dls at j.cc.purdue.edu)
More information about the Comp.bugs.4bsd.ucb-fixes
mailing list