提交 ded50988 编写于 作者: R Roy.Li 提交者: Eric Paris

SELinux: skip file_name_trans_write() when policy downgraded.

When policy version is less than POLICYDB_VERSION_FILENAME_TRANS,
skip file_name_trans_write().
Signed-off-by: NRoy.Li <rongqing.li@windriver.com>
Signed-off-by: NEric Paris <eparis@redhat.com>
上级 0f7e4c33
......@@ -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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册