]> granicus.if.org Git - strace/commit
Implement full decoding of 64-bit capabilities
authorDmitry V. Levin <ldv@altlinux.org>
Fri, 5 Dec 2014 00:21:23 +0000 (00:21 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Sat, 6 Dec 2014 03:53:12 +0000 (03:53 +0000)
commit4b9c68b9a3a5297050985b2cbcb74752051edf98
tree944ad5c61b703637cca92ca4b4b5f0c28da4cb36
parentbf7fdfa96eb5d052b0535a6ce0d3179a770830f9
Implement full decoding of 64-bit capabilities

Unlike v1 capabilities which are 32-bit, v2 and v3 are 64-bit, but
before this change only lower 32 capability bits were decoded for
v2 and v3.

* xlat/capabilities1.in: New file.
* capability.c: Define v2/v3 CAP_* constants.
Include xlat/capabilities1.h.
(get_cap_header): New function.
(print_cap_header): Update to use get_cap_header result.
(print_cap_data): Decoder higher capability bits for v2 and v3.
(sys_capget, sys_capset): Use get_cap_header, update print_cap_header
and print_cap_data calls.
* tests/caps.c: New file.
* tests/caps.awk: New file.
* tests/caps.test: New test.
* tests/Makefile.am (CHECK_PROGRAMS): Add caps.
(TESTS): Add caps.test.
(EXTRA_DIST): Add caps.awk.
capability.c
tests/Makefile.am
tests/caps.awk [new file with mode: 0644]
tests/caps.c [new file with mode: 0644]
tests/caps.test [new file with mode: 0755]
xlat/capabilities1.in [new file with mode: 0644]