summaryrefslogtreecommitdiff
path: root/ripd
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 /ripd
parentaccb156b9b1c3f4b46ab01f8850200f450fc40d8 (diff)
Make group to run daemon as configurable. Fixes #2 from Bugzilla #64.
Diffstat (limited to 'ripd')
-rw-r--r--ripd/ChangeLog4
-rw-r--r--ripd/rip_main.c15
2 files changed, 14 insertions, 5 deletions
diff --git a/ripd/ChangeLog b/ripd/ChangeLog
index 8618cb6f..3ca7d181 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 bc251599..d545a8ec 100644
--- a/ripd/rip_main.c
+++ b/ripd/rip_main.c
@@ -46,6 +46,7 @@ static 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 }
};
@@ -110,7 +111,8 @@ Daemon which manages RIP version 1 and 2.\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 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 @@ main (int argc, char **argv)
{
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 @@ main (int argc, char **argv)
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);