commit 287ab86538ac30413fdbae20234b470b93954386 from: Omar Polo date: Sat Jun 24 19:42:31 2023 UTC default chroot to user' home if unset commit - 0fc92ad2fdb7ab7d0165812539e47a8ad2a4c3ba commit + 287ab86538ac30413fdbae20234b470b93954386 blob - b85fd4a1bb6bc4ed3d4c9d671593916e04b71832 blob + 7d8f2c8a4960ec7ae2264567460e1e089143f575 --- gmid.c +++ gmid.c @@ -270,6 +270,9 @@ main(int argc, char **argv) fatalx("need root privileges"); if ((ps->ps_pw = getpwnam(conf->user)) == NULL) fatalx("unknown user %s", conf->user); + if (*conf->chroot == '\0') + strlcpy(conf->chroot, ps->ps_pw->pw_dir, + sizeof(conf->chroot)); } ps->ps_instances[PROC_SERVER] = conf->prefork; blob - 82e09297de11a37833ab6455a6e3e467c175e6e6 blob + f76e6d3fe167fe3ab6ddd1a0c4da870a754c8924 --- gmid.conf.5 +++ gmid.conf.5 @@ -126,6 +126,9 @@ directory, except for the and .Ic ocsp paths. +Defaults to the +.Ic user +home directory, if provided. .It Ic prefork Ar number Run the specified number of server processes. This increases the performance and prevents delays when connecting to