diff options
author | gad <gad@FreeBSD.org> | 2000-11-15 04:10:59 +0000 |
---|---|---|
committer | gad <gad@FreeBSD.org> | 2000-11-15 04:10:59 +0000 |
commit | 69af93ca7cbfc6ff4b3cbe981063c469e2e7f03b (patch) | |
tree | d61a64b56929e03b89a98b0c39956b27fcebdcd9 /usr.sbin/lpr | |
parent | 711d79517d57be317f44fcbd5f5f8bde42cbcfb8 (diff) | |
download | FreeBSD-src-69af93ca7cbfc6ff4b3cbe981063c469e2e7f03b.zip FreeBSD-src-69af93ca7cbfc6ff4b3cbe981063c469e2e7f03b.tar.gz |
Reset the seteuid in a few obscure error situations.
Diffstat (limited to 'usr.sbin/lpr')
-rw-r--r-- | usr.sbin/lpr/common_source/common.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.sbin/lpr/common_source/common.c b/usr.sbin/lpr/common_source/common.c index 8300e89..07e9bd4 100644 --- a/usr.sbin/lpr/common_source/common.c +++ b/usr.sbin/lpr/common_source/common.c @@ -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); } |