]> git.puffer.fish Git - matthieu/frr.git/commitdiff
Make group to run daemon as configurable. Fixes #2 from Bugzilla #64.
authorhasso <hasso>
Thu, 25 Nov 2004 19:33:48 +0000 (19:33 +0000)
committerhasso <hasso>
Thu, 25 Nov 2004 19:33:48 +0000 (19:33 +0000)
22 files changed:
bgpd/ChangeLog
bgpd/bgp_main.c
doc/ChangeLog
doc/bgpd.8
doc/isisd.8
doc/ospf6d.8
doc/ospfd.8
doc/ripd.8
doc/ripngd.8
doc/zebra.8
isisd/ChangeLog
isisd/isis_main.c
ospf6d/ChangeLog
ospf6d/ospf6_main.c
ospfd/ChangeLog
ospfd/ospf_main.c
ripd/ChangeLog
ripd/rip_main.c
ripngd/ChangeLog
ripngd/ripng_main.c
zebra/ChangeLog
zebra/main.c

index 0e767dec7daaf1e9ae4417bbc7bf6a711a61e3cd..64b229cf2d7dbde3a00b57a70e8edf33a9e0cb22 100644 (file)
@@ -1,3 +1,7 @@
+2004-11-25 Hasso Tepper <hasso at quagga.net>
+
+       * bgp_main.c: Make group to run as configurable.
+
 2004-11-09 Paul Jakma <paul@dishone.st>
 
        * bgp_nexthop.c: collapse bgp_connected_ipvX, bgp_nexthop_cache_ipvX
index 612013e263cbe432bfedcdbb53efbc9db7d0c274..1d6710fdbb894b985f36c9b48e078d642c7d3da0 100644 (file)
@@ -48,6 +48,7 @@ struct option longopts[] =
   { "retain",      no_argument,       NULL, 'r'},
   { "no_kernel",   no_argument,       NULL, 'n'},
   { "user",        required_argument, NULL, 'u'},
+  { "group",       required_argument, NULL, 'g'},
   { "version",     no_argument,       NULL, 'v'},
   { "help",        no_argument,       NULL, 'h'},
   { 0 }
@@ -137,7 +138,8 @@ redistribution between different routing protocols.\n\n\
 -P, --vty_port     Set vty's port number\n\
 -r, --retain       When program terminates, retain added route by bgpd.\n\
 -n, --no_kernel    Do not install route to kernel.\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\
@@ -212,7 +214,7 @@ main (int argc, char **argv)
   /* Command line argument treatment. */
   while (1) 
     {
-      opt = getopt_long (argc, argv, "df:i:hp:A:P:rnu:v", longopts, 0);
+      opt = getopt_long (argc, argv, "df:i:hp:A:P:rnu:g:v", longopts, 0);
     
       if (opt == EOF)
        break;
@@ -253,9 +255,12 @@ main (int argc, char **argv)
        case 'n':
          bgp_option_set (BGP_OPT_NO_FIB);
          break;
-  case 'u':
-    bgpd_privs.user = bgpd_privs.group = optarg;
-    break;
+       case 'u':
+         bgpd_privs.user = optarg;
+         break;
+       case 'g':
+         bgpd_privs.group = optarg;
+         break;
        case 'v':
          print_version (progname);
          exit (0);
index 48f78c1798ee9a6c9e56470d6a70b8057fbd9c6b..6afe5a3d2061fffc45cb46420429a7702abf083d 100644 (file)
@@ -1,3 +1,8 @@
+2004-11-25 Hasso Tepper <hasso at quagga.net>
+
+       * *.8: Document -g/--group command line switch and some small
+         cosmetical changes.
+
 2004-11-22 Paul Jakma <paul@dishone.st>
 
        * bgpd.8: escape -/+ signs, reported by ESR to bug-zebra.
index 736250e11ab8302b09546d0a6871a3048f0d747c..e6f5bc651878778afc2e9de8eed9854cde7684a1 100644 (file)
@@ -1,4 +1,4 @@
-.TH BGPD 8 "10 August 2004" "Quagga BGPD daemon" "Version 0.96.5"
+.TH BGPD 8 "25 November 2004" "Quagga BGPD daemon" "Version 0.97.3"
 .SH NAME
 bgpd \- a BGPv4, BGPv4\+, BGPv4\- routing engine for use with Quagga routing
 software
@@ -17,9 +17,6 @@ software
 .B \-p
 .I bgp-port-number
 ] [
-.B \--bgp_port=
-.I port-number
-] [
 .B \-P
 .I port-number
 ] [
@@ -28,6 +25,9 @@ software
 ] [
 .B \-u
 .I user
+] [
+.B \-g
+.I group
 ]
 .SH DESCRIPTION
 .B bgpd 
