X-Git-Url: http://git.samba.org/samba.git/?p=sfrench%2Fcifs-2.6.git;a=blobdiff_plain;f=security%2Ftomoyo%2Frealpath.c;fp=security%2Ftomoyo%2Frealpath.c;h=08b096e2f7e3c4caadab3b2b2a0d5c2ad3825a5a;hp=bf38fc1b59b2878b42533c349a37646fb2630e0b;hb=c59f415a7cb6e1e1e1cdbd6ee370b050e95f6b21;hpb=6ade99ec6175ab2b54c227521e181e1c3c2bfc8a diff --git a/security/tomoyo/realpath.c b/security/tomoyo/realpath.c index bf38fc1b59b2..08b096e2f7e3 100644 --- a/security/tomoyo/realpath.c +++ b/security/tomoyo/realpath.c @@ -7,6 +7,7 @@ #include "common.h" #include +#include /** * tomoyo_encode2 - Encode binary string to ascii string. @@ -161,9 +162,10 @@ static char *tomoyo_get_local_path(struct dentry *dentry, char * const buffer, if (sb->s_magic == PROC_SUPER_MAGIC && *pos == '/') { char *ep; const pid_t pid = (pid_t) simple_strtoul(pos + 1, &ep, 10); + struct pid_namespace *proc_pidns = proc_pid_ns(d_inode(dentry)); if (*ep == '/' && pid && pid == - task_tgid_nr_ns(current, sb->s_fs_info)) { + task_tgid_nr_ns(current, proc_pidns)) { pos = ep - 5; if (pos < buffer) goto out;