mirror of
https://github.com/NixOS/nix
synced 2025-06-25 06:31:14 +02:00
* 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.
This commit is contained in:
parent
2d35116c13
commit
e77fbe0fa2
3 changed files with 32 additions and 8 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue