forked from Mirror/frr
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>
This commit is contained in:
parent
6d128e1d78
commit
0b02a1b49b
24
configure.ac
24
configure.ac
|
@ -406,16 +406,22 @@ AC_SUBST(ISIS_TOPOLOGY_INCLUDES)
|
||||||
AC_SUBST(ISIS_TOPOLOGY_DIR)
|
AC_SUBST(ISIS_TOPOLOGY_DIR)
|
||||||
AC_SUBST(ISIS_TOPOLOGY_LIB)
|
AC_SUBST(ISIS_TOPOLOGY_LIB)
|
||||||
|
|
||||||
if test "${enable_user}" = "yes" || test x"${enable_user}" = x""; then
|
if test x"${enable_user}" = x"no"; then
|
||||||
enable_user="quagga"
|
enable_user=""
|
||||||
elif test "${enable_user}" = "no"; then
|
else
|
||||||
enable_user="root"
|
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
|
fi
|
||||||
|
|
||||||
if test "${enable_group}" = "yes" || test x"${enable_group}" = x""; then
|
if test x"${enable_group}" = x"no"; then
|
||||||
enable_group="quagga"
|
enable_group=""
|
||||||
elif test "${enable_group}" = "no"; then
|
else
|
||||||
enable_group="root"
|
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
|
fi
|
||||||
|
|
||||||
if test x"${enable_vty_group}" = x"yes" ; then
|
if test x"${enable_vty_group}" = x"yes" ; then
|
||||||
|
@ -428,8 +434,6 @@ fi
|
||||||
AC_SUBST([enable_user])
|
AC_SUBST([enable_user])
|
||||||
AC_SUBST([enable_group])
|
AC_SUBST([enable_group])
|
||||||
AC_SUBST([enable_vty_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}
|
enable_configfile_mask=${enable_configfile_mask:-0600}
|
||||||
AC_DEFINE_UNQUOTED(CONFIGFILE_MASK, ${enable_configfile_mask}, Mask for config files)
|
AC_DEFINE_UNQUOTED(CONFIGFILE_MASK, ${enable_configfile_mask}, Mask for config files)
|
||||||
|
|
Loading…
Reference in a new issue