rpm
5.4.15
|
Go to the source code of this file.
Macros | |
#define | _RPMSX_INTERNAL |
Functions | |
static void | rpmsxFini (void *_sx) |
static rpmsx | rpmsxGetPool (rpmioPool pool) |
rpmsx | rpmsxNew (const char *fn, unsigned int flags) |
Create and load a SELinux wrapper. More... | |
static rpmsx | rpmsxI (void) |
int | rpmsxEnabled (rpmsx sx) |
Return SELinux enabled state. More... | |
const char * | rpmsxMatch (rpmsx sx, const char *fn, mode_t mode) |
Return security context for a file. More... | |
const char * | rpmsxGetfilecon (rpmsx sx, const char *fn) |
Get security context for a file. More... | |
int | rpmsxSetfilecon (rpmsx sx, const char *fn, mode_t mode, const char *scon) |
Set security context for a file. More... | |
const char * | rpmsxLgetfilecon (rpmsx sx, const char *fn) |
int | rpmsxLsetfilecon (rpmsx sx, const char *fn, mode_t mode, const char *scon) |
int | rpmsxExec (rpmsx sx, int verified, const char **argv) |
Execute a package scriptlet within SELinux context. More... | |
Variables | |
int | _rpmsx_debug = 0 |
rpmsx | _rpmsxI = NULL |
rpmioPool | _rpmsxPool = NULL |
static const char * | _rpmsxI_fn |
static int | _rpmsxI_flags |
int rpmsxEnabled | ( | rpmsx | sx | ) |
Return SELinux enabled state.
sx | SELinux wrapper (NULL uses active context) |
Definition at line 134 of file rpmsx.c.
References _rpmsx_debug.
Referenced by rpmtsCreate().
int rpmsxExec | ( | rpmsx | sx, |
int | verified, | ||
const char ** | argv | ||
) |
Execute a package scriptlet within SELinux context.
sx | SELinux wrapper |
verified | Scriptlet came from signature verified header? (unused) |
argv | scriptlet helper |
Definition at line 275 of file rpmsx.c.
References _rpmsx_debug, environ, and rpmsxI().
Referenced by runScript().
|
static |
const char* rpmsxGetfilecon | ( | rpmsx | sx, |
const char * | fn | ||
) |
Get security context for a file.
sx | SELinux wrapper (NULL uses active context) |
fn | file path |
Definition at line 171 of file rpmsx.c.
References _rpmsx_debug, and rpmsxI().
Definition at line 83 of file rpmsx.c.
References _rpmsx_debug, _rpmsxPool, rpmioGetPool(), rpmioNewPool(), and rpmsxFini().
Referenced by rpmsxNew().
|
static |
Definition at line 125 of file rpmsx.c.
References _rpmsxI, _rpmsxI_flags, _rpmsxI_fn, and rpmsxNew().
Referenced by rpmsxExec(), rpmsxGetfilecon(), rpmsxLgetfilecon(), rpmsxLsetfilecon(), rpmsxMatch(), and rpmsxSetfilecon().
const char* rpmsxLgetfilecon | ( | rpmsx | sx, |
const char * | fn | ||
) |
Definition at line 223 of file rpmsx.c.
References _rpmsx_debug, and rpmsxI().
int rpmsxLsetfilecon | ( | rpmsx | sx, |
const char * | fn, | ||
mode_t | mode, | ||
const char * | scon | ||
) |
Definition at line 248 of file rpmsx.c.
References _rpmsx_debug, rpmsxI(), and rpmsxMatch().
Referenced by iosmStage().
const char* rpmsxMatch | ( | rpmsx | sx, |
const char * | fn, | ||
mode_t | mode | ||
) |
Return security context for a file.
sx | SELinux wrapper (NULL uses active context) |
fn | file path |
mode | file mode |
Definition at line 151 of file rpmsx.c.
References _rpmsx_debug, rpmsxI(), and xstrdup().
Referenced by fsmMapFContext(), fsmMkdirs(), genCpioListAndHeader(), iosmMapFContext(), iosmMkdirs(), rpmsxLsetfilecon(), and rpmsxSetfilecon().
rpmsx rpmsxNew | ( | const char * | fn, |
unsigned int | flags | ||
) |
Create and load a SELinux wrapper.
fn | SELinux file (NULL uses selinux_file_context_path()). |
flags | SELinux set_matchpathcon_flags() flags |
Definition at line 97 of file rpmsx.c.
References _free(), flags, rpmGetPath(), rpmsxGetPool(), and rpmsxLink().
Referenced by genCpioListAndHeader(), rpmsxI(), and rpmtsSetup().
int rpmsxSetfilecon | ( | rpmsx | sx, |
const char * | fn, | ||
mode_t | mode, | ||
const char * | scon | ||
) |
Set security context for a file.
sx | SELinux wrapper (NULL uses active context) |
fn | file path |
mode | file mode |
scon | file security context (NULL calls matchpathcon()) |
Definition at line 196 of file rpmsx.c.
References _rpmsx_debug, rpmsxI(), and rpmsxMatch().
int _rpmsx_debug = 0 |
Definition at line 61 of file rpmsx.c.
Referenced by rpmsxEnabled(), rpmsxExec(), rpmsxGetfilecon(), rpmsxGetPool(), rpmsxLgetfilecon(), rpmsxLsetfilecon(), rpmsxMatch(), and rpmsxSetfilecon().
rpmsx _rpmsxI = NULL |
Definition at line 64 of file rpmsx.c.
Referenced by rpmioClean(), and rpmsxI().
rpmioPool _rpmsxPool = NULL |
Definition at line 81 of file rpmsx.c.
Referenced by rpmioClean(), and rpmsxGetPool().