Use umask 0077 across the process in order to have the created files readable only by the acme-dns user (#102)

This commit is contained in:
Joona Hoikkala
2018-08-12 20:06:54 +03:00
committed by GitHub
parent ec013c0f25
commit 0fc5a8e848

View File

@ -7,6 +7,7 @@ import (
stdlog "log"
"net/http"
"os"
"syscall"
"github.com/julienschmidt/httprouter"
"github.com/rs/cors"
@ -15,6 +16,8 @@ import (
)
func main() {
// Created files are not world writable
syscall.Umask(0077)
// Read global config
var err error
if fileIsAccessible("/etc/acme-dns/config.cfg") {