]> git.puffer.fish Git - matthieu/frr.git/commitdiff
config: Give the option of disabling run as user/group
authorJafar Al-Gharaibeh <jafar@atcorp.com>
Thu, 28 Jul 2016 19:41:20 +0000 (14:41 -0500)
committerDonald Sharp <sharpd@cumulusnetwroks.com>
Sat, 3 Sep 2016 11:32:57 +0000 (07:32 -0400)
Leave "user/group" unset when explicitly configuring with
"--disable-user" / "--enable-user=no" and
"--disable-group" / "--enable-group=no"
This allows quagga to skip unsupported system calls such
as setuid() on certain platfroms.

Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
Tested-by: NetDEF CI System <cisystem@netdef.org>
configure.ac

index 35a40356ddbdaa03fbd71ee1e43b2570357fe196..edd77b2b8ae22341573f2a1ed2fb89a31bea7e28 100755 (executable)
@@ -406,16 +406,22 @@ AC_SUBST(ISIS_TOPOLOGY_INCLUDES)
 AC_SUBST(ISIS_TOPOLOGY_DIR)
 AC_SUBST(ISIS_TOPOLOGY_LIB)
 
-if test "${enable_user}" = "yes" || test x"${enable_user}" = x""; then
-  enable_user="quagga"
-elif test "${enable_user}" = "no"; then
-  enable_user="root"
+if test x"${enable_user}" = x"no"; then
+  enable_user=""
+else
+  if test x"${enable_user}" = x"yes" || test x"${enable_user}" = x""; then
+    enable_user="quagga"
+  fi
+  AC_DEFINE_UNQUOTED(QUAGGA_USER, "${enable_user}", Quagga User)
 fi
 
-if test "${enable_group}" = "yes" || test x"${enable_group}" = x""; then
-  enable_group="quagga"
-elif test "${enable_group}" = "no"; then
-  enable_group="root"
+if test x"${enable_group}" = x"no"; then
+  enable_group=""
+else
+  if test x"${enable_group}" = x"yes" || test x"${enable_group}" = x""; then
+    enable_group="quagga"
+  fi
+  AC_DEFINE_UNQUOTED(QUAGGA_GROUP, "${enable_group}", Quagga Group)
 fi
 
 if test x"${enable_vty_group}" = x"yes" ; then
@@ -428,8 +434,6 @@ fi
 AC_SUBST([enable_user])
 AC_SUBST([enable_group])
 AC_SUBST([enable_vty_group])
-AC_DEFINE_UNQUOTED(QUAGGA_USER, "${enable_user}", Quagga User)
-AC_DEFINE_UNQUOTED(QUAGGA_GROUP, "${enable_group}", Quagga Group)
 
 enable_configfile_mask=${enable_configfile_mask:-0600}
 AC_DEFINE_UNQUOTED(CONFIGFILE_MASK, ${enable_configfile_mask}, Mask for config files)