default chroot to user' home if unset

This commit is contained in:
Omar Polo 2023-06-24 19:42:31 +00:00
parent 0fc92ad2fd
commit 287ab86538
2 changed files with 6 additions and 0 deletions

3
gmid.c
View File

@ -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;

View File

@ -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