@@ -46,6 +46,9 @@ Runs in daemon mode, forking and exiting from tty.
 Specifies the config file to use for startup. If not specified this
 option will likely default to \fB\fI/usr/local/etc/bgpd.conf\fR.
 .TP
+\fB\-g\fR, \fB\-\-group \fR\fIgroup\fR
+Specify the group to run as. Default is \fIquagga\fR.
+.TP
 \fB\-h\fR, \fB\-\-help\fR
 A brief message.
 .TP
@@ -54,7 +57,7 @@ When bgpd starts its process idenifier is written to
 \fB\fIpid-file\fR.  The init system uses the recorded PID to stop or
 restart bgpd.  The likely default is \fB\fI/var/run/bgpd.pid\fR.
 .TP
-\fB\-p\fR, \fB\-\-bgp_port=\fR\fIport\fR
+\fB\-p\fR, \fB\-\-bgp_port \fR\fIbgp-port-number\fR
 Set the port that bgpd will listen to for bgp data.  
 .TP
 \fB\-P\fR, \fB\-\-vty_port \fR\fIport-number\fR 
@@ -66,8 +69,7 @@ Specify the address that the bgpd VTY will listen on. Default is all
 intrefaces.
 .TP
 \fB\-u\fR, \fB\-\-user \fR\fIuser\fR
-Specify the user and group to run as. User and group have to have same
-name at the moment. Default is \fIquagga\fR.
+Specify the user to run as. Default is \fIquagga\fR.
 .TP
 \fB\-r\fR, \fB\-\-retain\fR 
 When the program terminates, retain routes added by \fBbgpd\fR.
index 9e33f7c940e5d30c6184bd115cd3efab7f9c12b6..7ae7dbaf38cd963b8313a7930a7722f94302146a 100644 (file)
@@ -1,4 +1,4 @@
-.TH IS-IS 8 "10 August 2004" "Quagga IS-IS daemon" "Version 0.96.5"
+.TH IS-IS 8 "25 November 2004" "Quagga IS-IS daemon" "Version 0.97.3"
 .SH NAME
 isisd \- an IS-IS routing engine for use with Quagga routing software.
 .SH SYNOPSIS
@@ -20,6 +20,9 @@ isisd \- an IS-IS routing engine for use with Quagga routing software.
 ] [
 .B \-u
 .I user
+] [
+.B \-g
+.I group
 ]
 .SH DESCRIPTION
 .B isisd
@@ -38,6 +41,9 @@ Runs in daemon mode, forking and exiting from tty.
 Specifies the config file to use for startup. If not specified this
 option will likely default to \fB\fI/usr/local/etc/isisd.conf\fR.
 .TP
+\fB\-g\fR, \fB\-\-group \fR\fIgroup\fR
+Specify the group to run as. Default is \fIquagga\fR.
+.TP
 \fB\-h\fR, \fB\-\-help\fR
 A brief message.
 .TP
@@ -55,8 +61,7 @@ Specify the address that the isisd VTY will listen on. Default is all
 intrefaces.
 .TP
 \fB\-u\fR, \fB\-\-user \fR\fIuser\fR
