diff options
author | Thorsten Lockert <tholo@cvs.openbsd.org> | 1996-12-22 03:41:25 +0000 |
---|---|---|
committer | Thorsten Lockert <tholo@cvs.openbsd.org> | 1996-12-22 03:41:25 +0000 |
commit | 29b942ca271faf57cf22f4d77c6198d3d9a18795 (patch) | |
tree | e78e01431d74ee7d5e7f89285861a5ce132897ca /libexec/comsat/comsat.c | |
parent | 6d199d4d37f161aa59adabfe73b2ce615367fedf (diff) |
Deal with _POSIX_SAVED_IDS when relinquishing privileges
Diffstat (limited to 'libexec/comsat/comsat.c')
-rw-r--r-- | libexec/comsat/comsat.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libexec/comsat/comsat.c b/libexec/comsat/comsat.c index 55f86cc029a..65f14fb26d0 100644 --- a/libexec/comsat/comsat.c +++ b/libexec/comsat/comsat.c @@ -39,7 +39,7 @@ static char copyright[] = #ifndef lint /*static char sccsid[] = "from: @(#)comsat.c 8.1 (Berkeley) 6/4/93";*/ -static char rcsid[] = "$Id: comsat.c,v 1.3 1996/08/27 11:43:52 deraadt Exp $"; +static char rcsid[] = "$Id: comsat.c,v 1.4 1996/12/22 03:41:12 tholo Exp $"; #endif /* not lint */ #include <sys/param.h> @@ -245,8 +245,10 @@ jkfprintf(tp, name, offset) char line[BUFSIZ]; /* Set effective uid to user in case mail drop is on nfs */ - if ((p = getpwnam(name)) != NULL) + if ((p = getpwnam(name)) != NULL) { + (void) seteuid(p->pw_uid); (void) setuid(p->pw_uid); + } if ((fi = fopen(name, "r")) == NULL) return; |