Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 9 Jun 2001 14:46:12 +0300
From:      Ruslan Ermilov <ru@FreeBSD.org>
To:        "Alexey V. Neyman" <avn@any.ru>
Cc:        Poul-Henning Kamp <phk@FreeBSD.org>, fs@FreeBSD.org
Subject:   Re: man VOP_ACCESS(9), suser(9)
Message-ID:  <20010609144612.H87114@sunbay.com>
In-Reply-To: <20010609152520.Q2476-100000@srv2.any>; from avn@any.ru on Sat, Jun 09, 2001 at 03:27:33PM %2B0400
References:  <20010609152520.Q2476-100000@srv2.any>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Jun 09, 2001 at 03:27:33PM +0400, Alexey V. Neyman wrote:
> Hello there!
> 
> >From pseudo-code in VOP_ACCESS(9):
>          /* Otherwise, user id 0 always gets access. */
>          if (cred->cr_uid == 0)
>              return 0;
> 
> Shouldn't this check be changed to suser() or suser_xxx() to check against
> super-user privileges?
> 
Yes, much probably.  Actually, the code in -CURRENT uses vaccess() from
the vfs_subr.c, and the latter uses suser_xxx(), but the VOP_ACCESS(9)'s
PSEUDOCODE section of manpage hasn't (yet?) been updated.  The code in
-STABLE really uses cr_uid == 0 (see ufs_vnops.c), and this probably
should be fixed.

Over to VFS geeks.  :-)


Cheers,
-- 
Ruslan Ermilov		Oracle Developer/DBA,
ru@sunbay.com		Sunbay Software AG,
ru@FreeBSD.org		FreeBSD committer,
+380.652.512.251	Simferopol, Ukraine

http://www.FreeBSD.org	The Power To Serve
http://www.oracle.com	Enabling The Information Age

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-fs" in the body of the message




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