Re: [4/5] Add option for hardlinkable cache of extracted blobs

From: Paul Jackson <pj@sgi.com>
Date: 2005-04-18 05:25:17
Petr wrote:
> BTW, I'd just use access(F_OK) instead of stat() it I don't care about

That's a bad habit to get into.

access(2) checks with the process's real uid and gid, rather than with
the effective ids as is done when actually attempting an operation. 
This is to allow set-UID programs to easily determine the invoking
user's authority.

Using access(2) when it shouldn't be used is a common source of bugs.

I recommend _only_ using it when you require exactly the above real vs.
effective id behaviour.

-- 
                  I won't rest till it's the best ...
                  Programmer, Linux Scalability
                  Paul Jackson <pj@engr.sgi.com> 1.650.933.1373, 1.925.600.0401
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Received on Mon Apr 18 05:27:44 2005

This archive was generated by hypermail 2.1.8 : 2005-04-18 05:27:44 EST