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:
Love Hörnquist Åstrand
2006-08-08 21:50:40 +00:00
parent 847a99a0ec
commit 343cb164c8

View File

@@ -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);