Re: initial_sid context via libsepol

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



<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 0eb17d944704b3eb140bb9dded299d3be3aed77e
Author: 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 point
you 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 seems
like 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?

Thanks,
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.

[Index of Archives]     [Selinux Refpolicy]     [Linux SGX]     [Fedora Users]     [Fedora Desktop]     [Yosemite Photos]     [Yosemite Camping]     [Yosemite Campsites]     [KDE Users]     [Gnome Users]

  Powered by Linux