From 81eef326ac26cfee30bb612b497a29a0004f4a75 Mon Sep 17 00:00:00 2001 From: damien Date: Thu, 2 Mar 2000 12:57:18 +0000 Subject: [PATCH] - Allow root access to any key. Patch from markus.friedl@informatik.uni-erlangen.de --- ChangeLog | 2 ++ authfile.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index b6c604e8..cb59d701 100644 --- a/ChangeLog +++ b/ChangeLog @@ -10,6 +10,8 @@ - Warning was valid - possible race condition on PTYs. Avoided using platform-specific code. - Document some common problems + - Allow root access to any key. Patch from + markus.friedl@informatik.uni-erlangen.de 20000207 - Removed SOCKS code. Will support through a ProxyCommand. diff --git a/authfile.c b/authfile.c index f2699708..1e46ea61 100644 --- a/authfile.c +++ b/authfile.c @@ -228,7 +228,7 @@ load_private_key(const char *filename, const char *passphrase, /* 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("@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@"); -- 2.45.2