Reset the seteuid in a few obscure error situations.

This commit is contained in:
Garance A Drosehn 2000-11-15 04:10:59 +00:00
parent b770f3547d
commit a4f87098ce
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=68740

View File

@ -118,8 +118,10 @@ getq(pp, namelist)
int arraysz;
seteuid(euid);
if ((dirp = opendir(pp->spool_dir)) == NULL)
if ((dirp = opendir(pp->spool_dir)) == NULL) {
seteuid(uid);
return (-1);
}
if (fstat(dirp->dd_fd, &stbuf) < 0)
goto errdone;
seteuid(uid);
@ -168,6 +170,7 @@ getq(pp, namelist)
errdone:
closedir(dirp);
seteuid(uid);
return (-1);
}