]> nv-tegra.nvidia Code Review - linux-3.10.git/blobdiff - security/commoncap.c
file capabilities: allow sigcont within session
[linux-3.10.git] / security / commoncap.c
index bf67871173efbabbe2ad47a04ba1f24cbc6d3eeb..302e8d0839a9c7afaacff955e4a67874192117be 100644 (file)
@@ -526,6 +526,10 @@ int cap_task_kill(struct task_struct *p, struct siginfo *info,
        if (info != SEND_SIG_NOINFO && (is_si_special(info) || SI_FROMKERNEL(info)))
                return 0;
 
+       /* sigcont is permitted within same session */
+       if (sig == SIGCONT && (task_session_nr(current) == task_session_nr(p)))
+               return 0;
+
        if (secid)
                /*
                 * Signal sent as a particular user.