diff options
author | Darren Tucker <dtucker@zip.com.au> | 2013-03-12 11:31:05 +1100 |
---|---|---|
committer | Darren Tucker <dtucker@zip.com.au> | 2013-03-12 11:31:05 +1100 |
commit | aa97d13fa22d410ad155d23b230fd3cce989ce25 (patch) | |
tree | 6b5b35af5bcab94a5e6447f733a96e698069ce48 /auth.c | |
parent | fe10a28e088751ec3a6ac96e73be21bae8b86d70 (diff) |
- (dtucker) [auth.c configure.ac platform.c platform.h] Accept uid 2 ("bin")
in addition to root as an owner of system directories on AIX and HP-UX.
ok djm@
Diffstat (limited to 'auth.c')
-rw-r--r-- | auth.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -448,7 +448,7 @@ auth_secure_path(const char *name, struct stat *stp, const char *pw_dir, snprintf(err, errlen, "%s is not a regular file", buf); return -1; } - if ((stp->st_uid != 0 && stp->st_uid != uid) || + if ((!platform_sys_dir_uid(stp->st_uid) && stp->st_uid != uid) || (stp->st_mode & 022) != 0) { snprintf(err, errlen, "bad ownership or modes for file %s", buf); @@ -464,7 +464,7 @@ auth_secure_path(const char *name, struct stat *stp, const char *pw_dir, strlcpy(buf, cp, sizeof(buf)); if (stat(buf, &st) < 0 || - (st.st_uid != 0 && st.st_uid != uid) || + (!platform_sys_dir_uid(st.st_uid) && st.st_uid != uid) || (st.st_mode & 022) != 0) { snprintf(err, errlen, "bad ownership or modes for directory %s", buf); |