🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: net.bugs.4bsd
Article #1705

minor rdist bug

#1705
From: David L. Stevens
Date: Tue, 21 Oct 1986 14:26
34 lines
1510 bytes
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@j.cc.purdue.edu)
Technical Details
Message-ID: <2363@j.cc.purdue.edu>
Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!cbatt!ihnp4!inuxc!pur-ee!j.cc.purdue.edu!dls

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!cbatt!ihnp4!inuxc!pur-ee!j.cc.purdue.edu!dls
From: dls@j.cc.purdue.edu (David L. Stevens)
Newsgroups: net.bugs.4bsd
Subject: minor rdist bug
Message-ID: <2363@j.cc.purdue.edu>
Date: Tue, 21-Oct-86 10:26:22 EDT
Article-I.D.: j.2363
Posted: Tue Oct 21 10:26:22 1986
Date-Received: Wed, 22-Oct-86 05:37:13 EDT
Reply-To: dls@j.cc.purdue.edu.UUCP (David L. Stevens)
Organization: PUCC Unix Group
Lines: 34
Keywords: sticky bits, rdist