diff options
| author | Brian Somers <brian@FreeBSD.org> | 1999-08-09 22:54:51 +0000 |
|---|---|---|
| committer | Brian Somers <brian@FreeBSD.org> | 1999-08-09 22:54:51 +0000 |
| commit | 1080ea25e8907b4f6c553ddb744d9988d7ad5ef2 (patch) | |
| tree | 93f099aadf3bc28047d0de79f806c3856764eec7 /usr.sbin | |
| parent | d9d628b000c4ee3a976de1e643aafd666f65bae3 (diff) | |
Notes
Diffstat (limited to 'usr.sbin')
| -rw-r--r-- | usr.sbin/ppp/main.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/usr.sbin/ppp/main.c b/usr.sbin/ppp/main.c index fb79b2610694f..9a08747551fe8 100644 --- a/usr.sbin/ppp/main.c +++ b/usr.sbin/ppp/main.c @@ -17,7 +17,7 @@ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. * - * $Id: main.c,v 1.154 1999/05/08 11:07:05 brian Exp $ + * $Id: main.c,v 1.155 1999/05/13 16:34:57 brian Exp $ * * TODO: */ @@ -37,6 +37,7 @@ #include <sys/time.h> #include <termios.h> #include <unistd.h> +#include <sys/stat.h> #ifndef NOALIAS #ifdef __FreeBSD__ @@ -305,7 +306,9 @@ main(int argc, char **argv) snprintf(conf, sizeof conf, "%s/%s", _PATH_PPP, CONFFILE); do { - if (!access(conf, W_OK)) { + struct stat sb; + + if (stat(conf, &sb) == 0 && sb.st_mode & S_IWOTH) { log_Printf(LogALERT, "ppp: Access violation: Please protect %s\n", conf); return -1; |
