print log line about unprivileged user after having initialized the values that are printed

we currently were logging as if we were starting with uid=0, which wasn't the case.
This commit is contained in:
Mechiel Lukkien 2023-07-19 11:32:19 +02:00
parent 17dac99830
commit 5b17fcd712
No known key found for this signature in database

View file

@ -186,9 +186,9 @@ requested, other TLS certificates are requested on demand.
} }
} }
} else { } 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.RestorePassedFiles()
mox.MustLoadConfig(true, checkACMEHosts) mox.MustLoadConfig(true, checkACMEHosts)
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()))
} }
syscall.Umask(syscall.Umask(007) | 007) syscall.Umask(syscall.Umask(007) | 007)