| 1 |
.TH "selinux_restorecon_default_handle" "3" "20 Oct 2015" "Security Enhanced Linux" "SELinux API documentation" |
| 2 |
|
| 3 |
.SH "NAME" |
| 4 |
selinux_restorecon_default_handle \- sets default parameters for |
| 5 |
.BR selinux_restorecon (3) |
| 6 |
. |
| 7 |
.SH "SYNOPSIS" |
| 8 |
.B #include <selinux/restorecon.h> |
| 9 |
.br |
| 10 |
.B #include <selinux/label.h> |
| 11 |
.sp |
| 12 |
.B "struct selabel_handle *selinux_restorecon_default_handle(void);" |
| 13 |
. |
| 14 |
.SH "DESCRIPTION" |
| 15 |
.BR selinux_restorecon_default_handle () |
| 16 |
sets default parameters for |
| 17 |
.BR selinux_restorecon (3) |
| 18 |
by calling |
| 19 |
.BR selabel_open (3) |
| 20 |
with the |
| 21 |
.B SELABEL_OPT_DIGEST |
| 22 |
option only. This will enable a digest to be calculated on the currently |
| 23 |
loaded policy |
| 24 |
.BR file_contexts (5) |
| 25 |
set of files as described in the |
| 26 |
.B NOTES |
| 27 |
section of |
| 28 |
.BR selinux_restorecon (3). |
| 29 |
.sp |
| 30 |
Calling |
| 31 |
.BR selinux_restorecon_default_handle () |
| 32 |
is optional, however if used then |
| 33 |
.BR selinux_restorecon_set_sehandle (3) |
| 34 |
should be called with the returned handle to set this for use by |
| 35 |
.BR selinux_restorecon (3). |
| 36 |
.sp |
| 37 |
.BR selinux_restorecon_default_handle () |
| 38 |
is optional as |
| 39 |
.BR selinux_restorecon (3) |
| 40 |
will automatically call this and |
| 41 |
.BR selinux_restorecon_set_sehandle (3) |
| 42 |
provided a handle has not already been set, for |
| 43 |
example by |
| 44 |
.BR selinux_restorecon_set_sehandle (3) |
| 45 |
to set customised |
| 46 |
.BR selabel_open (3) |
| 47 |
parameters. |
| 48 |
. |
| 49 |
.SH "RETURN VALUE" |
| 50 |
A non\-NULL handle value is returned on success. On error, NULL is returned and |
| 51 |
.I errno |
| 52 |
is set appropriately. |
| 53 |
. |
| 54 |
.SH "SEE ALSO" |
| 55 |
.BR selinux_restorecon (3), |
| 56 |
.br |
| 57 |
.BR selinux_restorecon_set_sehandle (3), |
| 58 |
.br |
| 59 |
.BR selinux_restorecon_set_exclude_list (3), |
| 60 |
.br |
| 61 |
.BR selinux_restorecon_set_alt_rootpath (3), |
| 62 |
.br |
| 63 |
.BR selinux_restorecon_xattr (3) |