summaryrefslogtreecommitdiff
path: root/readconf.c
diff options
context:
space:
mode:
Diffstat (limited to 'readconf.c')
-rw-r--r--readconf.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/readconf.c b/readconf.c
index f4710e833..5aa371ed9 100644
--- a/readconf.c
+++ b/readconf.c
@@ -12,7 +12,7 @@
12 */ 12 */
13 13
14#include "includes.h" 14#include "includes.h"
15RCSID("$OpenBSD: readconf.c,v 1.130 2004/04/27 09:46:36 djm Exp $"); 15RCSID("$OpenBSD: readconf.c,v 1.131 2004/05/27 00:50:13 dtucker Exp $");
16 16
17#include "ssh.h" 17#include "ssh.h"
18#include "xmalloc.h" 18#include "xmalloc.h"
@@ -809,16 +809,11 @@ read_config_file(const char *filename, const char *host, Options *options,
809 if (checkperm) { 809 if (checkperm) {
810 struct stat sb; 810 struct stat sb;
811 811
812 if (fstat(fileno(f), &sb) == -1) { 812 if (fstat(fileno(f), &sb) == -1)
813 fatal("fstat %s: %s", filename, strerror(errno)); 813 fatal("fstat %s: %s", filename, strerror(errno));
814 fclose(f);
815 return (0);
816 }
817 if (((sb.st_uid != 0 && sb.st_uid != getuid()) || 814 if (((sb.st_uid != 0 && sb.st_uid != getuid()) ||
818 (sb.st_mode & 022) != 0)) { 815 (sb.st_mode & 022) != 0))
819 fatal("Bad owner or permissions on %s", filename); 816 fatal("Bad owner or permissions on %s", filename);
820 return 0;
821 }
822 } 817 }
823 818
824 debug("Reading configuration data %.200s", filename); 819 debug("Reading configuration data %.200s", filename);