X-Git-Url: http://git.ozlabs.org/?p=ppp.git;a=blobdiff_plain;f=pppd%2Fauth.c;h=2f763c11aef515bc273942ca816fcbed4a7db371;hp=47ecae36f341d8302ce4a7f65a91c7f868eaeaac;hb=a00baab063b349591289cbde22ab40cf80b8f0af;hpb=3c8882ac68d38453a09c499d81a7430babee4bea diff --git a/pppd/auth.c b/pppd/auth.c index 47ecae3..2f763c1 100644 --- a/pppd/auth.c +++ b/pppd/auth.c @@ -33,7 +33,7 @@ */ #ifndef lint -static char rcsid[] = "$Id: auth.c,v 1.42 1999/03/02 05:33:09 paulus Exp $"; +static char rcsid[] = "$Id: auth.c,v 1.43 1999/03/06 11:28:10 paulus Exp $"; #endif #include @@ -211,14 +211,19 @@ setupapfile(argv) lcp_allowoptions[0].neg_upap = 1; /* open user info file */ - if ((ufile = fopen(*argv, "r")) == NULL) { + seteuid(getuid()); + ufile = fopen(*argv, "r"); + seteuid(0); + if (ufile == NULL) { option_error("unable to open user login data file %s", *argv); return 0; } +#if 0 /* check done by setting effective UID above */ if (!readable(fileno(ufile))) { option_error("%s: access denied", *argv); return 0; } +#endif check_access(ufile, *argv); /* get username */