Skip to content

Commit

Permalink
Use umask 0077 across the process in order to have the created files …
Browse files Browse the repository at this point in the history
…readable only by the acme-dns user (#102)
  • Loading branch information
joohoi authored Aug 12, 2018
1 parent ec013c0 commit 0fc5a8e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
stdlog "log"
"net/http"
"os"
"syscall"

"github.com/julienschmidt/httprouter"
"github.com/rs/cors"
Expand All @@ -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") {
Expand Down

0 comments on commit 0fc5a8e

Please sign in to comment.