rpm
5.4.15
|
#include "system.h"
#include <rpmsm.h>
#include <rpmlog.h>
#include <rpmmacro.h>
#include <argv.h>
#include <mire.h>
#include "debug.h"
Go to the source code of this file.
Macros | |
#define | _RPMSM_INTERNAL |
#define | F_ISSET(_sm, _FLAG) (((_sm)->flags & ((RPMSM_FLAGS_##_FLAG) & ~0x40000000)) != RPMSM_FLAGS_NONE) |
Enumerations | |
enum | rpmsmState_e { RPMSM_STATE_CLOSED = 0, RPMSM_STATE_SELECTED = 1, RPMSM_STATE_ACCESSED = 2, RPMSM_STATE_CREATED = 3, RPMSM_STATE_CONNECTED = 4, RPMSM_STATE_TRANSACTION = 5 } |
Functions | |
static int | rpmsmBegin (rpmsm sm, char *arg) |
static int | rpmsmDisconnect (rpmsm sm, char *arg) |
static int | rpmsmReload (rpmsm sm, char *arg) |
static int | rpmsmInstallBase (rpmsm sm, char *arg) |
static int | rpmsmInstall (rpmsm sm, char *arg) |
static int | rpmsmUpgrade (rpmsm sm, char *arg) |
static int | rpmsmRemove (rpmsm sm, char *arg) |
static int | rpmsmList (rpmsm sm, char *arg) |
static int | rpmsmCommit (rpmsm sm, char *arg) |
static void | rpmsmFini (void *_sm) |
static rpmsm | rpmsmGetPool (rpmioPool pool) |
rpmsm | rpmsmNew (const char *fn, unsigned int flags) |
Create and load a semanage wrapper. More... | |
static rpmsm | rpmsmI (void) |
rpmRC | rpmsmRun (rpmsm sm, char **av, const char **resultp) |
Run semanage commands. More... | |
Variables | |
int | _rpmsm_debug = 0 |
rpmsm | _rpmsmI = NULL |
rpmioPool | _rpmsmPool = NULL |
static const char | _rpmsmI_fn [] = "minimum" |
static int | _rpmsmI_flags |
#define F_ISSET | ( | _sm, | |
_FLAG | |||
) | (((_sm)->flags & ((RPMSM_FLAGS_##_FLAG) & ~0x40000000)) != RPMSM_FLAGS_NONE) |
Definition at line 26 of file rpmsm.c.
Referenced by rpmsmCommit(), and rpmsmRun().
enum rpmsmState_e |
|
static |
Definition at line 121 of file rpmsm.c.
References _rpmsm_debug, and RPMSM_STATE_TRANSACTION.
Referenced by rpmsmNew(), and rpmsmRun().
|
static |
Definition at line 284 of file rpmsm.c.
References _rpmsm_debug, F_ISSET, and RPMSM_FLAGS_COMMIT.
Referenced by rpmsmRun().
|
static |
Definition at line 136 of file rpmsm.c.
References _rpmsm_debug, RPMSM_STATE_CLOSED, and RPMSM_STATE_CONNECTED.
Referenced by rpmsmFini(), and rpmsmRun().
|
static |
Definition at line 304 of file rpmsm.c.
References _free(), argvFree(), rpmiobFree(), RPMSM_STATE_CLOSED, and rpmsmDisconnect().
Referenced by rpmsmGetPool().
Definition at line 329 of file rpmsm.c.
References _rpmsm_debug, _rpmsmPool, rpmioGetPool(), rpmioNewPool(), and rpmsmFini().
Referenced by rpmsmNew().
|
static |
Definition at line 389 of file rpmsm.c.
References _rpmsmI, and rpmsmNew().
Referenced by rpmsmRun().
|
static |
Definition at line 186 of file rpmsm.c.
References _rpmsm_debug, and RPMSM_FLAGS_COMMIT.
Referenced by rpmsmRun().
|
static |
Definition at line 169 of file rpmsm.c.
References _rpmsm_debug, and RPMSM_FLAGS_COMMIT.
Referenced by rpmsmRun().
|
static |
Definition at line 241 of file rpmsm.c.
References _free(), _rpmsm_debug, j, mireApply(), mireFree(), mireNew(), mireRegcomp(), rpmExpand(), rpmiobAppend(), and RPMMIRE_REGEX.
Referenced by rpmsmRun().
rpmsm rpmsmNew | ( | const char * | fn, |
unsigned int | flags | ||
) |
Create and load a semanage wrapper.
fn | semanage policy store (i.e. "targeted") |
flags | semanage flags |
Definition at line 343 of file rpmsm.c.
References rpmiobNew(), RPMSM_FLAGS_ACCESS, RPMSM_FLAGS_BEGIN, RPMSM_FLAGS_CONNECT, RPMSM_FLAGS_CREATE, RPMSM_FLAGS_SELECT, rpmsmBegin(), rpmsmFree(), rpmsmGetPool(), and rpmsmLink().
Referenced by expandMacro(), and rpmsmI().
|
static |
|
static |
Definition at line 224 of file rpmsm.c.
References _rpmsm_debug, and RPMSM_FLAGS_COMMIT.
Referenced by rpmsmRun().
Run semanage commands.
Commands are keyword strings with appended optional argument.
sm | semanage wrapper |
av | semanage commands |
*resultp | string result (malloc'd) |
Definition at line 400 of file rpmsm.c.
References _rpmsm_debug, argvCount(), cmd, F_ISSET, i, rpmiobAppend(), rpmiobEmpty(), rpmiobLen(), rpmiobRTrim(), rpmiobStr(), RPMRC_FAIL, RPMRC_OK, RPMSM_FLAGS_COMMIT, RPMSM_FLAGS_NOAUDIT, rpmsmBegin(), rpmsmCommit(), rpmsmDisconnect(), rpmsmI(), rpmsmInstall(), rpmsmInstallBase(), rpmsmList(), rpmsmReload(), rpmsmRemove(), rpmsmUpgrade(), and xisspace().
Referenced by expandMacro().
|
static |
Definition at line 205 of file rpmsm.c.
References _rpmsm_debug, and RPMSM_FLAGS_COMMIT.
Referenced by rpmsmRun().
int _rpmsm_debug = 0 |
Definition at line 21 of file rpmsm.c.
Referenced by rpmsmBegin(), rpmsmCommit(), rpmsmDisconnect(), rpmsmGetPool(), rpmsmInstall(), rpmsmInstallBase(), rpmsmList(), rpmsmReload(), rpmsmRemove(), rpmsmRun(), and rpmsmUpgrade().
rpmsm _rpmsmI = NULL |
Definition at line 24 of file rpmsm.c.
Referenced by rpmioClean(), and rpmsmI().
rpmioPool _rpmsmPool = NULL |
Definition at line 327 of file rpmsm.c.
Referenced by rpmioClean(), and rpmsmGetPool().