From owner-freebsd-hackers Sun Jul 22 15:10:51 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from gull.mail.pas.earthlink.net (gull.mail.pas.earthlink.net [207.217.121.85]) by hub.freebsd.org (Postfix) with ESMTP id AEEDB37B405; Sun, 22 Jul 2001 15:10:39 -0700 (PDT) (envelope-from tlambert2@mindspring.com) Received: from mindspring.com (dialup-209.247.136.127.Dial1.SanJose1.Level3.net [209.247.136.127]) by gull.mail.pas.earthlink.net (EL-8_9_3_3/8.9.3) with ESMTP id PAA04123; Sun, 22 Jul 2001 15:10:32 -0700 (PDT) Message-ID: <3B5B4F7E.8C48801E@mindspring.com> Date: Sun, 22 Jul 2001 15:11:10 -0700 From: Terry Lambert Reply-To: tlambert2@mindspring.com X-Mailer: Mozilla 4.7 [en]C-CCK-MCD {Sony} (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: Joshua Goodall Cc: Bakul Shah , Bruce Evans , freebsd-fs@FreeBSD.ORG, freebsd-hackers@FreeBSD.ORG Subject: Re: flags on symlinks References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Joshua Goodall wrote: > Possibly, but shouldn't we be wary of changing syscall semantics? > Especially in code that relates to securelevels. Pretty much no one uses these calls directly; a grep of the source tree showed only three programs; the default behaviour of the call can be changed safely, if these programs are changed to do the link following in user space, and the man page is updated. > I guess there is general agreement that it is desirable to be able to set > schg,sunlink etc on symlinks and fifos. Probably devices, too, which is a can of worms, particularly with devfs. Already, the fchown/fchmod on sockets and other things which use a non VFS struct fileops fails -- I think this includes FIFO's. > The consistency argument goes like this: > > Currently exposed as accessor methods to VOP_SETATTR are: > chmod(2), fchmod(2), lchmod(2) > chown(2), fchown(2), lchown(2) > chflags(2), fchflags(2) I know the argument for adding more and more system calls; I just don't agree with it. BSDI has already suggested limiting the total number of FreeBSD system calls to something like less than 32 more, total, without going to another block much higher up, and having to have FreeBSD allocate a large, sparse system call array, adding potentially a lot of overhead, depending on future directions with the ABI. In other words: they are getting to be scarce resources. Also note that this will introduce a binary backward compatability problem for the three programs which use the system call, in any case, but in your approach, the programs core dump on an ENOSYS, instead of failing more gracefully. This is sort of like the 5.x mount command, which will cause a 4.x system to panic. Imagine updating, and needing to boot kernel.old. > History records that the semantics for following symlinks in > chown & chmod date from 4.4BSD. Yes. It's a nasty POSIX thing, very much like the nasty POSIX thing of deleting all locks when you have multiple open file instances, and close only one of them. -- Terry To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message