Open SCAP Library
Loading...
Searching...
No Matches
Data Structures | Macros | Functions | Variables
rpmverifyfile_probe.c File Reference

rpmverifyfile probe More...

#include <stdio.h>
#include <string.h>
#include <errno.h>
#include <assert.h>
#include <limits.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include "rpm-helper.h"
#include "oscap_helpers.h"
#include <rpm/rpmfi.h>
#include <rpm/rpmcli.h>
#include <probe-api.h>
#include "debug_priv.h"
#include "probe/entcmp.h"
#include <probe/probe.h>
#include <probe/option.h>
#include "common/oscap_pcre.h"
#include "rpmverifyfile_probe.h"
Include dependency graph for rpmverifyfile_probe.c:

Data Structures

struct  rpmverify_res
 
struct  rpmverifyfile_bhmap_t
 

Macros

#define RPMVERIFY_SKIP_CONFIG   0x1000000000000000
 
#define RPMVERIFY_SKIP_GHOST   0x2000000000000000
 
#define RPMVERIFY_RPMATTRMASK   0x00000000ffffffff
 
#define RPMVERIFY_FILEDIGEST   RPMVERIFY_MD5
 
#define RPMVERIFY_CAPS   0
 
#define RPMVERIFY_LOCK   RPM_MUTEX_LOCK(&g_rpm->mutex)
 
#define RPMVERIFY_UNLOCK   RPM_MUTEX_UNLOCK(&g_rpm->mutex)
 
#define COMPARE_ENT(XXX)
 

Functions

int rpmverifyfile_probe_offline_mode_supported ()
 
void * rpmverifyfile_probe_init (void)
 
void rpmverifyfile_probe_fini (void *ptr)
 
int rpmverifyfile_probe_main (probe_ctx *ctx, void *arg)
 

Variables

const rpmverifyfile_bhmap_t rpmverifyfile_bhmap []
 

Detailed Description

rpmverifyfile probe

Author
"Daniel Kopecek" dkope.nosp@m.cek@.nosp@m.redha.nosp@m.t.co.nosp@m.m
"Petr Lautrbach" plaut.nosp@m.rba@.nosp@m.redha.nosp@m.t.co.nosp@m.m

Macro Definition Documentation

◆ COMPARE_ENT

#define COMPARE_ENT ( XXX)
Value:
if (XXX ## _ent != NULL) { \
ent = probe_entval_from_cstr( \
probe_ent_getdatatype(XXX ## _ent), res.XXX, strlen(res.XXX) \
); \
if (ent != NULL && probe_entobj_cmp(XXX ## _ent, ent) != OVAL_RESULT_TRUE) { \
SEXP_free(ent); \
continue; \
} \
SEXP_free(ent); \
}
@ OVAL_RESULT_TRUE
Characteristics being evaluated match the information represented in the system characteristic.
Definition oval_types.h:446
oval_result_t probe_entobj_cmp(SEXP_t *ent_obj, SEXP_t *val)
Compare object entity's content with a value.
Definition entcmp.c:433
oval_datatype_t probe_ent_getdatatype(const SEXP_t *ent)
Get the OVAL data type of an entity.
Definition probe-api.c:1170

Variable Documentation

◆ rpmverifyfile_bhmap

const rpmverifyfile_bhmap_t rpmverifyfile_bhmap[]
Initial value:
= {
{ "nolinkto", (uint64_t)RPMVERIFY_LINKTO },
{ "nomd5", (uint64_t)RPMVERIFY_MD5 },
{ "nosize", (uint64_t)RPMVERIFY_FILESIZE },
{ "nouser", (uint64_t)RPMVERIFY_USER },
{ "nogroup", (uint64_t)RPMVERIFY_GROUP },
{ "nomtime", (uint64_t)RPMVERIFY_MTIME },
{ "nomode", (uint64_t)RPMVERIFY_MODE },
{ "nordev", (uint64_t)RPMVERIFY_RDEV },
{ "noconfigfiles", RPMVERIFY_SKIP_CONFIG },
{ "noghostfiles", RPMVERIFY_SKIP_GHOST },
{ "nofiledigest", (uint64_t)RPMVERIFY_FILEDIGEST },
{ "nocaps", (uint64_t)RPMVERIFY_CAPS }
}