diff options
| author | Garance A Drosehn <gad@FreeBSD.org> | 2000-11-15 04:10:59 +0000 |
|---|---|---|
| committer | Garance A Drosehn <gad@FreeBSD.org> | 2000-11-15 04:10:59 +0000 |
| commit | a4f87098ce06dcdc5fe9f314e8a9776d8917c514 (patch) | |
| tree | 109f8a97b479339ab841090bef609a758bc364b5 /usr.sbin | |
| parent | b770f3547da8260c8c5f96d59462c74eb9f91a58 (diff) | |
Notes
Diffstat (limited to 'usr.sbin')
| -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 8300e8901246..07e9bd4005b3 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); } |
