diff options
author | Adrian Reber <areber@redhat.com> | 2020-07-19 12:04:12 +0200 |
---|---|---|
committer | Christian Brauner <christian.brauner@ubuntu.com> | 2020-07-19 20:14:42 +0200 |
commit | 1caef81da05a84a40dbf02110e967ce6d1135ff6 (patch) | |
tree | 294f2859d9adb62bb046d265d50d1eba81c63698 /kernel/pid.c | |
parent | 124ea650d3072b005457faed69909221c2905a1f (diff) | |
download | linux-1caef81da05a84a40dbf02110e967ce6d1135ff6.tar.bz2 |
pid: use checkpoint_restore_ns_capable() for set_tid
Use the newly introduced capability CAP_CHECKPOINT_RESTORE to allow
using clone3() with set_tid set.
Signed-off-by: Adrian Reber <areber@redhat.com>
Signed-off-by: Nicolas Viennot <Nicolas.Viennot@twosigma.com>
Reviewed-by: Serge Hallyn <serge@hallyn.com>
Acked-by: Christian Brauner <christian.brauner@ubuntu.com>
Link: https://lore.kernel.org/r/20200719100418.2112740-3-areber@redhat.com
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Diffstat (limited to 'kernel/pid.c')
-rw-r--r-- | kernel/pid.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/pid.c b/kernel/pid.c index f1496b757162..450d40469b1c 100644 --- a/kernel/pid.c +++ b/kernel/pid.c @@ -198,7 +198,7 @@ struct pid *alloc_pid(struct pid_namespace *ns, pid_t *set_tid, if (tid != 1 && !tmp->child_reaper) goto out_free; retval = -EPERM; - if (!ns_capable(tmp->user_ns, CAP_SYS_ADMIN)) + if (!checkpoint_restore_ns_capable(tmp->user_ns)) goto out_free; set_tid_size--; } |