From a63a80d46411c291373ad21fe7d4dc76b74ede4d Mon Sep 17 00:00:00 2001 From: Bernhard B Date: Fri, 8 Jan 2021 19:12:32 +0100 Subject: [PATCH] fix "setpriv: libcap-ng is too old for 'all' caps" error query available capabilities instead of using "all" caps, as this fails with kernel 5.9.0 see #46 --- entrypoint.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/entrypoint.sh b/entrypoint.sh index 1439eb8f..f1e69a76 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -12,5 +12,8 @@ echo "WARNING: signal-cli-rest-api runs as signal-api (not as root!)" echo "Run 'su signal-api' before using signal-cli!" EOF +cap_prefix="-cap_" +caps="$cap_prefix$(seq -s ",$cap_prefix" 0 $(cat /proc/sys/kernel/cap_last_cap))" + # Start API as signal-api user -exec setpriv --reuid=1000 --regid=1000 --init-groups --inh-caps=-all signal-cli-rest-api $@ +exec setpriv --reuid=1000 --regid=1000 --init-groups --inh-caps=$caps signal-cli-rest-api $@