diff options
author | James Morris <james.l.morris@oracle.com> | 2014-11-19 21:36:07 +1100 |
---|---|---|
committer | James Morris <james.l.morris@oracle.com> | 2014-11-19 21:36:07 +1100 |
commit | a6aacbde406eeb6f8fc218b2c6172825f5e73fcf (patch) | |
tree | b79e1a17c38090915085f0dbb501a0970cb79b28 /security/integrity/ima/ima_api.c | |
parent | b10778a00d40b3d9fdaaf5891e802794781ff71c (diff) | |
parent | 6fb5032ebb1c5b852461d64ee33829081de8ca61 (diff) | |
download | linux-a6aacbde406eeb6f8fc218b2c6172825f5e73fcf.tar.bz2 |
Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/zohar/linux-integrity into next
Diffstat (limited to 'security/integrity/ima/ima_api.c')
-rw-r--r-- | security/integrity/ima/ima_api.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/security/integrity/ima/ima_api.c b/security/integrity/ima/ima_api.c index 86885979918c..b0dc922d8be3 100644 --- a/security/integrity/ima/ima_api.c +++ b/security/integrity/ima/ima_api.c @@ -173,8 +173,7 @@ int ima_get_action(struct inode *inode, int mask, int function) { int flags = IMA_MEASURE | IMA_AUDIT | IMA_APPRAISE; - if (!ima_appraise) - flags &= ~IMA_APPRAISE; + flags &= ima_policy_flag; return ima_match_policy(inode, function, mask, flags); } @@ -325,11 +324,11 @@ const char *ima_d_path(struct path *path, char **pathbuf) { char *pathname = NULL; - *pathbuf = kmalloc(PATH_MAX, GFP_KERNEL); + *pathbuf = __getname(); if (*pathbuf) { pathname = d_absolute_path(path, *pathbuf, PATH_MAX); if (IS_ERR(pathname)) { - kfree(*pathbuf); + __putname(*pathbuf); *pathbuf = NULL; pathname = NULL; } |