activate-configuration: Look for setuid executables in the default profile.

svn path=/nixos/trunk/; revision=11202
This commit is contained in:
Ludovic Courtès 2008-03-19 12:34:39 +00:00
parent 3a973ab55c
commit 79ffaeb2e7
2 changed files with 8 additions and 10 deletions

View file

@ -129,6 +129,12 @@ ln -sf /nix/var/nix/manifests /nix/var/nix/gcroots/
# Make a few setuid programs work.
PATH=@systemPath@/bin:@systemPath@/sbin:$PATH
save_PATH="$PATH"
# Add the default profile to the search path for setuid executables.
PATH="/nix/var/nix/profiles/default/sbin:$PATH"
PATH="/nix/var/nix/profiles/default/bin:$PATH"
wrapperDir=@wrapperDir@
if test -d $wrapperDir; then rm -f $wrapperDir/*; fi
mkdir -p $wrapperDir
@ -149,6 +155,7 @@ for i in @setuidPrograms@; do
chmod 4755 $wrapperDir/$i
done
PATH="$save_PATH"
# Set the host name. Don't clear it if it's not configured in the
# NixOS configuration, since it may have been set by dhclient in the

View file

@ -302,16 +302,7 @@ rec {
pkgs.coreutils pkgs.gnugrep pkgs.findutils
pkgs.glibc # needed for getent
pkgs.pwdutils
]
# XXX: Hack to recognize common setuid programs.
++ pkgs.lib.optional (pkgs.lib.any (x: x == "xlock") setuidPrograms)
pkgs.xlockmore
++ pkgs.lib.optional (pkgs.lib.any (x: x == "xscreensaver")
setuidPrograms)
pkgs.xscreensaver
++ pkgs.lib.optional (pkgs.lib.any (x: x == "xlaunch") setuidPrograms)
pkgs.xlaunch;
];
bash = pkgs.bashInteractive;
};