Fix aufs call of security_path_mknod The security_path_mknod hook requires an encoded 'dev' for its 'dev' paramet but aufs is calling security_path_mknod with a 'dev' that was already converted by 'new_decode_dev(dev)'. However security_path_mknod and its consumer TOMOYO is expecting 'dev' rather than 'new_decode_dev(dev)'. This will result in TOMOYO doing new_decode_dev(new_decode_dev(dev)) (which is wrong) when security_path_mknod() is called from aufs' vfsub_mknod Signed-off-by: Tetsuo Handa <penguin-ker...@i-love.sakura.ne.jp> Signed-off-by: John Johansen <john.johan...@canonical.com>
diff --git a/ubuntu/aufs/vfsub.c b/ubuntu/aufs/vfsub.c index 6ce2fd5..40f6aef 100644 --- a/ubuntu/aufs/vfsub.c +++ b/ubuntu/aufs/vfsub.c @@ -276,7 +276,7 @@ int vfsub_mknod(struct inode *dir, struct path *path, int mo d = path->dentry; path->dentry = d->d_parent; - err = security_path_mknod(path, d, mode, dev); + err = security_path_mknod(path, d, mode, new_encode_dev(dev)); path->dentry = d; if (unlikely(err)) goto out; ------------------------------------------------------------------------------ Free Software Download: Index, Search & Analyze Logs and other IT data in Real-Time with Splunk. Collect, index and harness all the fast moving IT data generated by your applications, servers and devices whether physical, virtual or in the cloud. Deliver compliance at lower cost and gain new business insights. http://p.sf.net/sfu/splunk-dev2dev