summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormarkus <markus@openbsd.org>2000-12-20 19:26:56 +0000
committermarkus <markus@openbsd.org>2000-12-20 19:26:56 +0000
commit3e759973e774bba24db937bf2b8acc260073919c (patch)
treee75807398b9186aeae3389f5397ed2a0ecdcaa10
parentCommands for manipulating the token database (ActivCard, CRYPTOCard, or SNK-004) (diff)
downloadwireguard-openbsd-3e759973e774bba24db937bf2b8acc260073919c.tar.xz
wireguard-openbsd-3e759973e774bba24db937bf2b8acc260073919c.zip
allow ssh -i userkey for root
-rw-r--r--usr.bin/ssh/authfile.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/ssh/authfile.c b/usr.bin/ssh/authfile.c
index fe1f8e64be7..f9b920334ea 100644
--- a/usr.bin/ssh/authfile.c
+++ b/usr.bin/ssh/authfile.c
@@ -36,7 +36,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: authfile.c,v 1.23 2000/12/19 23:17:55 markus Exp $");
+RCSID("$OpenBSD: authfile.c,v 1.24 2000/12/20 19:26:56 markus Exp $");
#include <openssl/bn.h>
#include <openssl/dsa.h>
@@ -505,7 +505,7 @@ load_private_key(const char *filename, const char *passphrase, Key *key,
/* check owner and modes */
if (fstat(fd, &st) < 0 ||
- (st.st_uid != 0 && st.st_uid != getuid()) ||
+ (st.st_uid != 0 && getuid() != 0 && st.st_uid != getuid()) ||
(st.st_mode & 077) != 0) {
close(fd);
error("@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@");