Fix unused result warnings, detected when _FORTIFY_SOURCE is enabled in
glibc.
Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
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)
fclose (hostf);
}
- seteuid (uid);
+ if (seteuid (uid) < 0)
+ return -1;
return isbad;
}
return -1;