From owner-freebsd-hackers@FreeBSD.ORG Wed Sep 20 01:02:16 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 227EE16A412 for ; Wed, 20 Sep 2006 01:02:16 +0000 (UTC) (envelope-from perryh@pluto.rain.com) Received: from agora.rdrop.com (agora.rdrop.com [199.26.172.34]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7793E43D68 for ; Wed, 20 Sep 2006 01:02:15 +0000 (GMT) (envelope-from perryh@pluto.rain.com) Received: from agora.rdrop.com (66@localhost [127.0.0.1]) by agora.rdrop.com (8.13.1/8.12.7) with ESMTP id k8K11WDS086609 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Tue, 19 Sep 2006 18:01:32 -0700 (PDT) (envelope-from perryh@pluto.rain.com) Received: (from uucp@localhost) by agora.rdrop.com (8.13.1/8.12.9/Submit) with UUCP id k8K11WXB086607 for freebsd-hackers@freebsd.org; Tue, 19 Sep 2006 18:01:32 -0700 (PDT) Received: by pluto.rain.com (4.1/SMI-4.1-pluto-M2060407) id AA21405; Tue, 19 Sep 06 18:01:15 PDT Date: Tue, 19 Sep 06 18:01:15 PDT From: perryh@pluto.rain.com (Perry Hutchison) Message-Id: <10609200101.AA21405@pluto.rain.com> To: freebsd-hackers@freebsd.org Subject: Symlinks on read-only FS X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Sep 2006 01:02:16 -0000 I've just noticed this, in ufs/ufs/ufs_vnops.c:ufs_access() /* * Disallow write attempts on read-only filesystems; * unless the file is a socket, fifo, or a block or * character device resident on the filesystem. */ if (mode & VWRITE) { switch (vp->v_type) { case VDIR: case VLNK: case VREG: if (vp->v_mount->mnt_flag & MNT_RDONLY) return (EROFS); Is the inclusion of VLNK here correct? I would think that only the target of the symlink should matter: if it happens to point onto a writable FS, the fact that the symlink itself is on a ROFS should not matter.