#4896 Make sure authorized_keys file has mode 600.
Merged 3 years ago by pingou. Opened 3 years ago by sergiodj.
sergiodj/pagure authorized-keys-chmod  into  master

file modified
+2
@@ -1270,6 +1270,7 @@ 

                  sshkey.strip(),

              )

          )

+     os.chmod(fullpath, 0o600)

  

  

  @conn.task(queue=pagure_config.get("AUTHORIZED_KEYS_QUEUE", None), bind=True)
@@ -1294,3 +1295,4 @@ 

  

      with open(fullpath, "w") as stream:

          stream.write("\n".join(output))

+     os.chmod(fullpath, 0o600)

Only the pagure user needs to be able to read and write the file.

pretty please pagure-ci rebuild

3 years ago

Pull-Request has been merged by pingou

3 years ago