diff options
author | hasso <hasso> | 2004-11-25 19:33:48 +0000 |
---|---|---|
committer | hasso <hasso> | 2004-11-25 19:33:48 +0000 |
commit | c065230a4c617a1cdf8813dd25384bcc9591f61a (patch) | |
tree | 42285fe5604e43ada3b53ac9a77ba1e3c4464b52 /ospf6d | |
parent | accb156b9b1c3f4b46ab01f8850200f450fc40d8 (diff) |
Make group to run daemon as configurable. Fixes #2 from Bugzilla #64.
Diffstat (limited to 'ospf6d')
-rw-r--r-- | ospf6d/ChangeLog | 4 | ||||
-rw-r--r-- | ospf6d/ospf6_main.c | 11 |
2 files changed, 13 insertions, 2 deletions
diff --git a/ospf6d/ChangeLog b/ospf6d/ChangeLog index 9c884245..27593b3b 100644 --- a/ospf6d/ChangeLog +++ b/ospf6d/ChangeLog @@ -1,3 +1,7 @@ +2004-11-25 Hasso Tepper <hasso at quagga.net> + + * ospf6_main.c: Make group to run as configurable. + 2004-11-05 Phil Spagnolo <phillip.a.spagnolo@boeing.com> * ospf6_flood.c: When adding a thread to retransmit an lsa after rxmt_interval, the ospf6d used thread_add_event(). However, diff --git a/ospf6d/ospf6_main.c b/ospf6d/ospf6_main.c index 95086f2f..4563ece8 100644 --- a/ospf6d/ospf6_main.c +++ b/ospf6d/ospf6_main.c @@ -74,6 +74,8 @@ struct option longopts[] = { "pid_file", required_argument, NULL, 'i'}, { "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 } @@ -109,6 +111,8 @@ Daemon which manages OSPF version 3.\n\n\ -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 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\ @@ -191,7 +195,7 @@ main (int argc, char *argv[], char *envp[]) /* Command line argument treatment. */ while (1) { - opt = getopt_long (argc, argv, "df:i:hp:A:P:u:v", longopts, 0); + opt = getopt_long (argc, argv, "df:i:hp:A:P:u:g:v", longopts, 0); if (opt == EOF) break; @@ -224,8 +228,11 @@ main (int argc, char *argv[], char *envp[]) vty_port = (vty_port ? vty_port : OSPF6_VTY_PORT); break; case 'u': - ospf6d_privs.user = ospf6d_privs.group = optarg; + ospf6d_privs.user = optarg; break; + case 'g': + ospf6d_privs.group = optarg; + break; case 'v': print_version (progname); exit (0); |