Make group to run daemon as configurable. Fixes #2 from Bugzilla #64.
diff --git a/bgpd/ChangeLog b/bgpd/ChangeLog
index 0e767de..64b229c 100644
--- a/bgpd/ChangeLog
+++ b/bgpd/ChangeLog
@@ -1,3 +1,7 @@
+2004-11-25 Hasso Tepper <hasso at quagga.net>
+
+	* bgp_main.c: Make group to run as configurable.
+
 2004-11-09 Paul Jakma <paul@dishone.st>
 
 	* bgp_nexthop.c: collapse bgp_connected_ipvX, bgp_nexthop_cache_ipvX
diff --git a/bgpd/bgp_main.c b/bgpd/bgp_main.c
index 612013e..1d6710f 100644
--- a/bgpd/bgp_main.c
+++ b/bgpd/bgp_main.c
@@ -48,6 +48,7 @@
   { "retain",      no_argument,       NULL, 'r'},
   { "no_kernel",   no_argument,       NULL, 'n'},
   { "user",        required_argument, NULL, 'u'},
+  { "group",       required_argument, NULL, 'g'},
   { "version",     no_argument,       NULL, 'v'},
   { "help",        no_argument,       NULL, 'h'},
   { 0 }
@@ -137,7 +138,8 @@
 -P, --vty_port     Set vty's port number\n\
 -r, --retain       When program terminates, retain added route by bgpd.\n\
 -n, --no_kernel    Do not install route to kernel.\n\
--u, --user         User and group to run as\n\
+-u, --user         User to run as\n\
+-g, --group        Group to run as\n\
 -v, --version      Print program version\n\
 -h, --help         Display this help and exit\n\
 \n\
@@ -212,7 +214,7 @@
   /* Command line argument treatment. */
   while (1) 
     {
-      opt = getopt_long (argc, argv, "df:i:hp:A:P:rnu:v", longopts, 0);
+      opt = getopt_long (argc, argv, "df:i:hp:A:P:rnu:g:v", longopts, 0);
     
       if (opt == EOF)
 	break;
@@ -253,9 +255,12 @@
 	case 'n':
 	  bgp_option_set (BGP_OPT_NO_FIB);
 	  break;
-  case 'u':
-    bgpd_privs.user = bgpd_privs.group = optarg;
-    break;
+	case 'u':
+	  bgpd_privs.user = optarg;
+	  break;
+	case 'g':
+	  bgpd_privs.group = optarg;
+	  break;
 	case 'v':
 	  print_version (progname);
 	  exit (0);