mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-21 12:30:06 +00:00
inet/rcmd.c: fix warn unused result
Fix unused result warnings, detected when _FORTIFY_SOURCE is enabled in glibc. Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
This commit is contained in:
parent
cb9cae962c
commit
1629adf2a6
@ -561,7 +561,9 @@ ruserok2_sa (struct sockaddr *ra, size_t ralen, int superuser,
|
||||
reading an NFS mounted file system, can't read files that
|
||||
are protected read/write owner only. */
|
||||
uid = __geteuid ();
|
||||
seteuid (pwd->pw_uid);
|
||||
if (seteuid (pwd->pw_uid) < 0)
|
||||
return -1;
|
||||
|
||||
hostf = iruserfopen (pbuf, pwd->pw_uid);
|
||||
|
||||
if (hostf != NULL)
|
||||
@ -570,7 +572,8 @@ ruserok2_sa (struct sockaddr *ra, size_t ralen, int superuser,
|
||||
fclose (hostf);
|
||||
}
|
||||
|
||||
seteuid (uid);
|
||||
if (seteuid (uid) < 0)
|
||||
return -1;
|
||||
return isbad;
|
||||
}
|
||||
return -1;
|
||||
|
Loading…
Reference in New Issue
Block a user