[quagga-dev,15972] config: Give the option of disabling run as user/group

Message ID 1469734880-14922-1-git-send-email-jafar@atcorp.com
State Under Review
Headers show

Commit Message

Jafar Al-Gharaibeh July 28, 2016, 7:41 p.m.
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>
---
 configure.ac | 24 ++++++++++++++----------
 1 file changed, 14 insertions(+), 10 deletions(-)

Comments

Jafar Al-Gharaibeh July 28, 2016, 7:47 p.m. | #1
Martin,

   Please let me know how it goes this time if you get a chance to test 
this.
  I made sure to test all possible configurations this time. :)

Thanks,
Jafar

On 7/28/2016 2:41 PM, Jafar Al-Gharaibeh wrote:
> 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>
> ---
>   configure.ac | 24 ++++++++++++++----------
>   1 file changed, 14 insertions(+), 10 deletions(-)
>
> diff --git a/configure.ac b/configure.ac
> index 6206510..00c11dc 100755
> --- a/configure.ac
> +++ b/configure.ac
> @@ -349,16 +349,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
> @@ -371,8 +377,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)
cisystem@netdef.org July 28, 2016, 9:55 p.m. | #2
Continous Integration Result: FAILED

See below for issues.
This is an EXPERIMENTAL automated CI system.
For questions and feedback, feel free to email
Martin Winter <mwinter@opensourcerouting.org>.

Patches applied :
  Patchwork 2027: http://patchwork.quagga.net/patch/2027
       [quagga-dev,15972] config: Give the option of disabling run as user/group
Tested on top of Git : 5f67888 (as of 20160429.234845 UTC)
CI System Testrun URL: https://ci1.netdef.org/browse/QUAGGA-QPWORK-340/


Get source and apply patch from patchwork: Successful
----------------

Building Stage: Failed
----------------
OmniOS amd64 build: Successful
Openbsd58 amd64 build: Successful
Debian8 amd64 build: Successful
Ubuntu1404 amd64 build: Successful
Ubuntu1204 amd64 build: Successful
NetBSD7 amd64 build: Successful
FreeBSD10 amd64 build: Successful
FreeBSD9 amd64 build: Successful
CentOS7 amd64 build: Successful
NetBSD6 amd64 build: Successful
FreeBSD8 amd64 build: Successful

CentOS6 amd64 build: No useful log found

Regards,
  NetDEF/OpenSourceRouting Continous Integration (CI) System

---
OpenSourceRouting.org is a project of the Network Device Education Foundation,
For more information, see www.netdef.org and www.opensourcerouting.org
For questions in regards to this CI System, contact Martin Winter, mwinter@netdef.org
Martin Winter July 28, 2016, 10 p.m. | #3
Ignore… the failure here was not because of the patch, but the build 
system itself.

Real report will follow yup in approx 1hr. (Rerunning now)

- Martin

On 28 Jul 2016, at 14:55, cisystem@netdef.org wrote:

> Continous Integration Result: FAILED
>
> See below for issues.
> This is an EXPERIMENTAL automated CI system.
> For questions and feedback, feel free to email
> Martin Winter <mwinter@opensourcerouting.org>.
>
> Patches applied :
>   Patchwork 2027: http://patchwork.quagga.net/patch/2027
>        [quagga-dev,15972] config: Give the option of disabling run as 
> user/group
> Tested on top of Git : 5f67888 (as of 20160429.234845 UTC)
> CI System Testrun URL: 
> https://ci1.netdef.org/browse/QUAGGA-QPWORK-340/
>
>
> Get source and apply patch from patchwork: Successful
> ----------------
>
> Building Stage: Failed
> ----------------
> OmniOS amd64 build: Successful
> Openbsd58 amd64 build: Successful
> Debian8 amd64 build: Successful
> Ubuntu1404 amd64 build: Successful
> Ubuntu1204 amd64 build: Successful
> NetBSD7 amd64 build: Successful
> FreeBSD10 amd64 build: Successful
> FreeBSD9 amd64 build: Successful
> CentOS7 amd64 build: Successful
> NetBSD6 amd64 build: Successful
> FreeBSD8 amd64 build: Successful
>
> CentOS6 amd64 build: No useful log found
>
> Regards,
>   NetDEF/OpenSourceRouting Continous Integration (CI) System
>
> ---
> OpenSourceRouting.org is a project of the Network Device Education 
> Foundation,
> For more information, see www.netdef.org and www.opensourcerouting.org
> For questions in regards to this CI System, contact Martin Winter, 
> mwinter@netdef.org
cisystem@netdef.org July 28, 2016, 10:40 p.m. | #4
Continous Integration Result: SUCCESSFUL

Congratulations, this patch passed basic tests

Tested-by: NetDEF CI System <cisystem@netdef.org>

This is an EXPERIMENTAL automated CI system.
For questions and feedback, feel free to email
Martin Winter <mwinter@opensourcerouting.org>.

Patches applied :
  Patchwork 2027: http://patchwork.quagga.net/patch/2027
       [quagga-dev,15972] config: Give the option of disabling run as user/group
Tested on top of Git : 5f67888 (as of 20160429.234845 UTC)
CI System Testrun URL: https://ci1.netdef.org/browse/QUAGGA-QPWORK-340/


Regards,
  NetDEF/OpenSourceRouting Continous Integration (CI) System

---
OpenSourceRouting.org is a project of the Network Device Education Foundation,
For more information, see www.netdef.org and www.opensourcerouting.org
For questions in regards to this CI System, contact Martin Winter, mwinter@netdef.org

Patch hide | download patch | download mbox

diff --git a/configure.ac b/configure.ac
index 6206510..00c11dc 100755
--- a/configure.ac
+++ b/configure.ac
@@ -349,16 +349,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
@@ -371,8 +377,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)