/[inetutils]/inetutils/libinetutils/iruserok.c
ViewVC logotype

Diff of /inetutils/libinetutils/iruserok.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.13 by gray, Tue May 14 15:15:05 2002 UTC revision 1.14 by gray, Fri Dec 6 16:07:50 2002 UTC
# Line 107  iruserok (u_long raddr, int superuser, c Line 107  iruserok (u_long raddr, int superuser, c
107      {      {
108        if (__ivaliduser (hostf, raddr, luser, ruser) == 0)        if (__ivaliduser (hostf, raddr, luser, ruser) == 0)
109          {          {
110            (void) fclose (hostf);            fclose (hostf);
111            return 0;            return 0;
112          }          }
113        (void) fclose (hostf);        fclose (hostf);
114    }    }
115    if (first == 1 && (__check_rhosts_file || superuser))    if (first == 1 && (__check_rhosts_file || superuser))
116      {      {
# Line 134  iruserok (u_long raddr, int superuser, c Line 134  iruserok (u_long raddr, int superuser, c
134         * are protected read/write owner only.         * are protected read/write owner only.
135         */         */
136        uid = geteuid();        uid = geteuid();
137        (void)seteuid (pwd->pw_uid);        seteuid (pwd->pw_uid);
138        hostf = fopen (pbuf, "r");        hostf = fopen (pbuf, "r");
139        (void)seteuid (uid);        seteuid (uid);
140    
141        if (hostf == NULL)        if (hostf == NULL)
142          return -1;          return -1;

Legend:
Removed from v.1.13  
changed lines
  Added in v.1.14

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26