-Specify the user and group to run as. User and group have to have same
-name at the moment. Default is \fIquagga\fR.
+Specify the user to run as. Default is \fIquagga\fR.
 .TP
 \fB\-v\fR, \fB\-\-version\fR
 Print the version and exit.
index 275844b8c5acabe6f9b3ec85611bead7d2a27d21..2266fffe133936548e813d54508a0e310858b102 100644 (file)
@@ -1,4 +1,4 @@
-.TH OSPF6D 8 "10 August 2004" "Quagga OSPFv3 daemon" "Version 0.96.5"
+.TH OSPF6D 8 "25 November 2004" "Quagga OSPFv3 daemon" "Version 0.97.3"
 .SH NAME
 ospf6d \- an OSPFv3 routing engine for use with Quagga routing software.
 .SH SYNOPSIS
@@ -20,6 +20,9 @@ ospf6d \- an OSPFv3 routing engine for use with Quagga routing software.
 ] [
 .B \-u
 .I user
+] [
+.B \-g
+.I group
 ]
 .SH DESCRIPTION
 .B ospf6d
@@ -39,6 +42,9 @@ Runs in daemon mode, forking and exiting from tty.
 Specifies the config file to use for startup. If not specified this
 option will likely default to \fB\fI/usr/local/etc/ospf6d.conf\fR.
 .TP
+\fB\-g\fR, \fB\-\-group \fR\fIgroup\fR
+Specify the group to run as. Default is \fIquagga\fR.
+.TP
 \fB\-h\fR, \fB\-\-help\fR
 A brief message.
 .TP
@@ -56,8 +62,7 @@ Specify the address that the ospf6d VTY will listen on. Default is all
 intrefaces.
 .TP
 \fB\-u\fR, \fB\-\-user \fR\fIuser\fR
-Specify the user and group to run as. User and group have to have same
-name at the moment. Default is \fIquagga\fR.
+Specify the user to run as. Default is \fIquagga\fR.
 .TP
 \fB\-v\fR, \fB\-\-version\fR
 Print the version and exit.
index af5a83ab9368f48d85e3082b9020670fdce6484c..c6c1857fd57d371d2851674c235ca508b4d5c7f5 100644 (file)
@@ -1,4 +1,4 @@
-.TH OSPFD 8 "10 August 2004" "Quagga OSPFv2 daemon" "Version 0.96.5"
+.TH OSPFD 8 "25 November 2004" "Quagga OSPFv2 daemon" "Version 0.97.3"
 .SH NAME
 ospfd \- an OSPFv2 routing engine for use with Quagga routing software.
 .SH SYNOPSIS
@@ -20,6 +20,9 @@ ospfd \- an OSPFv2 routing engine for use with Quagga routing software.
 ] [
 .B \-u
 .I user
+] [
+.B \-g
+.I group
 ]
 .SH DESCRIPTION
 .B ospfd
@@ -38,6 +41,9 @@ Runs in daemon mode, forking and exiting from tty.
 Specifies the config file to use for startup. If not specified this
 option will likely default to \fB\fI/usr/local/etc/ospfd.conf\fR.
 .TP
+\fB\-g\fR, \fB\-\-group \fR\fIgroup\fR
+Specify the group to run as. Default is \fIquagga\fR.
+.TP
 \fB\-h\fR, \fB\-\-help\fR
 A brief message.
 .TP
@@ -58,8 +64,7 @@ Specify the address that the ospfd VTY will listen on. Default is all
 intrefaces.
 .TP
 \fB\-u\fR, \fB\-\-user \fR\fIuser\fR
-Specify the user and group to run as. User and group have to have same
-name at the moment. Default is \fIquagga\fR.
+Specify the user to run as. Default is \fIquagga\fR.
 .TP
 \fB\-a\fR, \fB\-\-apiserver \fR
 Enable OSPF apiserver. Default is disabled.
