diff options
-rw-r--r-- | security/safesetid/securityfs.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/security/safesetid/securityfs.c b/security/safesetid/securityfs.c index 90784a8d950a..77d301f0ff7a 100644 --- a/security/safesetid/securityfs.c +++ b/security/safesetid/securityfs.c | |||
@@ -59,8 +59,8 @@ static int parse_policy_line( | |||
59 | if (ret) | 59 | if (ret) |
60 | return ret; | 60 | return ret; |
61 | 61 | ||
62 | *parent = make_kuid(current_user_ns(), parsed_parent); | 62 | *parent = make_kuid(file->f_cred->user_ns, parsed_parent); |
63 | *child = make_kuid(current_user_ns(), parsed_child); | 63 | *child = make_kuid(file->f_cred->user_ns, parsed_child); |
64 | if (!uid_valid(*parent) || !uid_valid(*child)) | 64 | if (!uid_valid(*parent) || !uid_valid(*child)) |
65 | return -EINVAL; | 65 | return -EINVAL; |
66 | 66 | ||
@@ -92,7 +92,7 @@ static ssize_t safesetid_file_write(struct file *file, | |||
92 | kuid_t child; | 92 | kuid_t child; |
93 | int ret; | 93 | int ret; |
94 | 94 | ||
95 | if (!ns_capable(current_user_ns(), CAP_MAC_ADMIN)) | 95 | if (!file_ns_capable(file, &init_user_ns, CAP_MAC_ADMIN)) |
96 | return -EPERM; | 96 | return -EPERM; |
97 | 97 | ||
98 | if (*ppos != 0) | 98 | if (*ppos != 0) |