Edit File by line
/home/barbar84/www/wp-conte.../plugins/sujqvwi/AnonR/anonr.TX.../usr/include/selinux
File: avc.h
/*
[0] Fix | Delete
* Access vector cache interface for object managers.
[1] Fix | Delete
*
[2] Fix | Delete
* Author : Eamon Walsh <ewalsh@epoch.ncsc.mil>
[3] Fix | Delete
*/
[4] Fix | Delete
#ifndef _SELINUX_AVC_H_
[5] Fix | Delete
#define _SELINUX_AVC_H_
[6] Fix | Delete
[7] Fix | Delete
#include <stdint.h>
[8] Fix | Delete
#include <errno.h>
[9] Fix | Delete
#include <stdlib.h>
[10] Fix | Delete
#include <selinux/selinux.h>
[11] Fix | Delete
[12] Fix | Delete
#ifdef __cplusplus
[13] Fix | Delete
extern "C" {
[14] Fix | Delete
#endif
[15] Fix | Delete
[16] Fix | Delete
/*
[17] Fix | Delete
* SID format and operations
[18] Fix | Delete
*/
[19] Fix | Delete
struct security_id {
[20] Fix | Delete
char * ctx;
[21] Fix | Delete
unsigned int refcnt;
[22] Fix | Delete
};
[23] Fix | Delete
typedef struct security_id *security_id_t;
[24] Fix | Delete
[25] Fix | Delete
#define SECSID_WILD (security_id_t)NULL /* unspecified SID */
[26] Fix | Delete
[27] Fix | Delete
/**
[28] Fix | Delete
* avc_sid_to_context - get copy of context corresponding to SID.
[29] Fix | Delete
* @sid: input SID
[30] Fix | Delete
* @ctx: pointer to context reference
[31] Fix | Delete
*
[32] Fix | Delete
* Return a copy of the security context corresponding to the input
[33] Fix | Delete
* @sid in the memory referenced by @ctx. The caller is expected to
[34] Fix | Delete
* free the context with freecon(). Return %0 on success, -%1 on
[35] Fix | Delete
* failure, with @errno set to %ENOMEM if insufficient memory was
[36] Fix | Delete
* available to make the copy, or %EINVAL if the input SID is invalid.
[37] Fix | Delete
*/
[38] Fix | Delete
int avc_sid_to_context(security_id_t sid, char ** ctx);
[39] Fix | Delete
int avc_sid_to_context_raw(security_id_t sid, char ** ctx);
[40] Fix | Delete
[41] Fix | Delete
/**
[42] Fix | Delete
* avc_context_to_sid - get SID for context.
[43] Fix | Delete
* @ctx: input security context
[44] Fix | Delete
* @sid: pointer to SID reference
[45] Fix | Delete
*
[46] Fix | Delete
* Look up security context @ctx in SID table, making
[47] Fix | Delete
* a new entry if @ctx is not found. Increment the
[48] Fix | Delete
* reference counter for the SID. Store a pointer
[49] Fix | Delete
* to the SID structure into the memory referenced by @sid,
[50] Fix | Delete
* returning %0 on success or -%1 on error with @errno set.
[51] Fix | Delete
*/
[52] Fix | Delete
int avc_context_to_sid(const char * ctx, security_id_t * sid);
[53] Fix | Delete
int avc_context_to_sid_raw(const char * ctx, security_id_t * sid);
[54] Fix | Delete
[55] Fix | Delete
/**
[56] Fix | Delete
* sidget - increment SID reference counter.
[57] Fix | Delete
* @sid: SID reference
[58] Fix | Delete
*
[59] Fix | Delete
* Increment the reference counter for @sid, indicating that
[60] Fix | Delete
* @sid is in use by an (additional) object. Return the
[61] Fix | Delete
* new reference count, or zero if @sid is invalid (has zero
[62] Fix | Delete
* reference count). Note that avc_context_to_sid() also
[63] Fix | Delete
* increments reference counts.
[64] Fix | Delete
*/
[65] Fix | Delete
int sidget(security_id_t sid);
[66] Fix | Delete
[67] Fix | Delete
/**
[68] Fix | Delete
* sidput - decrement SID reference counter.
[69] Fix | Delete
* @sid: SID reference
[70] Fix | Delete
*
[71] Fix | Delete
* Decrement the reference counter for @sid, indicating that
[72] Fix | Delete
* a reference to @sid is no longer in use. Return the
[73] Fix | Delete
* new reference count. When the reference count reaches
[74] Fix | Delete
* zero, the SID is invalid, and avc_context_to_sid() must
[75] Fix | Delete
* be called to obtain a new SID for the security context.
[76] Fix | Delete
*/
[77] Fix | Delete
int sidput(security_id_t sid);
[78] Fix | Delete
[79] Fix | Delete
/**
[80] Fix | Delete
* avc_get_initial_sid - get SID for an initial kernel security identifier
[81] Fix | Delete
* @name: input name of initial kernel security identifier
[82] Fix | Delete
* @sid: pointer to a SID reference
[83] Fix | Delete
*
[84] Fix | Delete
* Get the context for an initial kernel security identifier specified by
[85] Fix | Delete
* @name using security_get_initial_context() and then call
[86] Fix | Delete
* avc_context_to_sid() to get the corresponding SID.
[87] Fix | Delete
*/
[88] Fix | Delete
int avc_get_initial_sid(const char *name, security_id_t * sid);
[89] Fix | Delete
[90] Fix | Delete
/*
[91] Fix | Delete
* AVC entry
[92] Fix | Delete
*/
[93] Fix | Delete
struct avc_entry;
[94] Fix | Delete
struct avc_entry_ref {
[95] Fix | Delete
struct avc_entry *ae;
[96] Fix | Delete
};
[97] Fix | Delete
[98] Fix | Delete
/**
[99] Fix | Delete
* avc_entry_ref_init - initialize an AVC entry reference.
[100] Fix | Delete
* @aeref: pointer to avc entry reference structure
[101] Fix | Delete
*
[102] Fix | Delete
* Use this macro to initialize an avc entry reference structure
[103] Fix | Delete
* before first use. These structures are passed to avc_has_perm(),
[104] Fix | Delete
* which stores cache entry references in them. They can increase
[105] Fix | Delete
* performance on repeated queries.
[106] Fix | Delete
*/
[107] Fix | Delete
#define avc_entry_ref_init(aeref) ((aeref)->ae = NULL)
[108] Fix | Delete
[109] Fix | Delete
/*
[110] Fix | Delete
* User-provided callbacks for memory, auditing, and locking
[111] Fix | Delete
*/
[112] Fix | Delete
[113] Fix | Delete
/* These structures are passed by reference to avc_init(). Passing
[114] Fix | Delete
* a NULL reference will cause the AVC to use a default. The default
[115] Fix | Delete
* memory callbacks are malloc() and free(). The default logging method
[116] Fix | Delete
* is to print on stderr. If no thread callbacks are passed, a separate
[117] Fix | Delete
* listening thread won't be started for kernel policy change messages.
[118] Fix | Delete
* If no locking callbacks are passed, no locking will take place.
[119] Fix | Delete
*/
[120] Fix | Delete
struct avc_memory_callback {
[121] Fix | Delete
/* malloc() equivalent. */
[122] Fix | Delete
void *(*func_malloc) (size_t size);
[123] Fix | Delete
/* free() equivalent. */
[124] Fix | Delete
void (*func_free) (void *ptr);
[125] Fix | Delete
/* Note that these functions should set errno on failure.
[126] Fix | Delete
If not, some avc routines may return -1 without errno set. */
[127] Fix | Delete
};
[128] Fix | Delete
[129] Fix | Delete
struct avc_log_callback {
[130] Fix | Delete
/* log the printf-style format and arguments. */
[131] Fix | Delete
void
[132] Fix | Delete
#ifdef __GNUC__
[133] Fix | Delete
__attribute__ ((format(printf, 1, 2)))
[134] Fix | Delete
#endif
[135] Fix | Delete
(*func_log) (const char *fmt, ...);
[136] Fix | Delete
/* store a string representation of auditdata (corresponding
[137] Fix | Delete
to the given security class) into msgbuf. */
[138] Fix | Delete
void (*func_audit) (void *auditdata, security_class_t cls,
[139] Fix | Delete
char *msgbuf, size_t msgbufsize);
[140] Fix | Delete
};
[141] Fix | Delete
[142] Fix | Delete
struct avc_thread_callback {
[143] Fix | Delete
/* create and start a thread, returning an opaque pointer to it;
[144] Fix | Delete
the thread should run the given function. */
[145] Fix | Delete
void *(*func_create_thread) (void (*run) (void));
[146] Fix | Delete
/* cancel a given thread and free its resources. */
[147] Fix | Delete
void (*func_stop_thread) (void *thread);
[148] Fix | Delete
};
[149] Fix | Delete
[150] Fix | Delete
struct avc_lock_callback {
[151] Fix | Delete
/* create a lock and return an opaque pointer to it. */
[152] Fix | Delete
void *(*func_alloc_lock) (void);
[153] Fix | Delete
/* obtain a given lock, blocking if necessary. */
[154] Fix | Delete
void (*func_get_lock) (void *lock);
[155] Fix | Delete
/* release a given lock. */
[156] Fix | Delete
void (*func_release_lock) (void *lock);
[157] Fix | Delete
/* destroy a given lock (free memory, etc.) */
[158] Fix | Delete
void (*func_free_lock) (void *lock);
[159] Fix | Delete
};
[160] Fix | Delete
[161] Fix | Delete
/*
[162] Fix | Delete
* Available options
[163] Fix | Delete
*/
[164] Fix | Delete
[165] Fix | Delete
/* no-op option, useful for unused slots in an array of options */
[166] Fix | Delete
#define AVC_OPT_UNUSED 0
[167] Fix | Delete
/* override kernel enforcing mode (boolean value) */
[168] Fix | Delete
#define AVC_OPT_SETENFORCE 1
[169] Fix | Delete
[170] Fix | Delete
/*
[171] Fix | Delete
* AVC operations
[172] Fix | Delete
*/
[173] Fix | Delete
[174] Fix | Delete
/**
[175] Fix | Delete
* avc_init - Initialize the AVC.
[176] Fix | Delete
* @msgprefix: prefix for log messages
[177] Fix | Delete
* @mem_callbacks: user-supplied memory callbacks
[178] Fix | Delete
* @log_callbacks: user-supplied logging callbacks
[179] Fix | Delete
* @thread_callbacks: user-supplied threading callbacks
[180] Fix | Delete
* @lock_callbacks: user-supplied locking callbacks
[181] Fix | Delete
*
[182] Fix | Delete
* Initialize the access vector cache. Return %0 on
[183] Fix | Delete
* success or -%1 with @errno set on failure.
[184] Fix | Delete
* If @msgprefix is NULL, use "uavc". If any callback
[185] Fix | Delete
* structure references are NULL, use default methods
[186] Fix | Delete
* for those callbacks (see the definition of the callback
[187] Fix | Delete
* structures above).
[188] Fix | Delete
*/
[189] Fix | Delete
int avc_init(const char *msgprefix,
[190] Fix | Delete
const struct avc_memory_callback *mem_callbacks,
[191] Fix | Delete
const struct avc_log_callback *log_callbacks,
[192] Fix | Delete
const struct avc_thread_callback *thread_callbacks,
[193] Fix | Delete
const struct avc_lock_callback *lock_callbacks);
[194] Fix | Delete
[195] Fix | Delete
/**
[196] Fix | Delete
* avc_open - Initialize the AVC.
[197] Fix | Delete
* @opts: array of selabel_opt structures specifying AVC options or NULL.
[198] Fix | Delete
* @nopts: number of elements in opts array or zero for no options.
[199] Fix | Delete
*
[200] Fix | Delete
* This function is identical to avc_init(), except the message prefix
[201] Fix | Delete
* is set to "avc" and any callbacks desired should be specified via
[202] Fix | Delete
* selinux_set_callback(). Available options are listed above.
[203] Fix | Delete
*/
[204] Fix | Delete
int avc_open(struct selinux_opt *opts, unsigned nopts);
[205] Fix | Delete
[206] Fix | Delete
/**
[207] Fix | Delete
* avc_cleanup - Remove unused SIDs and AVC entries.
[208] Fix | Delete
*
[209] Fix | Delete
* Search the SID table for SID structures with zero
[210] Fix | Delete
* reference counts, and remove them along with all
[211] Fix | Delete
* AVC entries that reference them. This can be used
[212] Fix | Delete
* to return memory to the system.
[213] Fix | Delete
*/
[214] Fix | Delete
void avc_cleanup(void);
[215] Fix | Delete
[216] Fix | Delete
/**
[217] Fix | Delete
* avc_reset - Flush the cache and reset statistics.
[218] Fix | Delete
*
[219] Fix | Delete
* Remove all entries from the cache and reset all access
[220] Fix | Delete
* statistics (as returned by avc_cache_stats()) to zero.
[221] Fix | Delete
* The SID mapping is not affected. Return %0 on success,
[222] Fix | Delete
* -%1 with @errno set on error.
[223] Fix | Delete
*/
[224] Fix | Delete
int avc_reset(void);
[225] Fix | Delete
[226] Fix | Delete
/**
[227] Fix | Delete
* avc_destroy - Free all AVC structures.
[228] Fix | Delete
*
[229] Fix | Delete
* Destroy all AVC structures and free all allocated
[230] Fix | Delete
* memory. User-supplied locking, memory, and audit
[231] Fix | Delete
* callbacks will be retained, but security-event
[232] Fix | Delete
* callbacks will not. All SID's will be invalidated.
[233] Fix | Delete
* User must call avc_init() if further use of AVC is desired.
[234] Fix | Delete
*/
[235] Fix | Delete
void avc_destroy(void);
[236] Fix | Delete
[237] Fix | Delete
/**
[238] Fix | Delete
* avc_has_perm_noaudit - Check permissions but perform no auditing.
[239] Fix | Delete
* @ssid: source security identifier
[240] Fix | Delete
* @tsid: target security identifier
[241] Fix | Delete
* @tclass: target security class
[242] Fix | Delete
* @requested: requested permissions, interpreted based on @tclass
[243] Fix | Delete
* @aeref: AVC entry reference
[244] Fix | Delete
* @avd: access vector decisions
[245] Fix | Delete
*
[246] Fix | Delete
* Check the AVC to determine whether the @requested permissions are granted
[247] Fix | Delete
* for the SID pair (@ssid, @tsid), interpreting the permissions
[248] Fix | Delete
* based on @tclass, and call the security server on a cache miss to obtain
[249] Fix | Delete
* a new decision and add it to the cache. Update @aeref to refer to an AVC
[250] Fix | Delete
* entry with the resulting decisions, and return a copy of the decisions
[251] Fix | Delete
* in @avd. Return %0 if all @requested permissions are granted, -%1 with
[252] Fix | Delete
* @errno set to %EACCES if any permissions are denied, or to another value
[253] Fix | Delete
* upon other errors. This function is typically called by avc_has_perm(),
[254] Fix | Delete
* but may also be called directly to separate permission checking from
[255] Fix | Delete
* auditing, e.g. in cases where a lock must be held for the check but
[256] Fix | Delete
* should be released for the auditing.
[257] Fix | Delete
*/
[258] Fix | Delete
int avc_has_perm_noaudit(security_id_t ssid,
[259] Fix | Delete
security_id_t tsid,
[260] Fix | Delete
security_class_t tclass,
[261] Fix | Delete
access_vector_t requested,
[262] Fix | Delete
struct avc_entry_ref *aeref, struct av_decision *avd);
[263] Fix | Delete
[264] Fix | Delete
/**
[265] Fix | Delete
* avc_has_perm - Check permissions and perform any appropriate auditing.
[266] Fix | Delete
* @ssid: source security identifier
[267] Fix | Delete
* @tsid: target security identifier
[268] Fix | Delete
* @tclass: target security class
[269] Fix | Delete
* @requested: requested permissions, interpreted based on @tclass
[270] Fix | Delete
* @aeref: AVC entry reference
[271] Fix | Delete
* @auditdata: auxiliary audit data
[272] Fix | Delete
*
[273] Fix | Delete
* Check the AVC to determine whether the @requested permissions are granted
[274] Fix | Delete
* for the SID pair (@ssid, @tsid), interpreting the permissions
[275] Fix | Delete
* based on @tclass, and call the security server on a cache miss to obtain
[276] Fix | Delete
* a new decision and add it to the cache. Update @aeref to refer to an AVC
[277] Fix | Delete
* entry with the resulting decisions. Audit the granting or denial of
[278] Fix | Delete
* permissions in accordance with the policy. Return %0 if all @requested
[279] Fix | Delete
* permissions are granted, -%1 with @errno set to %EACCES if any permissions
[280] Fix | Delete
* are denied or to another value upon other errors.
[281] Fix | Delete
*/
[282] Fix | Delete
int avc_has_perm(security_id_t ssid, security_id_t tsid,
[283] Fix | Delete
security_class_t tclass, access_vector_t requested,
[284] Fix | Delete
struct avc_entry_ref *aeref, void *auditdata);
[285] Fix | Delete
[286] Fix | Delete
/**
[287] Fix | Delete
* avc_audit - Audit the granting or denial of permissions.
[288] Fix | Delete
* @ssid: source security identifier
[289] Fix | Delete
* @tsid: target security identifier
[290] Fix | Delete
* @tclass: target security class
[291] Fix | Delete
* @requested: requested permissions
[292] Fix | Delete
* @avd: access vector decisions
[293] Fix | Delete
* @result: result from avc_has_perm_noaudit
[294] Fix | Delete
* @auditdata: auxiliary audit data
[295] Fix | Delete
*
[296] Fix | Delete
* Audit the granting or denial of permissions in accordance
[297] Fix | Delete
* with the policy. This function is typically called by
[298] Fix | Delete
* avc_has_perm() after a permission check, but can also be
[299] Fix | Delete
* called directly by callers who use avc_has_perm_noaudit()
[300] Fix | Delete
* in order to separate the permission check from the auditing.
[301] Fix | Delete
* For example, this separation is useful when the permission check must
[302] Fix | Delete
* be performed under a lock, to allow the lock to be released
[303] Fix | Delete
* before calling the auditing code.
[304] Fix | Delete
*/
[305] Fix | Delete
void avc_audit(security_id_t ssid, security_id_t tsid,
[306] Fix | Delete
security_class_t tclass, access_vector_t requested,
[307] Fix | Delete
struct av_decision *avd, int result, void *auditdata);
[308] Fix | Delete
[309] Fix | Delete
/**
[310] Fix | Delete
* avc_compute_create - Compute SID for labeling a new object.
[311] Fix | Delete
* @ssid: source security identifier
[312] Fix | Delete
* @tsid: target security identifier
[313] Fix | Delete
* @tclass: target security class
[314] Fix | Delete
* @newsid: pointer to SID reference
[315] Fix | Delete
*
[316] Fix | Delete
* Call the security server to obtain a context for labeling a
[317] Fix | Delete
* new object. Look up the context in the SID table, making
[318] Fix | Delete
* a new entry if not found. Increment the reference counter
[319] Fix | Delete
* for the SID. Store a pointer to the SID structure into the
[320] Fix | Delete
* memory referenced by @newsid, returning %0 on success or -%1 on
[321] Fix | Delete
* error with @errno set.
[322] Fix | Delete
*/
[323] Fix | Delete
int avc_compute_create(security_id_t ssid,
[324] Fix | Delete
security_id_t tsid,
[325] Fix | Delete
security_class_t tclass, security_id_t * newsid);
[326] Fix | Delete
[327] Fix | Delete
/**
[328] Fix | Delete
* avc_compute_member - Compute SID for polyinstantation.
[329] Fix | Delete
* @ssid: source security identifier
[330] Fix | Delete
* @tsid: target security identifier
[331] Fix | Delete
* @tclass: target security class
[332] Fix | Delete
* @newsid: pointer to SID reference
[333] Fix | Delete
*
[334] Fix | Delete
* Call the security server to obtain a context for labeling an
[335] Fix | Delete
* object instance. Look up the context in the SID table, making
[336] Fix | Delete
* a new entry if not found. Increment the reference counter
[337] Fix | Delete
* for the SID. Store a pointer to the SID structure into the
[338] Fix | Delete
* memory referenced by @newsid, returning %0 on success or -%1 on
[339] Fix | Delete
* error with @errno set.
[340] Fix | Delete
*/
[341] Fix | Delete
int avc_compute_member(security_id_t ssid,
[342] Fix | Delete
security_id_t tsid,
[343] Fix | Delete
security_class_t tclass, security_id_t * newsid);
[344] Fix | Delete
[345] Fix | Delete
/*
[346] Fix | Delete
* security event callback facility
[347] Fix | Delete
*/
[348] Fix | Delete
[349] Fix | Delete
/* security events */
[350] Fix | Delete
#define AVC_CALLBACK_GRANT 1
[351] Fix | Delete
#define AVC_CALLBACK_TRY_REVOKE 2
[352] Fix | Delete
#define AVC_CALLBACK_REVOKE 4
[353] Fix | Delete
#define AVC_CALLBACK_RESET 8
[354] Fix | Delete
#define AVC_CALLBACK_AUDITALLOW_ENABLE 16
[355] Fix | Delete
#define AVC_CALLBACK_AUDITALLOW_DISABLE 32
[356] Fix | Delete
#define AVC_CALLBACK_AUDITDENY_ENABLE 64
[357] Fix | Delete
#define AVC_CALLBACK_AUDITDENY_DISABLE 128
[358] Fix | Delete
[359] Fix | Delete
/**
[360] Fix | Delete
* avc_add_callback - Register a callback for security events.
[361] Fix | Delete
* @callback: callback function
[362] Fix | Delete
* @events: bitwise OR of desired security events
[363] Fix | Delete
* @ssid: source security identifier or %SECSID_WILD
[364] Fix | Delete
* @tsid: target security identifier or %SECSID_WILD
[365] Fix | Delete
* @tclass: target security class
[366] Fix | Delete
* @perms: permissions
[367] Fix | Delete
*
[368] Fix | Delete
* Register a callback function for events in the set @events
[369] Fix | Delete
* related to the SID pair (@ssid, @tsid) and
[370] Fix | Delete
* and the permissions @perms, interpreting
[371] Fix | Delete
* @perms based on @tclass. Returns %0 on success or
[372] Fix | Delete
* -%1 if insufficient memory exists to add the callback.
[373] Fix | Delete
*/
[374] Fix | Delete
int avc_add_callback(int (*callback)
[375] Fix | Delete
(uint32_t event, security_id_t ssid,
[376] Fix | Delete
security_id_t tsid, security_class_t tclass,
[377] Fix | Delete
access_vector_t perms,
[378] Fix | Delete
access_vector_t * out_retained),
[379] Fix | Delete
uint32_t events, security_id_t ssid,
[380] Fix | Delete
security_id_t tsid, security_class_t tclass,
[381] Fix | Delete
access_vector_t perms);
[382] Fix | Delete
[383] Fix | Delete
/*
[384] Fix | Delete
* AVC statistics
[385] Fix | Delete
*/
[386] Fix | Delete
[387] Fix | Delete
/* If set, cache statistics are tracked. This may
[388] Fix | Delete
* become a compile-time option in the future.
[389] Fix | Delete
*/
[390] Fix | Delete
#define AVC_CACHE_STATS 1
[391] Fix | Delete
[392] Fix | Delete
struct avc_cache_stats {
[393] Fix | Delete
unsigned entry_lookups;
[394] Fix | Delete
unsigned entry_hits;
[395] Fix | Delete
unsigned entry_misses;
[396] Fix | Delete
unsigned entry_discards;
[397] Fix | Delete
unsigned cav_lookups;
[398] Fix | Delete
unsigned cav_hits;
[399] Fix | Delete
unsigned cav_probes;
[400] Fix | Delete
unsigned cav_misses;
[401] Fix | Delete
};
[402] Fix | Delete
[403] Fix | Delete
/**
[404] Fix | Delete
* avc_cache_stats - get cache access statistics.
[405] Fix | Delete
* @stats: reference to statistics structure
[406] Fix | Delete
*
[407] Fix | Delete
* Fill the supplied structure with information about AVC
[408] Fix | Delete
* activity since the last call to avc_init() or
[409] Fix | Delete
* avc_reset(). See the structure definition for
[410] Fix | Delete
* details.
[411] Fix | Delete
*/
[412] Fix | Delete
void avc_cache_stats(struct avc_cache_stats *stats);
[413] Fix | Delete
[414] Fix | Delete
/**
[415] Fix | Delete
* avc_av_stats - log av table statistics.
[416] Fix | Delete
*
[417] Fix | Delete
* Log a message with information about the size and
[418] Fix | Delete
* distribution of the access vector table. The audit
[419] Fix | Delete
* callback is used to print the message.
[420] Fix | Delete
*/
[421] Fix | Delete
void avc_av_stats(void);
[422] Fix | Delete
[423] Fix | Delete
/**
[424] Fix | Delete
* avc_sid_stats - log SID table statistics.
[425] Fix | Delete
*
[426] Fix | Delete
* Log a message with information about the size and
[427] Fix | Delete
* distribution of the SID table. The audit callback
[428] Fix | Delete
* is used to print the message.
[429] Fix | Delete
*/
[430] Fix | Delete
void avc_sid_stats(void);
[431] Fix | Delete
[432] Fix | Delete
/**
[433] Fix | Delete
* avc_netlink_open - Create a netlink socket and connect to the kernel.
[434] Fix | Delete
*/
[435] Fix | Delete
int avc_netlink_open(int blocking);
[436] Fix | Delete
[437] Fix | Delete
/**
[438] Fix | Delete
* avc_netlink_loop - Wait for netlink messages from the kernel
[439] Fix | Delete
*/
[440] Fix | Delete
void avc_netlink_loop(void);
[441] Fix | Delete
[442] Fix | Delete
/**
[443] Fix | Delete
* avc_netlink_close - Close the netlink socket
[444] Fix | Delete
*/
[445] Fix | Delete
void avc_netlink_close(void);
[446] Fix | Delete
[447] Fix | Delete
/**
[448] Fix | Delete
* avc_netlink_acquire_fd - Acquire netlink socket fd.
[449] Fix | Delete
*
[450] Fix | Delete
* Allows the application to manage messages from the netlink socket in
[451] Fix | Delete
* its own main loop.
[452] Fix | Delete
*/
[453] Fix | Delete
int avc_netlink_acquire_fd(void);
[454] Fix | Delete
[455] Fix | Delete
/**
[456] Fix | Delete
* avc_netlink_release_fd - Release netlink socket fd.
[457] Fix | Delete
*
[458] Fix | Delete
* Returns ownership of the netlink socket to the library.
[459] Fix | Delete
*/
[460] Fix | Delete
void avc_netlink_release_fd(void);
[461] Fix | Delete
[462] Fix | Delete
/**
[463] Fix | Delete
* avc_netlink_check_nb - Check netlink socket for new messages.
[464] Fix | Delete
*
[465] Fix | Delete
* Called by the application when using avc_netlink_acquire_fd() to
[466] Fix | Delete
* process kernel netlink events.
[467] Fix | Delete
*/
[468] Fix | Delete
int avc_netlink_check_nb(void);
[469] Fix | Delete
[470] Fix | Delete
/**
[471] Fix | Delete
* selinux_status_open - Open and map SELinux kernel status page
[472] Fix | Delete
*
[473] Fix | Delete
*/
[474] Fix | Delete
int selinux_status_open(int fallback);
[475] Fix | Delete
[476] Fix | Delete
/**
[477] Fix | Delete
* selinux_status_close - Unmap and close SELinux kernel status page
[478] Fix | Delete
*
[479] Fix | Delete
*/
[480] Fix | Delete
void selinux_status_close(void);
[481] Fix | Delete
[482] Fix | Delete
/**
[483] Fix | Delete
* selinux_status_updated - Inform us whether the kernel status has been updated
[484] Fix | Delete
*
[485] Fix | Delete
*/
[486] Fix | Delete
int selinux_status_updated(void);
[487] Fix | Delete
[488] Fix | Delete
/**
[489] Fix | Delete
* selinux_status_getenforce - Get the enforce flag value
[490] Fix | Delete
*
[491] Fix | Delete
*/
[492] Fix | Delete
int selinux_status_getenforce(void);
[493] Fix | Delete
[494] Fix | Delete
/**
[495] Fix | Delete
* selinux_status_policyload - Get the number of policy reloaded
[496] Fix | Delete
*
[497] Fix | Delete
*/
[498] Fix | Delete
int selinux_status_policyload(void);
[499] Fix | Delete
12
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function