summaryrefslogtreecommitdiffstats
path: root/libtar/util.c
diff options
context:
space:
mode:
Diffstat (limited to 'libtar/util.c')
-rw-r--r--libtar/util.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/libtar/util.c b/libtar/util.c
index f472f38b5..7fb3f51f0 100644
--- a/libtar/util.c
+++ b/libtar/util.c
@@ -15,6 +15,7 @@
#include <stdio.h>
#include <sys/param.h>
#include <errno.h>
+#include <linux/capability.h>
#ifdef STDC_HEADERS
# include <string.h>
@@ -210,3 +211,11 @@ int_to_oct_ex(int64_t num, char *oct, size_t octlen)
}
int_to_oct(num, oct, octlen);
}
+
+void print_caps(struct vfs_cap_data *cap_data) {
+ printf(" magic_etc=%u \n", cap_data->magic_etc);
+ printf(" data[0].permitted=%u \n", cap_data->data[0].permitted);
+ printf(" data[0].inheritable=%u \n", cap_data->data[0].inheritable);
+ printf(" data[1].permitted=%u \n", cap_data->data[1].permitted);
+ printf(" data[1].inheritable=%u \n", cap_data->data[1].inheritable);
+}