]> git.ozlabs.org Git - ppp.git/commitdiff
check permissions on file specified for +ua option
authorPaul Mackerras <paulus@samba.org>
Fri, 27 May 1994 00:43:34 +0000 (00:43 +0000)
committerPaul Mackerras <paulus@samba.org>
Fri, 27 May 1994 00:43:34 +0000 (00:43 +0000)
pppd/options.c

index a8ded25a9bc90666c736075c25a8db747e5e8b8c..ef1fc8a3c008b74494c63bc69dcddbae581dad8c 100644 (file)
@@ -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 <stdio.h>
@@ -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 */