MAN page from OpenSuSE selinux-tools-2.0.71-4.1.x86_64.rpm
Section: SELinux API documentation (5)
Updated: 18 Jun 2007Index
selabel_file - userspace SELinux labeling interface: file contexts backend.
int selabel_lookup(struct selabel_handle *hnd,security_context_t *context,
const char *path, int mode);
The file contexts backend maps from pathname/mode combinations into security contexts. It is used to find the appropriate context for each file when relabeling a file system.
Thepathargument should be set to the full pathname of the file whose assigned context is being checked. The modeargument should be set to the mode bits of the file, as determined by lstat(2).
In addition to the global options described in selabel_open
(3),this backend recognizes the following options:
- A non-null value for this option specifies a path to a file that will be opened in lieu of the standard file contexts file. This value is also used as the base name for determining the names of local customization files.
- A non-null value for this option indicates that any local customizations to the file contexts mapping should be ignored.
- A non-null value for this option is interpreted as a path prefix, for example "/etc". Only file context specifications starting with the given prefix are loaded. This may increase lookup performance, however any attempt to look up a path not starting with the given prefix will fail.
- SEE ALSO
This document was created byman2html,using the manual pages.