-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Referred from Chainfire/selinux@9741246
- Loading branch information
Showing
5 changed files
with
69 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#include <stdio.h> | ||
|
||
#include "android_m_compat.h" | ||
|
||
unsigned int avtab_android_m_compat; | ||
|
||
void avtab_android_m_compat_set(void) | ||
{ | ||
if (!avtab_android_m_compat) { | ||
fprintf(stderr, "(Android M policy compatibility mode)\n"); | ||
avtab_android_m_compat = 1; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
/* | ||
* extended permissions compatibility. Make ToT Android kernels compatible | ||
* with Android M releases | ||
*/ | ||
#define AVTAB_OPTYPE_ALLOWED 0x1000 | ||
#define AVTAB_OPTYPE_AUDITALLOW 0x2000 | ||
#define AVTAB_OPTYPE_DONTAUDIT 0x4000 | ||
#define AVTAB_OPTYPE (AVTAB_OPTYPE_ALLOWED | \ | ||
AVTAB_OPTYPE_AUDITALLOW | \ | ||
AVTAB_OPTYPE_DONTAUDIT) | ||
#define AVTAB_XPERMS_OPTYPE 4 | ||
|
||
#define avtab_xperms_to_optype(x) (x << AVTAB_XPERMS_OPTYPE) | ||
#define avtab_optype_to_xperms(x) (x >> AVTAB_XPERMS_OPTYPE) | ||
|
||
extern unsigned int avtab_android_m_compat; | ||
|
||
void avtab_android_m_compat_set(void); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters