Make group to run daemon as configurable. Fixes #2 from Bugzilla #64.
diff --git a/ripd/ChangeLog b/ripd/ChangeLog
index 8618cb6..3ca7d18 100644
--- a/ripd/ChangeLog
+++ b/ripd/ChangeLog
@@ -1,3 +1,7 @@
+2004-11-25 Hasso Tepper <hasso at quagga.net>
+
+	* rip_main.c: Make group to run as configurable.
+
 2004-10-22 Paul Jakma <paul@dishone.st>
 
 	* ripd.c: Collapse redundant passing of various address structs,
diff --git a/ripd/rip_main.c b/ripd/rip_main.c
index bc25159..d545a8e 100644
--- a/ripd/rip_main.c
+++ b/ripd/rip_main.c
@@ -46,6 +46,7 @@
   { "vty_port",    required_argument, NULL, 'P'},
   { "retain",      no_argument,       NULL, 'r'},
   { "user",        required_argument, NULL, 'u'},
+  { "group",       required_argument, NULL, 'g'},
   { "version",     no_argument,       NULL, 'v'},
   { 0 }
 };
@@ -110,7 +111,8 @@
 -A, --vty_addr     Set vty's bind address\n\
 -P, --vty_port     Set vty's port number\n\
 -r, --retain       When program terminates, retain added route by ripd.\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\
@@ -201,7 +203,7 @@
     {
       int opt;
 
-      opt = getopt_long (argc, argv, "df:i:hA:P:u:rv", longopts, 0);
+      opt = getopt_long (argc, argv, "df:i:hA:P:u:g:rv", longopts, 0);
     
       if (opt == EOF)
 	break;
@@ -236,9 +238,12 @@
 	case 'r':
 	  retain_mode = 1;
 	  break;
-    case 'u':
-        ripd_privs.group = ripd_privs.user = optarg;
-        break;
+	case 'u':
+	  ripd_privs.user = optarg;
+	  break;
+	case 'g':
+	  ripd_privs.group = optarg;
+	  break;
 	case 'v':
 	  print_version (progname);
 	  exit (0);