mvdir, is or is not a bug?

guy at gorodish.UUCP guy at gorodish.UUCP
Thu Jan 29 18:08:55 AEST 1987


>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; "mvdir" is
superuser only.  The only reason I can see why S5 has all that extra
"mvdir" and "mv_dir" baggage is that they *still* haven't implemented
"rename" and didn't want to have "mv" be set-UID root.  Once you've
implemented "rename", any unprivileged program can move directories
around to its heart's content and the system will make sure they
don't snarl up the directory tree.  It is *my* hope that they pick up
"rename" (which is likely, since it's in POSIX) and nuke "mv_dir" and
"mvdir" entirely.

One could make the same argument about "rmdir"; now that there's a
"rmdir" system call (even in S5, with the advent of S5R3), "rmdir"
doesn't need to be privileged.  I don't know why "rm" didn't just
"exec" "rmdir" when it was told to remove a directory, back when
there was no "rmdir" system call; since that was never done, people
may not have bothered folding "rmdir" into "rm" once you didn't have
to be privileged to remove directories.



More information about the Comp.bugs.sys5 mailing list