diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2001-04-04 13:10:15 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2001-04-04 13:10:15 +0000 |
commit | de569bb61c315d070bf9205f4410f70399f67ed0 (patch) | |
tree | 70ff3ba6eb8b83a4634b8adc6e38ade7271016c7 /usr.sbin | |
parent | d00d7919a437b24a46745a77814668a129d6e8e0 (diff) |
missung euid swapout; j@ida.interface-business.de
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/lpr/common_source/common.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/usr.sbin/lpr/common_source/common.c b/usr.sbin/lpr/common_source/common.c index d1c8f68ce40..4175903ab74 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.9 1998/06/28 02:22:13 angelos Exp $ */ +/* $OpenBSD: common.c,v 1.10 2001/04/04 13:10:14 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.9 1998/06/28 02:22:13 angelos Exp $"; +static char rcsid[] = "$OpenBSD: common.c,v 1.10 2001/04/04 13:10:14 deraadt Exp $"; #endif #endif /* not lint */ @@ -260,8 +260,10 @@ getq(namelist) if (d->d_name[0] != 'c' || d->d_name[1] != 'f') continue; /* daemon control files only */ seteuid(euid); - if (stat(d->d_name, &stbuf) < 0) + if (stat(d->d_name, &stbuf) < 0) { + seteuid(uid); continue; /* Doesn't exist */ + } seteuid(uid); q = (struct queue *)malloc(sizeof(time_t)+strlen(d->d_name)+1); if (q == NULL) |