<snip>
I came accross this in build/tools/fs_config/fs_config.c:char* secontext;if (selabel_lookup(sehnd, &secontext, full_name, ( mode | (is_dir ? S_IFDIR : S_IFREG)))) {secontext = strdup("u:object_r:unlabeled:s0");}printf(" selabel=%s", secontext);free(full_name);freecon(secontext);commit 0eb17d944704b3eb140bb9dded299d3be3aed77eAuthor: Nick Kralevich <nnk@xxxxxxxxxx>I was just poking around at things to figure out what the intent is.I am assuming I have something like /foobar, it will fail on labeling since their is no match. At which pointyou would want to default to the initial sid for file.I was investigating how difficult it would be to not hardcode this value and retrieve it from sepol, which seemslike more work than its worth.
Nick this popped up in a discussion recently. I was wondering if you could shed light on the error path for selabel_loookup() and the conditions
that occur when it takes said path?
Bill
_______________________________________________ Selinux mailing list Selinux@xxxxxxxxxxxxx To unsubscribe, send email to Selinux-leave@xxxxxxxxxxxxx. To get help, send an email containing "help" to Selinux-request@xxxxxxxxxxxxx.