Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
DisableSELinux from Debian-NoRoot
/*
Code from the Debian NoRoot Project
https://github.com/pelya/debian-noroot/blob/master/disableselinux/disableselinux.c
*/
#include <errno.h>
extern int audit_open (void);
int audit_open (void)
{
errno = EPROTONOSUPPORT;
return -1;
}
extern int is_selinux_enabled (void);
int is_selinux_enabled (void)
{
return 0;
}
extern int setexecfilecon (const char *filename, const char *fallback_type);
int setexecfilecon (const char *filename, const char *fallback_type)
{
return 0;
}
extern int setexeccon(const char * con);
int setexeccon(const char * con)
{
return 0;
}
extern int setfilecon(const char *path, const char * con);
int setfilecon(const char *path, const char * con)
{
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.