index 2f38682771c5e05e5a48290ed3ba018073c03ddc..5a9f5fa82d438b1be49d412788a5349f35ee0b74 100644 (file)
@@ -1,4 +1,4 @@
-.TH RIPD 8 "10 August 2004" "Quagga RIP daemon" "Version 0.96.5"
+.TH RIPD 8 "25 November 2004" "Quagga RIP daemon" "Version 0.97.3"
 .SH NAME
 ripd \- a RIP routing engine for use with Quagga routing software.
 .SH SYNOPSIS
@@ -20,6 +20,9 @@ ripd \- a RIP routing engine for use with Quagga routing software.
 ] [
 .B \-u
 .I user
+] [
+.B \-g
+.I group
 ]
 .SH DESCRIPTION
 .B ripd
@@ -36,7 +39,11 @@ command:
 Runs in daemon mode, forking and exiting from tty.
 .TP
 \fB\-f\fR, \fB\-\-config-file \fR\fIconfig-file\fR
-Specifies the config file to use for startup. If not specified this option will likely default to \fB\fI/usr/local/etc/ripd.conf\fR.
+Specifies the config file to use for startup. If not specified this
+option will likely default to \fB\fI/usr/local/etc/ripd.conf\fR.
+.TP
+\fB\-g\fR, \fB\-\-group \fR\fIgroup\fR
+Specify the group to run as. Default is \fIquagga\fR.
 .TP
 \fB\-h\fR, \fB\-\-help\fR
 A brief message.
@@ -55,8 +62,7 @@ Specify the address that the ripd VTY will listen on. Default is all
 intrefaces.
 .TP
 \fB\-u\fR, \fB\-\-user \fR\fIuser\fR
-Specify the user and group to run as. User and group have to have same
-name at the moment. Default is \fIquagga\fR.
+Specify the user to run as. Default is \fIquagga\fR.
 .TP
 \fB\-r\fR, \fB\-\-retain\fR 
 When the program terminates, retain routes added by \fBripd\fR.
index 1dee0bbc630f5f4e06f6fa78ea8deddfd7130523..c45fc3073d5d25831ee2fe4eac824a44fd9785d1 100644 (file)
@@ -1,4 +1,4 @@
-.TH RIPNGD 8 "10 August 2004" "Quagga RIPNG daemon" "Version 0.96.5"
+.TH RIPNGD 8 "25 November 2004" "Quagga RIPNG daemon" "Version 0.97.3"
 .SH NAME
 ripngd \- a RIPNG routing engine for use with Quagga routing software.
 .SH SYNOPSIS
@@ -20,6 +20,9 @@ ripngd \- a RIPNG routing engine for use with Quagga routing software.
 ] [
 .B \-u
 .I user
+] [
+.B \-g
+.I group
 ]
 .SH DESCRIPTION
 .B ripngd
@@ -39,6 +42,9 @@ Runs in daemon mode, forking and exiting from tty.
 Specifies the config file to use for startup. If not specified this
 option will likely default to \fB\fI/usr/local/etc/ripngd.conf\fR.
 .TP
+\fB\-g\fR, \fB\-\-group \fR\fIgroup\fR
+Specify the group to run as. Default is \fIquagga\fR.
+.TP
 \fB\-h\fR, \fB\-\-help\fR
 A brief message.
 .TP
@@ -59,8 +65,7 @@ Specify the address that the ripngd VTY will listen on. Default is all
 intrefaces.
 .TP
 \fB\-u\fR, \fB\-\-user \fR\fIuser\fR
-Specify the user and group to run as. User and group have to have same
-name at the moment. Default is \fIquagga\fR.
+Specify the user to run as. Default is \fIquagga\fR.
 .TP
 \fB\-r\fR, \fB\-\-retain\fR 
 When the program terminates, retain routes added by \fBripd\fR.
