capability: add new ambient_capabilities_supported() helper

This new function reports whether ambient caps are available, and should
be quick because the result is cached.
This commit is contained in:
Lennart Poettering
2017-08-10 15:02:50 +02:00
parent 6067611a08
commit 39f608e4b0
3 changed files with 19 additions and 0 deletions
+2
View File
@@ -55,3 +55,5 @@ static inline bool cap_test_all(uint64_t caps) {
m = (UINT64_C(1) << (cap_last_cap() + 1)) - 1;
return (caps & m) == m;
}
bool ambient_capabilities_supported(void);