Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 305997
b: refs/heads/master
c: 76b6db0
h: refs/heads/master
i:
  305995: 4407340
v: v3
  • Loading branch information
Eric W. Biederman committed May 3, 2012
1 parent 0cf0cf6 commit 38279c0
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 18 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 078de5f706ece36afd73bb4b8283314132d2dfdf
refs/heads/master: 76b6db010297d4928ab7b7e7c78dd982f413f0a4
12 changes: 0 additions & 12 deletions trunk/include/linux/user_namespace.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,16 +69,4 @@ static inline void put_user_ns(struct user_namespace *ns)

#endif

static inline uid_t user_ns_map_uid(struct user_namespace *to,
const struct cred *cred, kuid_t uid)
{
return from_kuid_munged(to, uid);
}

static inline gid_t user_ns_map_gid(struct user_namespace *to,
const struct cred *cred, kgid_t gid)
{
return from_kgid_munged(to, gid);
}

#endif /* _LINUX_USER_H */
3 changes: 1 addition & 2 deletions trunk/ipc/mqueue.c
Original file line number Diff line number Diff line change
Expand Up @@ -538,8 +538,7 @@ static void __do_notify(struct mqueue_inode_info *info)
rcu_read_lock();
sig_i.si_pid = task_tgid_nr_ns(current,
ns_of_pid(info->notify_owner));
sig_i.si_uid = user_ns_map_uid(info->notify_user_ns,
current_cred(), current_uid());
sig_i.si_uid = from_kuid_munged(info->notify_user_ns, current_uid());
rcu_read_unlock();

kill_pid_info(info->notify.sigev_signo,
Expand Down
2 changes: 1 addition & 1 deletion trunk/kernel/signal.c
Original file line number Diff line number Diff line change
Expand Up @@ -1026,7 +1026,7 @@ static inline int legacy_queue(struct sigpending *signals, int sig)
static inline uid_t map_cred_ns(const struct cred *cred,
struct user_namespace *ns)
{
return user_ns_map_uid(ns, cred, cred->uid);
return from_kuid_munged(ns, cred->uid);
}

#ifdef CONFIG_USER_NS
Expand Down
4 changes: 2 additions & 2 deletions trunk/net/core/sock.c
Original file line number Diff line number Diff line change
Expand Up @@ -821,8 +821,8 @@ void cred_to_ucred(struct pid *pid, const struct cred *cred,
if (cred) {
struct user_namespace *current_ns = current_user_ns();

ucred->uid = user_ns_map_uid(current_ns, cred, cred->euid);
ucred->gid = user_ns_map_gid(current_ns, cred, cred->egid);
ucred->uid = from_kuid(current_ns, cred->euid);
ucred->gid = from_kgid(current_ns, cred->egid);
}
}
EXPORT_SYMBOL_GPL(cred_to_ucred);
Expand Down

0 comments on commit 38279c0

Please sign in to comment.