replcon - Online Linux Manual PageSection : 1

NAMEreplcon − SELinux file context replacement tool

SYNOPSISreplcon NEW_CONTEXT DIR [OPTIONS] [EXPRESSION]

DESCRIPTIONreplcon allows the user to find and replace file contexts. Replacements can be filtered by object class as described below.

REQUIRED ARGUMENTSNEW_CONTEXT The replacement context as expressed as a partial context, described below. DIR Initial directory to begin searching. The tool will recurse into any subdirectories, so be sure there are no circular mounts within it.

EXPRESSIONThe following options allow the user to specify which files to find. A file must meet all specified criteria for its context to be replaced. If no expression is provided, all files' contexts are replaced. -t TYPE, --type=TYPE Search for files with a context containing the type TYPE. -u USER, --user=USER Search for files with a context containing the user USER. -r ROLE, --role=ROLE Search for files with a context containing the role ROLE. -m RANGE, --mls-range=RANGE Search for files with a context with the MLS range of RANGE. Note that replcon ignores the SELinux translation library, if present. In addition, this flag is ignored if DIR has no MLS information. --context=CONTEXT Search for files matching this partial context. This flag overrides -t, -u, -r, and -m. -p PATH, --path=PATH Search for files which include PATH. -c CLASS, --class=CLASS Search only files of object class CLASS.

OPTIONS-v, --verbose Display context info during replacement. -h, --help Print help information and exit. -V, --version Print version information and exit.

PARTIAL CONTEXTThe --context flag and NEW_CONTEXT argument specify a partial context, which is a a colon separated list of user, role, and type. If the system supports MLS, the context may have a fourth field that gives the range. With --context if a field is not specified or is the literal asterisk, then the query will always match the field. With NEW_CONTEXT if a field is not specified or is the literal asterisk, then that portion of the context will not be modified.

OBJECT CLASSESValid object class strings are block, char, dir, fifo, file, link, or sock.

NOTEThe replcon utility always operates on "raw" SELinux file contexts. If the system has an installed translation library (i.e., libsetrans), those translations are ignored in favor of reading the original contexts from the filesystem.

EXAMPLESreplcon ::type_t: .  Replace every context's type in the current directory with type_t. The user and role portion remain unchanged. replcon -u user_u *:role_r:* .  Replace every context's role with user user_u in the current directory with role_r. The user and type portion remain unchanged. replcon --context ::type_t:s0 :::s0:c0 /tmp  Replace every context with type type_t and MLS range s0 in /tmp with MLS range s0:c0.

AUTHORThis manual page was written by Jeremy A. Mowery <jmowery@tresys.com>.

COPYRIGHTCopyright(C) 2003-2007 Tresys Technology, LLC

BUGSPlease report bugs via an email to setools-bugs@tresys.com.

SEE ALSOfindcon(1), indexcon(1)
0
Johanes Gumabo
Data Size   :   10,264 byte
man-replcon.1Build   :   2024-12-05, 20:55   :  
Visitor Screen   :   x
Visitor Counter ( page / site )   :   5 / 203,122
Visitor ID   :     :  
Visitor IP   :   3.140.195.8   :  
Visitor Provider   :   AMAZON-02   :  
Provider Position ( lat x lon )   :   39.962500 x -83.006100   :   x
Provider Accuracy Radius ( km )   :   1000   :  
Provider City   :   Columbus   :  
Provider Province   :   Ohio ,   :   ,
Provider Country   :   United States   :  
Provider Continent   :   North America   :  
Visitor Recorder   :   Version   :  
Visitor Recorder   :   Library   :  
Online Linux Manual Page   :   Version   :   Online Linux Manual Page - Fedora.40 - march=x86-64 - mtune=generic - 24.12.05
Online Linux Manual Page   :   Library   :   lib_c - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Online Linux Manual Page   :   Library   :   lib_m - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Data Base   :   Version   :   Online Linux Manual Page Database - 24.04.13 - march=x86-64 - mtune=generic - fedora-38
Data Base   :   Library   :   lib_c - 23.02.07 - march=x86-64 - mtune=generic - fedora.36

Very long time ago, I have the best tutor, Wenzel Svojanovsky . If someone knows the email address of Wenzel Svojanovsky , please send an email to johanes_gumabo@yahoo.co.id .
If error, please print screen and send to johanes_gumabo@yahoo.co.id
Under development. Support me via PayPal.