set_metadata: cleanup extra version and add file to error output

Change-Id: Id15b243c7b25af12983afd59d09456671f6030fa
This commit is contained in:
bigbiff
2021-02-25 11:56:50 -05:00
parent eaac762814
commit 908ef5d77f
2 changed files with 2 additions and 91 deletions
+2 -2
View File
@@ -36,10 +36,10 @@ static int has_stat = 0;
int tw_get_context(const char* filename) {
if (lgetfilecon(filename, &selinux_context) >= 0) {
printf("tw_get_context got selinux context: %s\n", selinux_context);
printf("tw_get_context got selinux context: %s, file: %s\n", selinux_context, filename);
return 0;
} else {
printf("tw_get_context failed to get selinux context\n");
printf("tw_get_context failed to get selinux context, file %s\n", filename);
selinux_context = NULL;
}
return -1;