Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris...
[~shefty/rdma-dev.git] / security / keys / request_key.c
index 0ae3a2202771a0b58730b2aee01e4b1f573c2f75..4bd6bdb74193cba33b235b4b8b3934ddc576526c 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);