Permalink
Browse files

revoke privs after pidfile write

XXX use pidfile()
  • Loading branch information...
1 parent e8ddfc8 commit d6f8f8e05322c77778a64868e465425896391468 itojun committed Oct 5, 2003
Showing with 5 additions and 5 deletions.
  1. +5 −5 kame/kame/rtsold/rtsold.c
@@ -1,4 +1,4 @@
-/* $KAME: rtsold.c,v 1.69 2003/10/05 00:14:43 itojun Exp $ */
+/* $KAME: rtsold.c,v 1.70 2003/10/05 00:16:51 itojun Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -296,10 +296,6 @@ main(int argc, char **argv)
/*NOTREACHED*/
}
- /* revoke privilege */
- seteuid(getuid());
- setuid(getuid());
-
/* dump the current pid */
if (!once) {
pid_t pid = getpid();
@@ -315,6 +311,10 @@ main(int argc, char **argv)
}
}
+ /* revoke privilege */
+ seteuid(getuid());
+ setuid(getuid());
+
#ifndef HAVE_POLL_H
memset(fdsetp, 0, fdmasks);
FD_SET(s, fdsetp);

0 comments on commit d6f8f8e

Please sign in to comment.