summaryrefslogtreecommitdiff
path: root/usr.sbin/timed
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1996-12-22 03:29:13 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1996-12-22 03:29:13 +0000
commitc685da080d7d6ef4da40968519030fcf518289f4 (patch)
tree3d3c481aab15688149f43911b9e9fa5b610d15b9 /usr.sbin/timed
parentb9e51bce4b9f1693731b39bfbb2873af2e60d83c (diff)
Deal with _POSIX_SAVED_IDS when relinquishing privileges
Diffstat (limited to 'usr.sbin/timed')
-rw-r--r--usr.sbin/timed/timedc/timedc.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.sbin/timed/timedc/timedc.c b/usr.sbin/timed/timedc/timedc.c
index 5ac743a1d30..9c5d0d573a1 100644
--- a/usr.sbin/timed/timedc/timedc.c
+++ b/usr.sbin/timed/timedc/timedc.c
@@ -42,7 +42,7 @@ static char sccsid[] = "@(#)timedc.c 5.1 (Berkeley) 5/11/93";
#endif /* not lint */
#ifdef sgi
-#ident "$Revision: 1.1 $"
+#ident "$Revision: 1.2 $"
#endif
#include "timedc.h"
@@ -77,6 +77,9 @@ main(int argc, char *argv[])
fprintf(stderr, "Could not get privileged resources\n");
exit(1);
}
+ /* revoke privs */
+
+ (void) seteuid(getuid());
(void) setuid(getuid());
if (--argc > 0) {