index 25cbb36392012761d0538057db10aaaf5021d167..a3f4b1ac0d10c4622124220b810ff2e4d4729f5f 100644 (file)
@@ -1,4 +1,4 @@
-.TH ZEBRA 8 "10 August 2004" "Zebra daemon" "Version 0.96.5"
+.TH ZEBRA 8 "25 November 2004" "Zebra daemon" "Version 0.97.3"
 .SH NAME
 zebra \- a routing manager for use with associated Quagga components.
 .SH SYNOPSIS
@@ -20,6 +20,9 @@ zebra \- a routing manager for use with associated Quagga components.
 ] [
 .B \-u
 .I user
+] [
+.B \-g
+.I group
 ]
 .SH DESCRIPTION
 .B zebra 
@@ -40,7 +43,11 @@ Runs in batch mode, \fBzebra\fR parses its config and exits.
 Runs in daemon mode, forking and exiting from tty.
 .TP
 \fB\-f\fR, \fB\-\-config-file \fR\fIconfig-file\fR
-Specifies the config file to use for startup. If not specified this option will likely default to \fB\fI/usr/local/etc/zebra.conf\fR.
+Specifies the config file to use for startup. If not specified this
+option will likely default to \fB\fI/usr/local/etc/zebra.conf\fR.
+.TP
+\fB\-g\fR, \fB\-\-group \fR\fIgroup\fR
+Specify the group to run as. Default is \fIquagga\fR.
 .TP
 \fB\-h\fR, \fB\-\-help\fR
 A brief message.
@@ -65,8 +72,7 @@ Specify the address that the zebra VTY will listen on. Default is all
 intrefaces.
 .TP
 \fB\-u\fR, \fB\-\-user \fR\fIuser\fR
-Specify the user and group to run as. User and group have to have same
-name at the moment. Default is \fIquagga\fR.
+Specify the user to run as. Default is \fIquagga\fR.
 .TP
 \fB\-r\fR, \fB\-\-retain\fR 
 When the program terminates, retain routes added by \fBzebra\fR.
index 20be060a5723a7b871c4cc5c60fa8f061427533f..9ba86f17688c4c3ea4a5e1436dac61f2f1c89b1c 100644 (file)
@@ -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>.
index 58fe977ecc09afbe0a497e042e95e66f5330dcc8..1bf93f210c3a86f6670e84e40c4528a954536207 100644 (file)
@@ -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);
index 9c884245920c67526f677a4d245e19f03b1dcfeb..27593b3b8e79e0d949f0ab19a83d850324bfb469 100644 (file)
@@ -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, 
index 95086f2fba29951b4c3c4cf4b8d5ccd42f7d6b02..4563ece88c581c548026e9e4a7bd9e514358c09e 100644 (file)
@@ -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);
index 11fb3b60f3d47bb0cc49d00470af37ce59427e6e..40e5491f7b21c3b4612209d3e106807454f6a6e4 100644 (file)
@@ -1,3 +1,7 @@
+2004-11-25 Hasso Tepper <hasso at quagga.net>
+
+       * ospf_main.c: Make group to run as configurable.
+
 2004-11-15  Greg Troxel  <gdt@fnord.ir.bbn.com>
 
        * ospf_packet.c (ospf_recv_packet): Assume CMSG_SPACE is present
index 67912d6ad63a409041a58a7c89f970c469f26f15..f560547ff4ef5f1c32b572585b94d699c777dab7 100644 (file)
@@ -87,6 +87,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'},
   { "apiserver",   no_argument,       NULL, 'a'},
   { "version",     no_argument,       NULL, 'v'},
   { 0 }
@@ -119,7 +120,8 @@ Daemon which manages OSPF.\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\
 -a. --apiserver    Enable OSPF apiserver\n\
 -v, --version      Print program version\n\
 -h, --help         Display this help and exit\n\
