Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!eecae!cps3xx!usenet From: usenet@cps3xx.UUCP (Usenet file owner) Newsgroups: comp.os.minix Subject: MINIX1.2 rm-command Keywords: MINIX1.2 (640K), rm-command fix Message-ID: <1838@cps3xx.UUCP> Date: 15 Feb 89 12:32:07 GMT Expires: 15 Mar 89 05:00:00 GMT References: none Reply-To: rattan@frith.egr.msu.edu () Organization: Michigan State University Lines: 31 MINIX 1.2 (640K-PC) is being used to teach the OS course. It was observed that the 'rm' command is willing to remove any file in the system by switching over to interactive mode, when one is logged in as ast (not root or su). $ rm /etc/passwd rm: remove /etc/passwd (mode = 644) ? This was fixed by patching the file commands/rm.c and installing the recompiled rm in /bin. The cdiff is given below. -- ishwar rattan (rattan@frith.egr.msu.edu) ------------------------------------------------------------- *** rm.c.old *** --- rm.c --- *** 105-112 *** else { if (access(name, 2) && !fflag) { --- 105-113 --- else { if (access(name, 2) && !fflag) { stderr3("rm: ", name, " not removed\n"); /* stderr3("rm: remove", name, " ( mode = "); * octal(s.st_mode & 0777); * std_err(") ? "); * if ( !confirm()) */ return; } ---------------------------------------------------------------