mirror of
https://github.com/mjl-/mox.git
synced 2025-07-10 09:54:40 +03:00
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:
4
serve.go
4
serve.go
@ -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)
|
||||
|
Reference in New Issue
Block a user