]> 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)
commitd5c8f4594965a4760d63d4985e0f648b592e893e
tree438efa149d025b4d83003e412cdd74f9542e6772
parentcd8edbd8625a004337224a70f684dc4e8d92c93e
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