Commit 12eeba9a authored by Mike Hibler's avatar Mike Hibler
Browse files

Nits with creation of /local/logs:

 * if we have to create it, make sure to re-stat so that following
   /uid/gid/mode checks are legit
 * change the own/group if either of own/group are wrong
parent e3443b77
......@@ -620,9 +620,11 @@ main(int argc, char **argv)
if (system(buf) != 0) {
fatal("Could not make directory: %s", LOGDIR);
(void) stat(LOGDIR, &st);
if (st.st_uid != pw->pw_uid) {
if (st.st_uid != pw->pw_uid || st.st_gid != pw->pw_gid) {
chown(LOGDIR, pw->pw_uid, pw->pw_gid);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment