Skip to content

Commit 8f8cea7

Browse files
authored
Wrong umask prevents temporary private key access
Hi, umask 0600 prevents the user from reading his own temporary private key file. 0177 might be the intended mask. Kind regards.
1 parent 5147e78 commit 8f8cea7

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/session_server_ssh.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ base64der_key_to_tmp_file(const char *in, int rsa)
4646
return NULL;
4747
}
4848

49-
umode = umask(0600);
49+
umode = umask(0177);
5050
fd = mkstemp(path);
5151
umask(umode);
5252
if (fd == -1) {

0 commit comments

Comments
 (0)