Skip to content

Commit

Permalink
fix "setpriv: libcap-ng is too old for 'all' caps" error
Browse files Browse the repository at this point in the history
query available capabilities instead of using "all" caps, as
this fails with kernel 5.9.0

see #46
  • Loading branch information
Bernhard B committed Jan 8, 2021
1 parent 313e87c commit a63a80d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 $@

0 comments on commit a63a80d

Please sign in to comment.