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 /isisd | |
parent | accb156b9b1c3f4b46ab01f8850200f450fc40d8 (diff) |
Make group to run daemon as configurable. Fixes #2 from Bugzilla #64.
Diffstat (limited to 'isisd')
-rw-r--r-- | isisd/ChangeLog | 4 | ||||
-rw-r--r-- | isisd/isis_main.c | 10 |
2 files changed, 11 insertions, 3 deletions
diff --git a/isisd/ChangeLog b/isisd/ChangeLog index 20be060a..9ba86f17 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 58fe977e..1bf93f21 100644 --- a/isisd/isis_main.c +++ b/isisd/isis_main.c @@ -79,6 +79,7 @@ struct option longopts[] = { {"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 @@ Daemon which manages IS-IS routing\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 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 @@ main (int argc, char **argv, char **envp) /* 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 @@ main (int argc, char **argv, char **envp) 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); |