mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-10 23:13:56 +00:00
activate-configuration: Look for setuid executables in the default profile.
svn path=/nixos/trunk/; revision=11202
This commit is contained in:
parent
3a973ab55c
commit
79ffaeb2e7
@ -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
|
||||
|
@ -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;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user