diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2001-04-05 16:59:50 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2001-04-05 16:59:50 +0000 |
commit | f0e8d25b9a003c1fb8df1a357b306fb7ede79828 (patch) | |
tree | 1583794b0ad86b975f1d1e5f2f5ea4a6e91bcfe1 | |
parent | 8ed9c4e33e34e93bf3bbc709770f8fea219a527c (diff) |
another euid mixup; wiz@danbala.ifoer.tuwien.ac.at
-rw-r--r-- | usr.sbin/lpr/common_source/common.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/usr.sbin/lpr/common_source/common.c b/usr.sbin/lpr/common_source/common.c index 4175903ab74..8711f9fc031 100644 --- a/usr.sbin/lpr/common_source/common.c +++ b/usr.sbin/lpr/common_source/common.c @@ -1,4 +1,4 @@ -/* $OpenBSD: common.c,v 1.10 2001/04/04 13:10:14 deraadt Exp $ */ +/* $OpenBSD: common.c,v 1.11 2001/04/05 16:59:49 deraadt Exp $ */ /* * Copyright (c) 1983, 1993 @@ -42,7 +42,7 @@ #if 0 static char sccsid[] = "@(#)common.c 8.5 (Berkeley) 4/28/95"; #else -static char rcsid[] = "$OpenBSD: common.c,v 1.10 2001/04/04 13:10:14 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: common.c,v 1.11 2001/04/05 16:59:49 deraadt Exp $"; #endif #endif /* not lint */ @@ -238,13 +238,15 @@ getq(namelist) struct stat stbuf; DIR *dirp; int arraysz; + seteuid(euid); - if ((dirp = opendir(SD)) == NULL) + dirp = opendir(SD); + seteuid(uid); + if (dirp== NULL) return(-1); if (fstat(dirp->dd_fd, &stbuf) < 0) goto errdone; - seteuid(uid); /* * Estimate the array size by taking the size of the directory file |