Inform with a warn in case SECCOMP gets disabled

This commit is contained in:
Filippo Squillace 2017-06-22 21:38:56 +02:00
parent 9cd13c88f6
commit 4b6fd63cf8
2 changed files with 8 additions and 1 deletions

View file

@ -32,7 +32,7 @@ info "Validating JuNest located in ${JUNEST_HOME}..."
info "Initial JuNest setup..."
echo "Server = ${DEFAULT_MIRROR}" >> /etc/pacman.d/mirrorlist
pacman --noconfirm -Syy
pacman --noconfirm -Syyu
pacman --noconfirm -S grep coreutils
pacman --noconfirm -S $(pacman -Sg base-devel | cut -d ' ' -f 2 | grep -v sudo)
@ -61,3 +61,9 @@ then
$RUN_ROOT_TESTS && tcptraceroute localhost
pacman --noconfirm -Rsn ${aur_package}
fi
# The following ensure that the gpg agent gets killed (if exists)
# otherwise it is not possible to exit from the session
[[ -e /etc/pacman.d/gnupg/S.gpg-agent ]] && gpg-connect-agent -S /etc/pacman.d/gnupg/S.gpg-agent killagent /bye
exit 0

View file

@ -150,6 +150,7 @@ function proot_cmd(){
${PROOT} ${proot_args} "${@}"
elif PROOT_NO_SECCOMP=1 ${PROOT} ${proot_args} "${SH[@]}" "-c" ":"
then
warn "Warn: Proot is not working, disabling SECCOMP instead. Expect the application to run slowly in particular when it uses syscalls intensively."
PROOT_NO_SECCOMP=1 ${PROOT} ${proot_args} "${@}"
else
die "Error: Something went wrong with proot command. Exiting"