mirror of
https://github.com/GitJournal/GitJournal.git
synced 2025-06-28 18:03:14 +08:00
keygen: Change file permissions in private key
They were too open, and maybe someone will complain as the normal 'ssh' command line tool does complain.
This commit is contained in:
@ -144,6 +144,7 @@ int gj_generate_ssh_keys(const char *private_key_path,
|
||||
gj_log_internal("Failed to write private key to %s\n", private_key_path);
|
||||
goto cleanup;
|
||||
}
|
||||
chmod(private_key_path, 0600);
|
||||
|
||||
// Save public key
|
||||
ret = write_rsa_public_key(rsa, public_key_path, comment);
|
||||
|
Reference in New Issue
Block a user