mvdir, is or is not a bug?

levy at ttrdc.UUCP levy at ttrdc.UUCP
Sun Feb 1 16:41:40 AEST 1987


In article <12301 at sun.uucp>, guy at gorodish.UUCP writes:
>[Somebody writes:]
>>I was under the impression that it was done for the same reason that rmdir
>>isn't part of rm.
>
>Nope.  "rmdir" and "rm" are both unprivileged commands...

Careful:  as of this time, for System V this is only true in Release 3.
Earlier releases had no rmdir() syscall; the rmdir program was setuid
root and checked for protections and that the directory was empty except
for . and .. , then used unlink() to delete the victim directory entries
for .  and .. , then the entry in the parent directory itself.
You did out point the SysVR3 restriction later in your posting, to be
fair, but it could be misleading to a reader who only sees the first part
of your posting, which looks like a categorical assertion that System V
per se (the rubric of this newsgroup) needs no privileges for rmdir.

$ uname -a
ttrdc ttrdc 2.0v3 0915 3B-20S
            ^^^^^ (N.B.: Release 2.0 Version 3.  Not Release 3.)

$ ls -l /bin/rmdir
-rwsr-xr-x   1 root     sys         8480 Oct 16  1983 /bin/rmdir
-- 
 -------------------------------    Disclaimer:  The views contained herein are
|            dan levy            |  my own and are not at all those of my em-
|         an engihacker @        |  ployer or the administrator of any computer
| at&t computer systems division |  upon which I may hack.
|        skokie, illinois        |
 --------------------------------   Path: ..!{akgua,homxb,ihnp4,ltuxa,mvuxa,
                                        allegra,ulysses,vax135}!ttrdc!levy



More information about the Comp.bugs.sys5 mailing list