|
Line 0
Link Here
|
|
|
1 |
--- src/ntp.c.orig 2018-07-21 20:35:38 UTC |
| 2 |
+++ src/ntp.c |
| 3 |
@@ -117,7 +117,8 @@ ntp_main(struct ntpd_conf *nconf, struct |
| 4 |
if (stat(pw->pw_dir, &stb) == -1) { |
| 5 |
fatal("privsep dir %s could not be opened", pw->pw_dir); |
| 6 |
} |
| 7 |
- if (stb.st_uid != 0 || (stb.st_mode & (S_IWGRP|S_IWOTH)) != 0) { |
| 8 |
+ if (stb.st_uid != pw->pw_uid && |
| 9 |
+ stb.st_uid != 0 || (stb.st_mode & (S_IWGRP|S_IWOTH)) != 0) { |
| 10 |
fatalx("bad privsep dir %s permissions: %o", |
| 11 |
pw->pw_dir, stb.st_mode); |
| 12 |
} |