In https://git.kernel.org/pub/scm/libs/libcap/libcap.git/commit/?id=
8a2ac848a2065641e20a8b50384b68e8781cc6fc,
the default output format of getpcaps command was changed.
ts_skip_capability() assumes only the newer format, a format
introduced in the commit.
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
# On Fedora, libcap package provides getpcaps command.
ts_check_prog "getpcaps"
- local caps=$(getpcaps "$self")
- if [[ "$caps" == "${self}: =ep" ]]; then
+ local caps=$(getpcaps "$self" 2>&1)
+ if [[ "$caps" == "${self}: =ep" || "$caps" == 'Capabilities for `'"${self}': =ep" ]]; then
return 0
fi