Exploit databaseDownload repository ZIP
GH-ab5673895c85599e6852a5b9c5dd4dbf
a-roshbaik/badspin
Sources for CVE-2022-20421
3 sourcesPreferred order: Exploit-DB, Metasploit, then GitHub repositories by stars. Open preferred source
Repository files67
a-roshbaik/badspinRevision 5db87120b221
- ↑..Parent directory
- Makefile
- assertion.c
- avrule_block.c
- avtab.c
- boolean_internal.h
- boolean_record.c
- booleans.c
- conditional.c
- constraint.c
- context.c
- context.h
- context_internal.h
- context_record.c
- debug.c
- debug.h
- ebitmap.c
- expand.c
- flask.h
- handle.c
- handle.h
- hashtab.c
- hierarchy.c
- ibendport_internal.h
- ibendport_record.c
- ibendports.c
- ibpkey_internal.h
- ibpkey_record.c
- ibpkeys.c
- iface_internal.h
- iface_record.c
- interfaces.c
- kernel_to_cil.c
- kernel_to_common.c
- kernel_to_common.h
- kernel_to_conf.c
- libsepol.a
- libsepol.map.in
- libsepol.pc.in
- link.c
- mls.c
- mls.h
- module.c
- module_internal.h
- module_to_cil.c
- node_internal.h
- node_record.c
- nodes.c
- optimize.c
- polcaps.c
- policydb.c
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
src/libsepol/src/handle.c
C · 1,241 bytes#include <stdlib.h>
#include <assert.h>
#include "handle.h"
#include "debug.h"
sepol_handle_t *sepol_handle_create(void)
{
sepol_handle_t *sh = malloc(sizeof(sepol_handle_t));
if (sh == NULL)
return NULL;
/* Set callback */
sh->msg_callback = sepol_msg_default_handler;
sh->msg_callback_arg = NULL;
/* by default do not disable dontaudits */
sh->disable_dontaudit = 0;
sh->expand_consume_base = 0;
/* by default needless unused branch of tunables would be discarded */
sh->preserve_tunables = 0;
return sh;
}
int sepol_get_preserve_tunables(sepol_handle_t *sh)
{
assert(sh != NULL);
return sh->preserve_tunables;
}
void sepol_set_preserve_tunables(sepol_handle_t * sh, int preserve_tunables)
{
assert(sh !=NULL);
sh->preserve_tunables = preserve_tunables;
}
int sepol_get_disable_dontaudit(sepol_handle_t *sh)
{
assert(sh !=NULL);
return sh->disable_dontaudit;
}
void sepol_set_disable_dontaudit(sepol_handle_t * sh, int disable_dontaudit)
{
assert(sh !=NULL);
sh->disable_dontaudit = disable_dontaudit;
}
void sepol_set_expand_consume_base(sepol_handle_t *sh, int consume_base)
{
assert(sh != NULL);
sh->expand_consume_base = consume_base;
}
void sepol_handle_destroy(sepol_handle_t * sh)
{
free(sh);
}