unbreak the subcommands that talk to the mox instance of the ctl socket

broken on may 31st with the "open tls keys as root" change, 70d07c5459, so
broken in v0.0.4, not in v0.0.3
This commit is contained in:
Mechiel Lukkien
2023-06-16 13:27:27 +02:00
parent f73125cbcd
commit 2eecf38842
16 changed files with 28 additions and 28 deletions

View File

@ -151,7 +151,7 @@ requested, other TLS certificates are requested on demand.
log := mlog.New("serve")
if os.Getuid() == 0 {
mox.MustLoadConfig(checkACMEHosts)
mox.MustLoadConfig(true, checkACMEHosts)
// No need to potentially start and keep multiple processes. As root, we just need
// to start the child process.
@ -183,7 +183,7 @@ requested, other TLS certificates are requested on demand.
} else {
log.Print("starting as unprivileged user", mlog.Field("user", mox.Conf.Static.User), mlog.Field("uid", mox.Conf.Static.UID), mlog.Field("gid", mox.Conf.Static.GID), mlog.Field("pid", os.Getpid()))
mox.RestorePassedFiles()
mox.MustLoadConfig(checkACMEHosts)
mox.MustLoadConfig(true, checkACMEHosts)
}
syscall.Umask(syscall.Umask(007) | 007)