summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2000-03-02 23:57:18 +1100
committerDamien Miller <djm@mindrot.org>2000-03-02 23:57:18 +1100
commit2453d01611c2abb76fc6e1355a70d628ccf8e446 (patch)
treeb5fee24c3ebcd896c0c01a9f05a495971ead41e4
parent204ad074e51c0e9c25666eb044e4c255bcfe64b6 (diff)
- Allow root access to any key. Patch from
markus.friedl@informatik.uni-erlangen.de
-rw-r--r--ChangeLog2
-rw-r--r--authfile.c4
2 files changed, 4 insertions, 2 deletions
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 b0e832a0..a6dab757 100644
--- a/authfile.c
+++ b/authfile.c
@@ -15,7 +15,7 @@
*/
#include "includes.h"
-RCSID("$Id: authfile.c,v 1.6 1999/12/07 04:38:32 damien Exp $");
+RCSID("$Id: authfile.c,v 1.7 2000/03/02 12:57:18 damien Exp $");
#ifdef HAVE_OPENSSL
#include <openssl/bn.h>
@@ -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("@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@");