1replcon(1)                  General Commands Manual                 replcon(1)
2
3
4

NAME

6       replcon - SELinux file context replacement tool
7

SYNOPSIS

9       replcon [OPTIONS] -c OLD NEW FILENAMES
10

DESCRIPTION

12       replcon  allows  the  user to find and replace file contexts.  Replace‐
13       ments can be restricted by object class.
14

OPTIONS

16       -c, --context=OLD NEW
17              Search for files with context OLD and replace their context with
18              NEW.   A context is specified as a colon separated list of user,
19              role, and type as follows: user_u:object_r:type_t.  If the  sys‐
20              tem  supports  MLS, additional MLS range can be added to the end
21              as follows: user_u:object_r:type_t:s0.  If a field is not speci‐
22              fied,  the  query  will  always match that field.  If the system
23              supports MLS and the translation library is enabled, matching is
24              done  using translated contexts.  To match raw contexts, use the
25              --raw option.  The special string "unlabeled" can also be speci‐
26              fied to match files with no label.
27
28       --raw  Match raw contexts, ignoring the translation library if present.
29
30       -o, --object=OBJECT
31              Only replace the context for files of object class OBJECT.
32
33       -r, --recursive
34              Recurse through directories.
35
36       -s, --stdin
37              Read FILENAMES from standard input.
38
39       -q, --quiet
40              Suppress progress output.
41
42       -v, --verbose
43              Display context info.
44
45       -h, --help
46              Print help information and exit.
47
48       -V, --version
49              Print version information and exit.
50

INFORMATION

52       Valid object classes are
53
54       file, dir, lnk_file, chr_file, blk_file, sock_file, fifo_file
55

EXAMPLES

57       replcon -c : ::type_t .
58              Replace every context in the current directory with type_t.
59
60       replcon -c user_u: :role_r .
61              Replace  every context with user user_u in the current directory
62              with role role_r.
63
64       replcon -c ::type_t:s0 :::s0:c0 .
65              Replace every context with type type_t and MLS range s0  in  the
66              current directory with MLS range s0:c0.
67

AUTHOR

69       This manual page was written by Jeremy A. Mowery <jmowery@tresys.com>.
70
72       Copyright(C) 2003-2007 Tresys Technology, LLC
73

BUGS

75       Please report bugs via an email to setools-bugs@tresys.com.
76

SEE ALSO

78       findcon(1), indexcon(1), searchcon(1)
79
80
81
82                                                                    replcon(1)
Impressum