Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10 beta 3/9/83; site uthub.UUCP Path: utzoo!utcsrgv!utai!uthub!larry From: larry@uthub.UUCP (Larry Philps) Newsgroups: net.unix Subject: Re: RCS and file ownership Message-ID: <166@uthub.UUCP> Date: Mon, 4-Jun-84 09:55:58 EDT Article-I.D.: uthub.166 Posted: Mon Jun 4 09:55:58 1984 Date-Received: Mon, 4-Jun-84 14:22:53 EDT References: <4690@amd70.UUCP> Organization: CSRG, University of Toronto Lines: 103 [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