mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-26 12:53:59 +03:00
security-wrapper: link old wrapper dir to new one
This makes setuid wrappers not fail after upgrading. references #23641, #22914, #19862, #16654
This commit is contained in:
parent
45f486f096
commit
e82baf043e
@ -179,21 +179,31 @@ in
|
|||||||
|
|
||||||
# Remove the old /var/setuid-wrappers path from the system...
|
# Remove the old /var/setuid-wrappers path from the system...
|
||||||
#
|
#
|
||||||
# TODO: this is only necessary for ugprades 16.09 => 17.x;
|
# TODO: this is only necessary for upgrades 16.09 => 17.x;
|
||||||
# this conditional removal block needs to be removed after
|
# this conditional removal block needs to be removed after
|
||||||
# the release.
|
# the release.
|
||||||
if [ -d /var/setuid-wrappers ]; then
|
if [ -d /var/setuid-wrappers ]; then
|
||||||
rm -rf /var/setuid-wrappers
|
rm -rf /var/setuid-wrappers
|
||||||
|
ln -s /run/wrappers/bin /var/setuid-wrappers
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Remove the old /run/setuid-wrappers-dir path from the
|
# Remove the old /run/setuid-wrappers-dir path from the
|
||||||
# system as well...
|
# system as well...
|
||||||
#
|
#
|
||||||
# TODO: this is only necessary for ugprades 16.09 => 17.x;
|
# TODO: this is only necessary for upgrades 16.09 => 17.x;
|
||||||
# this conditional removal block needs to be removed after
|
# this conditional removal block needs to be removed after
|
||||||
# the release.
|
# the release.
|
||||||
if [ -d /run/setuid-wrapper-dirs ]; then
|
if [ -d /run/setuid-wrapper-dirs ]; then
|
||||||
rm -rf /run/setuid-wrapper-dirs
|
rm -rf /run/setuid-wrapper-dirs
|
||||||
|
ln -s /run/wrappers/bin /run/setuid-wrapper-dirs
|
||||||
|
fi
|
||||||
|
|
||||||
|
# TODO: this is only necessary for upgrades 16.09 => 17.x;
|
||||||
|
# this conditional removal block needs to be removed after
|
||||||
|
# the release.
|
||||||
|
if readlink -f /run/booted-system | grep nixos-17 > /dev/null; then
|
||||||
|
rm -rf /run/setuid-wrapper-dirs
|
||||||
|
rm -rf /var/setuid-wrappers
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# We want to place the tmpdirs for the wrappers to the parent dir.
|
# We want to place the tmpdirs for the wrappers to the parent dir.
|
||||||
|
Loading…
Reference in New Issue
Block a user