If seteuid() failes, break out of the function. Prompted by MIT advisory.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@17879 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -250,7 +250,8 @@ again:
|
|||||||
* are protected read/write owner only.
|
* are protected read/write owner only.
|
||||||
*/
|
*/
|
||||||
uid = geteuid();
|
uid = geteuid();
|
||||||
seteuid(pwd->pw_uid);
|
if (seteuid(pwd->pw_uid) < 0)
|
||||||
|
return (-1);
|
||||||
hostf = fopen(pbuf, "r");
|
hostf = fopen(pbuf, "r");
|
||||||
seteuid(uid);
|
seteuid(uid);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user