aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2004-08-20 15:22:33 +0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2004-08-20 15:22:33 +0000
commite77fbe0fa2f7c2cfaee734dba049f0d8dd3dae15 (patch)
tree614c425a989b33c357387c04155e613db47b7f4a /configure.ac
parent2d35116c13e0c11210cb712f9ce6e8a38058f350 (diff)
* On systems that have the setresuid() and setresgid() system calls to
set the real uid and gid to the effective uid and gid, the Nix binaries can be installed as owned by the Nix user and group instead of root, so no root involvement of any kind is necessary. Linux and FreeBSD have these functions.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac6
1 files changed, 6 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 5dab9847a..2ba8e9238 100644
--- a/configure.ac
+++ b/configure.ac
@@ -151,6 +151,12 @@ if test "$setuid_hack" = "yes"; then
AC_DEFINE(SETUID_HACK, 1, [whether to install Nix setuid])
fi
+AC_CHECK_FUNC(setresuid, [HAVE_SETRESUID=1], [HAVE_SETRESUID=])
+AM_CONDITIONAL(HAVE_SETRESUID, test "$HAVE_SETRESUID" = "1")
+if test "$HAVE_SETRESUID" = "1"; then
+ AC_DEFINE(HAVE_SETRESUID, 1, [whether we have setresuid()])
+fi
+
AC_ARG_WITH(nix-user, AC_HELP_STRING([--with-nix-user=USER],
[user for Nix setuid binaries]),
NIX_USER=$withval, NIX_USER=nix)