🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.bugs.sys5
Article #518

Re: Unlinking "."

#518
From: guy
Date: Thu, 02 Apr 1987 08:51
24 lines
1588 bytes
> Since directories in the Unix file system are required to have "."
> and ".." entries, it does not make sense to permit their removal.

I tend to agree, but consider this from the S5R3 "mvdir.sh" script:

	/etc/unlink $t/..

which is required if you are to move directories from one containing
directory to another.

> The best solution would seem to be to use system calls to create
> and remove directories, instead of super-user privileged processes
> that invoke link(2) and unlink(2).  This also lets you avoid race
> conditions that the latter approach is heir to.

The same is true for moving directories.  A "rename(2)" system call
permits you to move directories in unprivileged programs without
having to invoke a privileged directory-moving program.  It also
obviates the need to allow users to remove or create ".." links.

> Current BSD and System V releases have mkdir(2) and rmdir(2) calls.

Current BSD releases have "rename(2)", and since "rename" is in POSIX
future System V releases will probably have it as well.
Technical Details
Message-ID: <16047@sun.uucp>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!water!watnot!watmath!clyde!rutgers!ames!ucbcad!ucbvax!decvax!decwrl!pyramid!oliveb!sun!gorodish!guy
References: <1059@cci632.UUCP> <5715@brl-smoke.ARPA>

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: arc1-ca.pugleaf.net!utzoo!utgpu!water!watnot!watmath!clyde!rutgers!ames!ucbcad!ucbvax!decvax!decwrl!pyramid!oliveb!sun!gorodish!guy
From: guy@gorodish.UUCP
Newsgroups: comp.bugs.sys5
Subject: Re: Unlinking "."
Message-ID: <16047@sun.uucp>
Date: Thu, 2-Apr-87 03:51:53 EST
Article-I.D.: sun.16047
Posted: Thu Apr  2 03:51:53 1987
Date-Received: Sat, 4-Apr-87 15:14:05 EST
References: <1059@cci632.UUCP> <5715@brl-smoke.ARPA>
Sender: news@sun.uucp
Lines: 24
Keywords: unlink