OSDN Git Service

Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris...
[sagit-ice-cold/kernel_xiaomi_msm8998.git] / security / keys / request_key.c
index 0ae3a22..4bd6bdb 100644 (file)
@@ -140,8 +140,8 @@ static int call_sbin_request_key(struct key_construction *cons,
                goto error_link;
 
        /* record the UID and GID */
-       sprintf(uid_str, "%d", cred->fsuid);
-       sprintf(gid_str, "%d", cred->fsgid);
+       sprintf(uid_str, "%d", from_kuid(&init_user_ns, cred->fsuid));
+       sprintf(gid_str, "%d", from_kgid(&init_user_ns, cred->fsgid));
 
        /* we say which key is under construction */
        sprintf(key_str, "%d", key->serial);
@@ -451,7 +451,7 @@ static struct key *construct_key_and_link(struct key_type *type,
 
        kenter("");
 
-       user = key_user_lookup(current_fsuid(), current_user_ns());
+       user = key_user_lookup(current_fsuid());
        if (!user)
                return ERR_PTR(-ENOMEM);