fix mnt_mountpoint abuse in smack
authorAl Viro <viro@zeniv.linux.org.uk>
Sat, 30 Jan 2010 20:27:27 +0000 (15:27 -0500)
committerAl Viro <viro@zeniv.linux.org.uk>
Wed, 3 Mar 2010 19:07:56 +0000 (14:07 -0500)
(mnt,mnt_mountpoint) pair is conceptually wrong; if you want
to use it for generating pathname and for nothing else *and*
if you know that vfsmount tree is unchanging, you can get
away with that, but the right solution for that is (mnt,mnt_root).

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
security/smack/smack_lsm.c

index 529c9ca65878a0139303362316f3e0936b0da8c8..8dffcb7c9d81227d80351e47fd13029d4e3d565c 100644 (file)
@@ -387,7 +387,7 @@ static int smack_sb_umount(struct vfsmount *mnt, int flags)
        struct smk_audit_info ad;
 
        smk_ad_init(&ad, __func__, LSM_AUDIT_DATA_FS);
-       smk_ad_setfield_u_fs_path_dentry(&ad, mnt->mnt_mountpoint);
+       smk_ad_setfield_u_fs_path_dentry(&ad, mnt->mnt_root);
        smk_ad_setfield_u_fs_path_mnt(&ad, mnt);
 
        sbp = mnt->mnt_sb->s_security;