summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJafar Al-Gharaibeh <jafar@atcorp.com>2016-07-28 14:41:20 -0500
committerDonald Sharp <sharpd@cumulusnetwroks.com>2016-09-03 07:32:57 -0400
commit0b02a1b49b3dbde83b58a641b146fef70a4497fb (patch)
treea0bff4f4df0cac7c42fd9abfa26bc18048c986ad
parent6d128e1d7889924ec6ef5eb897d0ba94fed313db (diff)
config: Give the option of disabling run as user/group
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>
-rwxr-xr-xconfigure.ac24
1 files changed, 14 insertions, 10 deletions
diff --git a/configure.ac b/configure.ac
index 35a40356dd..edd77b2b8a 100755
--- a/configure.ac
+++ b/configure.ac
@@ -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)