phil@amd70.UUCP (Phil Ngai) (05/31/84)
In running the version of RCS that came with 4.2 BSD (on a PDP-11 running V7) I find that RCS doesn't preserve ownership, at least when I use "ci -l" as root. Is this a bug or am I doing it wrong? -- Phil Ngai (408) 749-5286 {ucbvax,decwrl,ihnp4,allegra,intelca}!amd70!phil
larry@uthub.UUCP (Larry Philps) (06/04/84)
[For the line eater.] I found and fixed the same problem quite some time ago. The fix is quite simple and still uses the current uid for access checking, but writes the login id into the rcs file. A diff (-c3) follows. --------------------------------------------------------- *** /tmp/,RCSt1001786 Mon Jun 4 09:51:41 1984 --- /tmp/,RCSt2001786 Mon Jun 4 09:51:45 1984 *************** *** 2,8 * RCS checkin operation */ static char rcsid[]= ! "$Header: ci.c,v 1.1 83/11/22 14:23:31 root Exp $ Purdue CS"; /******************************************************************* * check revisions into RCS files ******************************************************************* --- 2,8 ----- * RCS checkin operation */ static char rcsid[]= ! "$Header: ci.c,v 1.2 83/11/22 16:40:49 larry Exp $ Purdue CS"; /******************************************************************* * check revisions into RCS files ******************************************************************* *************** *** 21,26 /* $Log: ci.c,v $ * Revision 1.1 83/11/22 14:23:31 root * Initial revision * --- 21,29 ----- /* $Log: ci.c,v $ + * Revision 1.2 83/11/22 16:40:49 larry + * Now uses getlogin when writing author info to rcs file. + * * Revision 1.1 83/11/22 14:23:31 root * Initial revision * *************** *** 87,92 extern char * getlogmsg(); /* obtains log message; forward */ extern struct hshentry * removelock(); /*finds a caller's lock (forward) */ extern char * xpandfile(); /* perform keyword expansion; forward*/ extern char prevauthor[]; extern char prevdate[]; --- 90,96 ----- extern char * getlogmsg(); /* obtains log message; forward */ extern struct hshentry * removelock(); /*finds a caller's lock (forward) */ extern char * xpandfile(); /* perform keyword expansion; forward*/ + extern char * getlogin(); extern char prevauthor[]; extern char prevdate[]; *************** *** 385,391 newdelta.log=nil; newdelta.lockedby=nil; /*might be changed by addlock() */ if (!keepflag) { ! newdelta.author=caller; newdelta.state =state==nil?DEFAULTSTATE:state; newdelta.date =getdate(curdate); } else { --- 389,396 ----- newdelta.log=nil; newdelta.lockedby=nil; /*might be changed by addlock() */ if (!keepflag) { ! if ((newdelta.author=getlogin()) == NULL) ! newdelta.author=caller; newdelta.state =state==nil?DEFAULTSTATE:state; newdelta.date =getdate(curdate); } else { *************** *** 389,395 newdelta.state =state==nil?DEFAULTSTATE:state; newdelta.date =getdate(curdate); } else { ! newdelta.author=(*prevauthor=='\0')?caller:prevauthor; newdelta.state =(*prevstate =='\0')?DEFAULTSTATE:prevstate; newdelta.date =prevdate; if (newdelta.next!=nil && --- 394,400 ----- newdelta.state =state==nil?DEFAULTSTATE:state; newdelta.date =getdate(curdate); } else { ! newdelta.author=(*prevauthor=='\0')?(getlogin()==NULL?caller:getlogin()):prevauthor; newdelta.state =(*prevstate =='\0')?DEFAULTSTATE:prevstate; newdelta.date =prevdate; if (newdelta.next!=nil && -- Larry Philps, CSRG Univ. of Toronto {linus,ihnp4,uw-beaver,floyd,utzoo}!utcsrgv!uthub!larry