projects
/
GitHub
/
LineageOS
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0f7e4c3
)
SELinux: skip file_name_trans_write() when policy downgraded.
author
Roy.Li
<rongqing.li@windriver.com>
Fri, 20 May 2011 02:38:06 +0000
(10:38 +0800)
committer
Eric Paris
<eparis@redhat.com>
Tue, 14 Jun 2011 16:58:51 +0000
(12:58 -0400)
When policy version is less than POLICYDB_VERSION_FILENAME_TRANS,
skip file_name_trans_write().
Signed-off-by: Roy.Li <rongqing.li@windriver.com>
Signed-off-by: Eric Paris <eparis@redhat.com>
security/selinux/ss/policydb.c
patch
|
blob
|
blame
|
history
diff --git
a/security/selinux/ss/policydb.c
b/security/selinux/ss/policydb.c
index 102e9ec1b77a327477592b05a8e60933d348d7c1..d246aca3f4fbd43563bf01d20d78e28feb826ad8 100644
(file)
--- a/
security/selinux/ss/policydb.c
+++ b/
security/selinux/ss/policydb.c
@@
-3222,6
+3222,9
@@
static int filename_trans_write(struct policydb *p, void *fp)
__le32 buf[1];
int rc;
+ if (p->policyvers < POLICYDB_VERSION_FILENAME_TRANS)
+ return 0;
+
nel = 0;
rc = hashtab_map(p->filename_trans, hashtab_cnt, &nel);
if (rc)