Fix common_audit_data type for smack_inode_unlink() and smack_inode_rmdir()
authorDongsu Kim <dongsu17.kim@samsung.com>
Fri, 8 Mar 2013 05:20:39 +0000 (14:20 +0900)
committerKitae Kim <kt920.kim@samsung.com>
Tue, 21 May 2013 06:39:52 +0000 (15:39 +0900)
Change-Id: I39afcae6eeff869733b820f8f654fae5bf47f7e7
Signed-off-by: Dongsu Kim <dongsu17.kim@samsung.com>
Reviewed-on: http://165.213.202.130:8080/52126
Reviewed-by: Kyungmin Park <kyungmin.park@samsung.com>
Tested-by: Kyungmin Park <kyungmin.park@samsung.com>
security/smack/smack_lsm.c

index 3f95c4ff17bd497f7c8c75d4b750b0ff8669c47c..52d6d14c778737f373a6d506c4f6300d04310498 100644 (file)
@@ -654,7 +654,7 @@ static int smack_inode_unlink(struct inode *dir, struct dentry *dentry)
                /*
                 * You also need write access to the containing directory
                 */
-               smk_ad_setfield_u_fs_path_dentry(&ad, NULL);
+               smk_ad_init(&ad, __func__, LSM_AUDIT_DATA_INODE);
                smk_ad_setfield_u_fs_inode(&ad, dir);
                rc = smk_curacc(smk_of_inode(dir), MAY_WRITE, &ad);
        }
@@ -685,7 +685,7 @@ static int smack_inode_rmdir(struct inode *dir, struct dentry *dentry)
                /*
                 * You also need write access to the containing directory
                 */
-               smk_ad_setfield_u_fs_path_dentry(&ad, NULL);
+               smk_ad_init(&ad, __func__, LSM_AUDIT_DATA_INODE);
                smk_ad_setfield_u_fs_inode(&ad, dir);
                rc = smk_curacc(smk_of_inode(dir), MAY_WRITE, &ad);
        }