Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 25 Nov 1997 08:37:35 -0800 (PST)
From:      Joel.Faedi@esial.u-nancy.fr
To:        freebsd-gnats-submit@FreeBSD.ORG
Subject:   bin/5148: mode of file and access  on NFS mounted partitions
Message-ID:  <199711251637.IAA24971@hub.freebsd.org>
Resent-Message-ID: <199711251640.IAA25089@hub.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         5148
>Category:       bin
>Synopsis:       mode of file and access  on NFS mounted partitions
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    freebsd-bugs
>State:          open
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Nov 25 08:40:00 PST 1997
>Last-Modified:
>Originator:     Joel Faedi
>Organization:
ESIAL - Nancy (France)
>Release:        2.2.5 - 3.0-971123-SNAP
>Environment:
>Description:
Owner mode is nver tested on NFS mounted file system from FreeBSD
server.An exemple will explain problem:

1) on an UFS partition:
   --------------------
> touch foo
> chmod 0000 foo
> ls -al foo
----------  1 faedi  admin  21 Nov 25 11:31 foo
> more foo 
foo: Permission denied
> echo Hello >> foo
foo: Permission denied.
>

2) on the same partition NFS mounted (on another machine):
   -------------------------------------------------------
> ls -al foo
----------  1 faedi  admin  21 Nov 25 11:31 foo
> more foo
Should never be seen
> echo Hello >> foo
> more foo
Should never be seen
Hello
>


>How-To-Repeat:
See example in full description.
>Fix:
Fix the function "nfsrv_access" in the file /usr/src/sys/nfs/nfs_serv.c.

(near line 3430)

	if (error = VOP_GETATTR(vp, &vattr, cred, p))
		return (error);
	if ((error = VOP_ACCESS(vp, flags, cred, p)) /* && <<<<
	    cred->cr_uid != vattr.va_uid */ )    <<<<
	return (0);

>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199711251637.IAA24971>