summaryrefslogtreecommitdiff
path: root/libexec/tftpd/tftpd.c
diff options
context:
space:
mode:
authorThorsten Lockert <tholo@cvs.openbsd.org>1996-12-22 03:41:25 +0000
committerThorsten Lockert <tholo@cvs.openbsd.org>1996-12-22 03:41:25 +0000
commit29b942ca271faf57cf22f4d77c6198d3d9a18795 (patch)
treee78e01431d74ee7d5e7f89285861a5ce132897ca /libexec/tftpd/tftpd.c
parent6d199d4d37f161aa59adabfe73b2ce615367fedf (diff)
Deal with _POSIX_SAVED_IDS when relinquishing privileges
Diffstat (limited to 'libexec/tftpd/tftpd.c')
-rw-r--r--libexec/tftpd/tftpd.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libexec/tftpd/tftpd.c b/libexec/tftpd/tftpd.c
index c95fd652123..d848a7e05f1 100644
--- a/libexec/tftpd/tftpd.c
+++ b/libexec/tftpd/tftpd.c
@@ -39,7 +39,7 @@ char copyright[] =
#ifndef lint
/*static char sccsid[] = "from: @(#)tftpd.c 5.13 (Berkeley) 2/26/91";*/
-static char rcsid[] = "$Id: tftpd.c,v 1.4 1996/12/03 00:25:52 deraadt Exp $";
+static char rcsid[] = "$Id: tftpd.c,v 1.5 1996/12/22 03:41:22 tholo Exp $";
#endif /* not lint */
/*
@@ -145,7 +145,9 @@ main(argc, argv)
exit(1);
}
+ (void) setegid(pw->pw_gid);
(void) setgid(pw->pw_gid);
+ (void) seteuid(pw->pw_uid);
(void) setuid(pw->pw_uid);
if (ioctl(fd, FIONBIO, &on) < 0) {