[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: bug in mintlib44's access() function
Actually, if access() *did* use effective uid's it would have no point, since
then it would always only tell you whether or not an open() call will fail;
this is redundant, since (as you pointed out) you can always just try to
open the file and see if it fails.
As Sun defines it, though, access serves a useful purpose: it allows
setuid and setgid programs to determine whether the user running them
should be allowed acces to a file. For example, if a program is setuid
root, it can always read any file; but if it is run by user "guest",
then perhaps there are some files that it may not want to allow the user
access to.