@@ -215,7 +217,7 @@ main (int argc, char **argv)
     {
       int opt;
 
-      opt = getopt_long (argc, argv, "dlf:i:hA:P:u:av", longopts, 0);
+      opt = getopt_long (argc, argv, "dlf:i:hA:P:u:g:av", longopts, 0);
     
       if (opt == EOF)
        break;
@@ -248,7 +250,10 @@ main (int argc, char **argv)
           vty_port = (vty_port ? vty_port : OSPF_VTY_PORT);
          break;
        case 'u':
-         ospfd_privs.group = ospfd_privs.user = optarg;
+         ospfd_privs.user = optarg;
+         break;
+       case 'g':
+         ospfd_privs.group = optarg;
          break;
 #ifdef SUPPORT_OSPF_API
        case 'a':
index 8618cb6fabb160f4688068b067cc856b5a79982b..3ca7d1815916e801bd160ccd0f55caf3fefd9e88 100644 (file)
@@ -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,
index bc251599e924db44c12078f714a5c8619522cff9..d545a8ecaec591f0064d2f31a1e5e3709df4df69 100644 (file)
@@ -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);
index 78dc1d37155168d20bc74cd76403076f3da04223..1abea5643af99d72b9b8ec6d3a4db2a46ebf0353 100644 (file)
@@ -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.
index 40d2b146479146c241241b43b73529e0c15735cd..df609a56a636206352d1ceb61809fe3f79e64cff 100644 (file)
@@ -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);
index c4e32b8bee3ba4e246b2e417220aa02d3ff121d8..719323171ee60742bdb610e3d4c2fed9ceb555fb 100644 (file)
@@ -2,6 +2,7 @@
 
        * irdp_interface.c: Remove comment from DEFUN, it breaks vtysh because
          it confuses extract.pl.
+       * main.c: Make group to run as configurable.
 
 2004-10-28 Hasso Tepper <hasso at quagga.net>
 
index 72e2c585984d88d7510e6dcff9bc8bdaa6f9915a..42e6bd148b0f586dc190fcbe4fc6133267a05a60 100644 (file)
@@ -79,6 +79,7 @@ struct option longopts[] =
   { "nl-bufsize",  no_argument,       NULL, 's'},
 #endif /* HAVE_NETLINK */
   { "user",        required_argument, NULL, 'u'},
+  { "group",       required_argument, NULL, 'g'},
   { "version",     no_argument,       NULL, 'v'},
   { 0 }
 };
@@ -133,7 +134,8 @@ usage (char *progname, int status)
              "-P, --vty_port     Set vty's port number\n"\
              "-r, --retain       When program terminates, retain added route "\
                                  "by zebra.\n"\
-             "-u, --user         User and group to run as\n", progname);
+             "-u, --user         User to run as\n"\
+             "-g, --group        Group to run as\n", progname);
 #ifdef HAVE_NETLINK
       printf ("-s, --nl-bufsize   Set netlink receive buffer size\n");
 #endif /* HAVE_NETLINK */
@@ -230,9 +232,9 @@ main (int argc, char **argv)
       int opt;
   
 #ifdef HAVE_NETLINK  
-      opt = getopt_long (argc, argv, "bdklf:i:hA:P:ru:vs:", longopts, 0);
+      opt = getopt_long (argc, argv, "bdklf:i:hA:P:ru:g:vs:", longopts, 0);
 #else
-      opt = getopt_long (argc, argv, "bdklf:i:hA:P:ru:v", longopts, 0);
+      opt = getopt_long (argc, argv, "bdklf:i:hA:P:ru:g:v", longopts, 0);
 #endif /* HAVE_NETLINK */
 
       if (opt == EOF)
@@ -281,9 +283,12 @@ main (int argc, char **argv)
          nl_rcvbufsize = atoi (optarg);
          break;
 #endif /* HAVE_NETLINK */
-  case 'u':
-    zserv_privs.user = zserv_privs.group = optarg;
-    break;
+       case 'u':
+         zserv_privs.user = optarg;
+         break;
+       case 'g':
+         zserv_privs.group = optarg;
+         break;
        case 'v':
          print_version (progname);
          exit (0);