diff options
| author | Jordan K. Hubbard <jkh@FreeBSD.org> | 1998-10-09 07:32:38 +0000 |
|---|---|---|
| committer | Jordan K. Hubbard <jkh@FreeBSD.org> | 1998-10-09 07:32:38 +0000 |
| commit | 50dfa596d3f83c7de5fde6b5e54b8a8b9484dcb6 (patch) | |
| tree | af136611cd337cd4b4e23e4a821805951c70fb7a /lib/libutil/auth.c | |
| parent | 72671863e829f80910a58bf59bd9b013096cb2a0 (diff) | |
Notes
Diffstat (limited to 'lib/libutil/auth.c')
| -rw-r--r-- | lib/libutil/auth.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/lib/libutil/auth.c b/lib/libutil/auth.c index 0894066cc119..05c3917a9531 100644 --- a/lib/libutil/auth.c +++ b/lib/libutil/auth.c @@ -32,9 +32,11 @@ * */ -#include <stdio.h> +#include <unistd.h> #include <syslog.h> #include <sys/types.h> +#include <paths.h> +#include <fcntl.h> #include <libutil.h> static properties P; @@ -42,15 +44,15 @@ static properties P; static int initauthconf(const char *path) { - FILE *fp; + int fd; if (!P) { - if ((fp = fopen(path, "r")) == NULL) { + if ((fd = open(path, O_RDONLY)) < 0) { syslog(LOG_ERR, "initauthconf: unable to open file: %s", path); return 1; } - P = properties_read(fp); - fclose(fp); + P = properties_read(fd); + close(fd); if (!P) { syslog(LOG_ERR, "initauthconf: unable to parse file: %s", path); return 1; |
