Linux Headquarters
[ Register ]
[ About us ] [ Home Page ]

Advertisement
[ Kernel ] [ Documentation ] [ Links ] [ Books ]

Advertisement

Kernel v2.6.24.7 /security/commoncap.c

Filename:/security/commoncap.c
Lines Added:0
Lines Deleted:39
Also changed in: (Previous) 2.6.24.6  2.6.24.5  2.6.24.5-rc2  2.6.24.5-rc1  2.6.24.4  2.6.24.4-rc3 
(Following) 2.6.25.20-rc1  2.6.25.20  2.6.26-rc2  2.6.26-rc3  2.6.26-rc4  2.6.26-rc5 

Location
[  2.6.24.7
  [  security
     o  commoncap.c

Patch

diff --git a/security/commoncap.c b/security/commoncap.c
index ea61bc7..6e9065c 100644
--- a/security/commoncap.c
+++ b/security/commoncap.c
@@ -527,40 +527,6 @@ int cap_task_setnice (struct task_struct *p, int nice)
    return cap_safe_nice(p);
 }
 
-int cap_task_kill(struct task_struct *p, struct siginfo *info,
-            int sig, u32 secid)
-{
-   if (info != SEND_SIG_NOINFO && (is_si_special(info) || SI_FROMKERNEL(info)))
-      return 0;
-
-   /*
-    * Running a setuid root program raises your capabilities.
-    * Killing your own setuid root processes was previously
-    * allowed.
-    * We must preserve legacy signal behavior in this case.
-    */
-   if (p->euid == 0 && p->uid == current->uid)
-      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.
-       * Capabilities are ignored.  May be wrong, but it's the
-       * only thing we can do at the moment.
-       * Used only by usb drivers?
-       */
-      return 0;
-   if (cap_issubset(p->cap_permitted, current->cap_permitted))
-      return 0;
-   if (capable(CAP_KILL))
-      return 0;
-
-   return -EPERM;
-}
 #else
 int cap_task_setscheduler (struct task_struct *p, int policy,
             struct sched_param *lp)
@@ -575,11 +541,6 @@ int cap_task_setnice (struct task_struct *p, int nice)
 {
    return 0;
 }
-int cap_task_kill(struct task_struct *p, struct siginfo *info,
-            int sig, u32 secid)
-{
-   return 0;
-}
 #endif
 
 void cap_task_reparent_to_init (struct task_struct *p)


Comments: webmaster (at) linuxhq.com.
Advertising: banners (at) linuxhq.com.
Compilation ©1998-2008 Linux Headquarters, Inc.