| 1 |
.TH "restorecon_xattr" "8" "24 Sept 2016" "" "SELinux User Command" |
| 2 |
.SH "NAME" |
| 3 |
restorecon_xattr \- manage |
| 4 |
.I security.restorecon_last |
| 5 |
extended attribute entries added by |
| 6 |
.BR setfiles (8) |
| 7 |
or |
| 8 |
.BR restorecon (8). |
| 9 |
|
| 10 |
.SH "SYNOPSIS" |
| 11 |
.B restorecon_xattr |
| 12 |
.RB [ \-d ] |
| 13 |
.RB [ \-D ] |
| 14 |
.RB [ \-m ] |
| 15 |
.RB [ \-n ] |
| 16 |
.RB [ \-r ] |
| 17 |
.RB [ \-v ] |
| 18 |
.RB [ \-e |
| 19 |
.IR directory ] |
| 20 |
.RB [ \-f |
| 21 |
.IR specfile ] |
| 22 |
.I pathname |
| 23 |
|
| 24 |
.SH "DESCRIPTION" |
| 25 |
.B restorecon_xattr |
| 26 |
will display the SHA1 digests added to extended attributes |
| 27 |
.I security.restorecon_last |
| 28 |
or delete the attribute completely. These attributes are set by |
| 29 |
.BR restorecon (8) |
| 30 |
or |
| 31 |
.BR setfiles (8) |
| 32 |
to specified directories when relabeling recursively. |
| 33 |
.sp |
| 34 |
.B restorecon_xattr |
| 35 |
is useful for managing the extended attribute entries particularly when |
| 36 |
users forget what directories they ran |
| 37 |
.BR restorecon (8) |
| 38 |
or |
| 39 |
.BR setfiles (8) |
| 40 |
from. |
| 41 |
.sp |
| 42 |
.B RAMFS |
| 43 |
and |
| 44 |
.B TMPFS |
| 45 |
filesystems do not support the |
| 46 |
.I security.restorecon_last |
| 47 |
extended attribute and are automatically excluded from searches. |
| 48 |
.sp |
| 49 |
By default |
| 50 |
.B restorecon_xattr |
| 51 |
will display the SHA1 digests with "Match" appended if they match the default |
| 52 |
specfile set or the |
| 53 |
.I specfile |
| 54 |
set used with the |
| 55 |
.B \-f |
| 56 |
option. Non-matching SHA1 digests will be displayed with "No Match" appended. |
| 57 |
This feature can be disabled by the |
| 58 |
.B \-n |
| 59 |
option. |
| 60 |
|
| 61 |
.SH "OPTIONS" |
| 62 |
.TP |
| 63 |
.B \-d |
| 64 |
delete all non-matching |
| 65 |
.I security.restorecon_last |
| 66 |
directory digest entries. |
| 67 |
.TP |
| 68 |
.B \-D |
| 69 |
delete all |
| 70 |
.I security.restorecon_last |
| 71 |
directory digest entries. |
| 72 |
.TP |
| 73 |
.B \-m |
| 74 |
do not read |
| 75 |
.B /proc/mounts |
| 76 |
to obtain a list of non-seclabel mounts to be excluded from relabeling checks. |
| 77 |
.br |
| 78 |
Setting |
| 79 |
.B \-m |
| 80 |
is useful where there is a non-seclabel fs mounted with a seclabel fs mounted |
| 81 |
on a directory below this. |
| 82 |
.TP |
| 83 |
.B \-n |
| 84 |
Do not append "Match" or "No Match" to displayed digests. |
| 85 |
.TP |
| 86 |
.B \-r |
| 87 |
recursively descend directories. |
| 88 |
.TP |
| 89 |
.B \-v |
| 90 |
display SHA1 digest generated by specfile set. |
| 91 |
.TP |
| 92 |
.B \-e |
| 93 |
.I directory |
| 94 |
.br |
| 95 |
directory to exclude (repeat option for more than one directory). |
| 96 |
.TP |
| 97 |
.B \-f |
| 98 |
.I specfile |
| 99 |
.br |
| 100 |
an optional |
| 101 |
.I specfile |
| 102 |
containing file context entries as described in |
| 103 |
.BR file_contexts (5). |
| 104 |
This will be used by |
| 105 |
.BR selabel_open (3) |
| 106 |
to retrieve the set of labeling entries, with the SHA1 digest being |
| 107 |
retrieved by |
| 108 |
.BR selabel_digest (3). |
| 109 |
If the option is not specified, then the default file_contexts will be used. |
| 110 |
|
| 111 |
.SH "ARGUMENTS" |
| 112 |
.TP |
| 113 |
.I pathname |
| 114 |
.br |
| 115 |
the pathname of the directory tree to be searched. |
| 116 |
|
| 117 |
.SH "SEE ALSO" |
| 118 |
.BR restorecon (8), |
| 119 |
.BR setfiles (8) |