mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-12-04 05:58:57 +00:00
Reset the seteuid in a few obscure error situations.
This commit is contained in:
parent
b770f3547d
commit
a4f87098ce
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=68740
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user