summaryrefslogtreecommitdiffstats
path: root/usr.sbin/mrouted/mapper.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/mrouted/mapper.c')
-rw-r--r--usr.sbin/mrouted/mapper.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/usr.sbin/mrouted/mapper.c b/usr.sbin/mrouted/mapper.c
index 1eacd04..076778f 100644
--- a/usr.sbin/mrouted/mapper.c
+++ b/usr.sbin/mrouted/mapper.c
@@ -1,7 +1,7 @@
/* Mapper for connections between MRouteD multicast routers.
* Written by Pavel Curtis <Pavel@PARC.Xerox.Com>
*
- * $Id: mapper.c,v 3.8 1995/11/29 22:36:57 fenner Rel $
+ * $Id: mapper.c,v 1.6 1996/01/06 21:09:53 peter Exp $
*/
/*
@@ -844,13 +844,16 @@ int main(argc, argv)
{
int flood = FALSE, graph = FALSE;
- setlinebuf(stderr);
-
if (geteuid() != 0) {
- fprintf(stderr, "must be root\n");
+ fprintf(stderr, "map-mbone: must be root\n");
exit(1);
}
+ init_igmp();
+ setuid(getuid());
+
+ setlinebuf(stderr);
+
argv++, argc--;
while (argc > 0 && argv[0][0] == '-') {
switch (argv[0][1]) {
@@ -899,8 +902,6 @@ int main(argc, argv)
if (debug)
fprintf(stderr, "Debug level %u\n", debug);
- init_igmp();
-
{ /* Find a good local address for us. */
int udp;
struct sockaddr_in addr;
OpenPOWER on IntegriCloud