]> git.sur5r.net Git - bacula/bacula/commit
find_one_file: Remove unreliable and redundant access(2) directory check
authorDmitry V. Levin <ldv@altlinux.org>
Thu, 17 Sep 2009 22:35:13 +0000 (22:35 +0000)
committerKern Sibbald <kern@sibbald.com>
Fri, 18 Sep 2009 18:21:37 +0000 (20:21 +0200)
commit65c2076d54f4d165c20bca68f280275875c245db
treee3a2decd5f8e0244c38539fb08790ba5e0b0db88
parent5864948dc8830ef190420e54ce1eb551768b649f
find_one_file: Remove unreliable and redundant access(2) directory check

From one side, access(2) is not reliable by definition.  According to
specification, access(2) uses process's real UID and GID instead of
effective IDs, and it ignores process capabilities.  Consequently,
privileged process with unprivileged real IDs cannot use access(2) to
check its access to files.

From another side, the access(2) directory check looks redundant
because the directory is opened right below using opendir(3).
bacula/src/findlib/find_one.c