HomeFreeBSD

Remove useless call to access(2) from tzcode. Quoting OpenBSD:

Description

Remove useless call to access(2) from tzcode. Quoting OpenBSD:

Remove doaccess variable and access(2) call since this interfers with
applications like zdump(8) because pledge(2) doesn't allow access(2) to
/usr/share/zoneinfo.

millert@ better described why this call can go away:

"This looks like an attempt to do access checks based on the real uid instead
of the effective uid. Basically for setuid programs we don't want to allow a
user to set TZ to a path they should not be able to otherwise access.

However, we already have a check for issetugid() above so I think the doaccess
bits can just be removed and we can rely on open()."

After discussion with tb@, deraadt@ and millert@, this was also OK'ed by them

Reviewed by: imp
Obtained from: OpenBSD
MFC after: 2 weeks
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D17701

Details

Provenance
traszAuthored on
Reviewer
imp
Differential Revision
D17701: Remove useless call to access(2)
Parents
rS339919: Make "nscd -t" work.
Branches
Unknown
Tags
Unknown