diff options
author | Hakan Olsson <ho@cvs.openbsd.org> | 2001-04-05 23:02:03 +0000 |
---|---|---|
committer | Hakan Olsson <ho@cvs.openbsd.org> | 2001-04-05 23:02:03 +0000 |
commit | 8caa5f59e9ad92ca14054161fbe82b569ebea704 (patch) | |
tree | 2237f27d091edd891c3a68771dbce0dc353be0b5 | |
parent | cf8ae4e4804d766902cb5657b1c0c580f7a51a62 (diff) |
let check_file_secrecy() set errno
-rw-r--r-- | sbin/isakmpd/util.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sbin/isakmpd/util.c b/sbin/isakmpd/util.c index 59e5deef11e..d6bb669944d 100644 --- a/sbin/isakmpd/util.c +++ b/sbin/isakmpd/util.c @@ -1,4 +1,4 @@ -/* $OpenBSD: util.c,v 1.11 2000/11/23 12:57:15 niklas Exp $ */ +/* $OpenBSD: util.c,v 1.12 2001/04/05 23:02:02 ho Exp $ */ /* $EOM: util.c,v 1.23 2000/11/23 12:22:08 niklas Exp $ */ /* @@ -40,6 +40,7 @@ #include <stdlib.h> #include <string.h> #include <unistd.h> +#include <errno.h> #include "sysdep.h" @@ -249,12 +250,14 @@ check_file_secrecy (char *name, off_t *file_size) { log_print ("check_file_secrecy: " "not loading %s - file owner is not process user", name); + errno = EPERM; return -1; } if ((st.st_mode & (S_IRWXG | S_IRWXO)) != 0) { log_print ("conf_file_secrecy: not loading %s - too open permissions", name); + errno = EPERM; return -1; } |