Security fix: Incorrect permission assignment for critical resource

This commit is contained in:
nemunaire 2023-07-14 16:49:57 +02:00
commit f097c029f3
10 changed files with 17 additions and 17 deletions

View file

@ -47,8 +47,8 @@ func GenerateCA(notBefore time.Time, notAfter time.Time) error {
}
// Ensure directories exists
os.Mkdir(PKIDir, 0777)
os.Mkdir(path.Join(PKIDir, "shared"), 0777)
os.Mkdir(PKIDir, 0751)
os.Mkdir(path.Join(PKIDir, "shared"), 0751)
pub, priv, err := GeneratePrivKey()
if err != nil {