summaryrefslogtreecommitdiff
path: root/ripngd
diff options
context:
space:
mode:
authorhasso <hasso>2004-11-25 19:33:48 +0000
committerhasso <hasso>2004-11-25 19:33:48 +0000
commitc065230a4c617a1cdf8813dd25384bcc9591f61a (patch)
tree42285fe5604e43ada3b53ac9a77ba1e3c4464b52 /ripngd
parentaccb156b9b1c3f4b46ab01f8850200f450fc40d8 (diff)
Make group to run daemon as configurable. Fixes #2 from Bugzilla #64.
Diffstat (limited to 'ripngd')
-rw-r--r--ripngd/ChangeLog4
-rw-r--r--ripngd/ripng_main.c15
2 files changed, 14 insertions, 5 deletions
diff --git a/ripngd/ChangeLog b/ripngd/ChangeLog
index 78dc1d37..1abea564 100644
--- a/ripngd/ChangeLog
+++ b/ripngd/ChangeLog
@@ -1,3 +1,7 @@
+2004-11-25 Hasso Tepper <hasso at quagga.net>
+
+ * ripng_main.c: Make group to run as configurable.
+
2004-10-26 Hasso Tepper <hasso at quagga.net>
* ripng_debug.c: Fix help of "show debugging ripng" command.
diff --git a/ripngd/ripng_main.c b/ripngd/ripng_main.c
index 40d2b146..df609a56 100644
--- a/ripngd/ripng_main.c
+++ b/ripngd/ripng_main.c
@@ -53,6 +53,7 @@ struct option longopts[] =
{ "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 }
};
@@ -115,7 +116,8 @@ Daemon which manages RIPng.\n\n\
-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 ripngd.\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\
@@ -203,7 +205,7 @@ main (int argc, char **argv)
{
int opt;
- opt = getopt_long (argc, argv, "dlf:i:hA:P:u:v", longopts, 0);
+ opt = getopt_long (argc, argv, "dlf:i:hA:P:u:g:v", longopts, 0);
if (opt == EOF)
break;
@@ -241,9 +243,12 @@ main (int argc, char **argv)
case 'r':
retain_mode = 1;
break;
- case 'u':
- ripngd_privs.group = ripngd_privs.user = optarg;
- break;
+ case 'u':
+ ripngd_privs.user = optarg;
+ break;
+ case 'g':
+ ripngd_privs.group = optarg;
+ break;
case 'v':
print_version (progname);
exit (0);