🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.bugs.sys5
Article #478

Re: mvdir, is or is not a bug?

#478
From: guy
Date: Thu, 29 Jan 1987 08:08
20 lines
1762 bytes
>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.
Technical Details
Message-ID: <12301@sun.uucp>
Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!rutgers!sri-unix!sri-spam!ames!oliveb!sun!gorodish!guy
References: <376@oblio.UUCP> <1987Jan14.123035.20364@sq.uucp> <512@csun.UUCP> <402@yabbie.rmit.oz> <1952@ncoast.UUCP>

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!rutgers!sri-unix!sri-spam!ames!oliveb!sun!gorodish!guy
From: guy@gorodish.UUCP
Newsgroups: comp.bugs.sys5
Subject: Re: mvdir, is or is not a bug?
Message-ID: <12301@sun.uucp>
Date: Thu, 29-Jan-87 03:08:55 EST
Article-I.D.: sun.12301
Posted: Thu Jan 29 03:08:55 1987
Date-Received: Sat, 31-Jan-87 02:29:39 EST
References: <376@oblio.UUCP> <1987Jan14.123035.20364@sq.uucp> <512@csun.UUCP> <402@yabbie.rmit.oz> <1952@ncoast.UUCP>
Sender: news@sun.uucp
Reply-To: guy@sun.UUCP (Guy Harris)
Organization: Sun Microsystems, Mountain View
Lines: 20