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 (joohoi#102)
  • Loading branch information
joohoi committed Aug 12, 2018
1 parent 897010b commit 5899757
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 5899757

Please sign in to comment.