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.
|
# Make a few setuid programs work.
|
||||||
PATH=@systemPath@/bin:@systemPath@/sbin:$PATH
|
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@
|
wrapperDir=@wrapperDir@
|
||||||
if test -d $wrapperDir; then rm -f $wrapperDir/*; fi
|
if test -d $wrapperDir; then rm -f $wrapperDir/*; fi
|
||||||
mkdir -p $wrapperDir
|
mkdir -p $wrapperDir
|
||||||
@ -149,6 +155,7 @@ for i in @setuidPrograms@; do
|
|||||||
chmod 4755 $wrapperDir/$i
|
chmod 4755 $wrapperDir/$i
|
||||||
done
|
done
|
||||||
|
|
||||||
|
PATH="$save_PATH"
|
||||||
|
|
||||||
# Set the host name. Don't clear it if it's not configured in the
|
# 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
|
# NixOS configuration, since it may have been set by dhclient in the
|
||||||
|
@ -302,16 +302,7 @@ rec {
|
|||||||
pkgs.coreutils pkgs.gnugrep pkgs.findutils
|
pkgs.coreutils pkgs.gnugrep pkgs.findutils
|
||||||
pkgs.glibc # needed for getent
|
pkgs.glibc # needed for getent
|
||||||
pkgs.pwdutils
|
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;
|
bash = pkgs.bashInteractive;
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user