From: Casey Schaufler Date: Tue, 31 Dec 2013 01:37:45 +0000 (-0800) Subject: Smack: File receive audit correction X-Git-Tag: submit/tizen_common/20140905.094502~14^2~11 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3b2eabfc4d5446af0bd950f7d7725e3299eff90d;p=sdk%2Femulator%2Femulator-kernel.git Smack: File receive audit correction Eric Paris politely points out: Inside smack_file_receive() it seems like you are initting the audit field with LSM_AUDIT_DATA_TASK. And then use smk_ad_setfield_u_fs_path(). Seems like LSM_AUDIT_DATA_PATH would make more sense. (and depending on how it's used fix a crash...) He is correct. This puts things in order. Targeted for git://git.gitorious.org/smack-next/kernel.git Change-Id: Ie9d53ecac34d6332658c74739596ae7056574bad Signed-off-by: Casey Schaufler --- diff --git a/security/smack/smack_lsm.c b/security/smack/smack_lsm.c index 35a3a02e8ddb..5e4ed2e18820 100644 --- a/security/smack/smack_lsm.c +++ b/security/smack/smack_lsm.c @@ -1351,7 +1351,7 @@ static int smack_file_receive(struct file *file) int may = 0; struct smk_audit_info ad; - smk_ad_init(&ad, __func__, LSM_AUDIT_DATA_TASK); + smk_ad_init(&ad, __func__, LSM_AUDIT_DATA_PATH); smk_ad_setfield_u_fs_path(&ad, file->f_path); /* * This code relies on bitmasks.