From: Paul Mackerras Date: Fri, 27 May 1994 00:43:34 +0000 (+0000) Subject: check permissions on file specified for +ua option X-Git-Tag: ppp-2-1-2a~20 X-Git-Url: https://git.ozlabs.org/?p=ppp.git;a=commitdiff_plain;h=21befb77bf612913b9fe18e9aef6cb726ee7ae68;hp=d9bd48c35d1c5d6c26dd746efd93edb4d0de7745 check permissions on file specified for +ua option --- diff --git a/pppd/options.c b/pppd/options.c index a8ded25..ef1fc8a 100644 --- a/pppd/options.c +++ b/pppd/options.c @@ -18,7 +18,7 @@ */ #ifndef lint -static char rcsid[] = "$Id: options.c,v 1.9 1994/05/25 06:25:48 paulus Exp $"; +static char rcsid[] = "$Id: options.c,v 1.10 1994/05/27 00:43:34 paulus Exp $"; #endif #include @@ -835,6 +835,10 @@ setupapfile(argv) fprintf(stderr, "unable to open user login data file %s\n", *argv); return 0; } + if (!readable(fileno(ufile))) { + fprintf(stderr, "%s: access denied\n", *argv); + return 0; + } check_access(ufile, *argv); /* get username */