Code to hide inaccessible files/directories

Robert Watson rwatson at FreeBSD.org
Tue Apr 17 20:15:13 GMT 2001


On Tue, 17 Apr 2001, Simo Sorce wrote:

> Just as a reminder, access (under linux) uses the real uid for testing
> not effective uid.  As most of teh code now (HEAD) runs with real uid 0
> and effective = users uid access will never fail (eg access will be ever
> granted) 

I believe that actually, this is the behavior specified in ISO/IEC
9945-1:1990 (POSIX.1), and should be the case for all compliant operating
systems.  We've been considering introducing two new calls, eaccess() and
feaccess() that make use of the effective uid and gid rather than the real
uid and gid in FreeBSD.  These calls would still suffer from races if used
improperly, but would allow for cleaner failure modes for
compound-operations, and have utility in a number of situations. 

Robert N M Watson             FreeBSD Core Team, TrustedBSD Project
robert at fledge.watson.org      NAI Labs, Safeport Network Services





More information about the samba-technical mailing list