rpm
5.4.15
|
Go to the source code of this file.
Macros | |
#define | rpmsxUnlink(_sx) ((rpmsx)rpmioUnlinkPoolItem((rpmioItem)(_sx), __FUNCTION__, __FILE__, __LINE__)) |
#define | rpmsxLink(_sx) ((rpmsx)rpmioLinkPoolItem((rpmioItem)(_sx), __FUNCTION__, __FILE__, __LINE__)) |
#define | rpmsxFree(_sx) ((rpmsx)rpmioFreePoolItem((rpmioItem)(_sx), __FUNCTION__, __FILE__, __LINE__)) |
Typedefs | |
typedef struct rpmsx_s * | rpmsx |
Functions | |
rpmsx | rpmsxUnlink (rpmsx sx) |
Unreference a SELinux wrapper instance. More... | |
rpmsx | rpmsxLink (rpmsx sx) |
Reference a SELinux wrapper instance. More... | |
rpmsx | rpmsxFree (rpmsx sx) |
Destroy a SELinux wrapper. More... | |
rpmsx | rpmsxNew (const char *fn, unsigned int flags) |
Create and load a SELinux wrapper. More... | |
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... | |
const char * | rpmsxLgetfilecon (rpmsx sx, const char *fn) |
int | rpmsxSetfilecon (rpmsx sx, const char *fn, mode_t mode, const char *scon) |
Set security context for a file. More... | |
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 |
rpmsx | _rpmsxI |
#define rpmsxFree | ( | _sx | ) | ((rpmsx)rpmioFreePoolItem((rpmioItem)(_sx), __FUNCTION__, __FILE__, __LINE__)) |
#define rpmsxLink | ( | _sx | ) | ((rpmsx)rpmioLinkPoolItem((rpmioItem)(_sx), __FUNCTION__, __FILE__, __LINE__)) |
#define rpmsxUnlink | ( | _sx | ) | ((rpmsx)rpmioUnlinkPoolItem((rpmioItem)(_sx), __FUNCTION__, __FILE__, __LINE__)) |
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().
Destroy a SELinux wrapper.
sx | SELinux wrapper |
Referenced by _rpmtsRun(), genCpioListAndHeader(), rpmioClean(), and rpmtsFinish().
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().
const char* rpmsxLgetfilecon | ( | rpmsx | sx, |
const char * | fn | ||
) |
Definition at line 223 of file rpmsx.c.
References _rpmsx_debug, and rpmsxI().
Reference a SELinux wrapper instance.
sx | SELinux wrapper |
Referenced by rpmsxNew().
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().
Unreference a SELinux wrapper instance.
sx | SELinux wrapper |
int _rpmsx_debug |
Definition at line 61 of file rpmsx.c.
Referenced by rpmsxEnabled(), rpmsxExec(), rpmsxGetfilecon(), rpmsxGetPool(), rpmsxLgetfilecon(), rpmsxLsetfilecon(), rpmsxMatch(), and rpmsxSetfilecon().
rpmsx _rpmsxI |
Definition at line 64 of file rpmsx.c.
Referenced by rpmioClean(), and rpmsxI().