Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 362611
b: refs/heads/master
c: 41c21e3
h: refs/heads/master
i:
  362609: a4e8dc2
  362607: 8d10e16
v: v3
  • Loading branch information
Andy Lutomirski committed Apr 15, 2013
1 parent 269c9ae commit 37927dc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 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: e3211c120a85b792978bcb4be7b2886df18d27f0
refs/heads/master: 41c21e351e79004dbb4efa4bc14a53a7e0af38c5
6 changes: 3 additions & 3 deletions trunk/kernel/user_namespace.c
Original file line number Diff line number Diff line change
Expand Up @@ -613,10 +613,10 @@ static ssize_t map_write(struct file *file, const char __user *buf,
if (map->nr_extents != 0)
goto out;

/* Require the appropriate privilege CAP_SETUID or CAP_SETGID
* over the user namespace in order to set the id mapping.
/*
* Adjusting namespace settings requires capabilities on the target.
*/
if (cap_valid(cap_setid) && !ns_capable(ns, cap_setid))
if (cap_valid(cap_setid) && !file_ns_capable(file, ns, CAP_SYS_ADMIN))
goto out;

/* Get a buffer */
Expand Down

0 comments on commit 37927dc

Please sign in to comment.