Make group to run daemon as configurable. Fixes #2 from Bugzilla #64.
diff --git a/isisd/ChangeLog b/isisd/ChangeLog
index 20be060..9ba86f1 100644
--- a/isisd/ChangeLog
+++ b/isisd/ChangeLog
@@ -1,3 +1,7 @@
+2004-11-25 Hasso Tepper <hasso at quagga.net>
+
+ * isis_main.c: Make group to run as configurable.
+
2004-11-24 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
* dict.c: Include "zassert.h" instead of <assert.h>.
diff --git a/isisd/isis_main.c b/isisd/isis_main.c
index 58fe977..1bf93f2 100644
--- a/isisd/isis_main.c
+++ b/isisd/isis_main.c
@@ -79,6 +79,7 @@
{"vty_addr", required_argument, NULL, 'A'},
{"vty_port", required_argument, NULL, 'P'},
{"user", required_argument, NULL, 'u'},
+ {"group", required_argument, NULL, 'g'},
{"version", no_argument, NULL, 'v'},
{"help", no_argument, NULL, 'h'},
{0}
@@ -121,7 +122,8 @@
-i, --pid_file Set process identifier file name\n\
-A, --vty_addr Set vty's bind address\n\
-P, --vty_port Set vty's port number\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\
@@ -234,7 +236,7 @@
/* Command line argument treatment. */
while (1)
{
- opt = getopt_long (argc, argv, "df:i:hA:p:P:u:v", longopts, 0);
+ opt = getopt_long (argc, argv, "df:i:hA:p:P:u:g:v", longopts, 0);
if (opt == EOF)
break;
@@ -267,8 +269,10 @@
vty_port = (vty_port ? vty_port : ISISD_VTY_PORT);
break;
case 'u':
- isisd_privs.user = isisd_privs.group = optarg;
+ isisd_privs.user = optarg;
break;
+ case 'g':
+ isisd_privs.group = optarg;
break;
case 'v':
printf ("ISISd version %s\n", ISISD_VERSION);