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

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

Advertisement

Kernel v2.1.100 /kernel/sched.c

Filename:/kernel/sched.c
Lines Added:4
Lines Deleted:3
Also changed in: (Previous) 2.1.92  2.1.91  2.1.90  2.1.86  2.1.79  2.1.77 
(Following) 2.1.101  2.1.103  2.1.104  2.1.106  2.1.107  2.1.109 

Location
[  2.1.100
  [  kernel
     o  sched.c

Patch

diff -u --recursive --new-file v2.1.99/linux/kernel/sched.c linux/kernel/sched.c
--- v2.1.99/linux/kernel/sched.c   Wed Apr  1 20:11:54 1998
+++ linux/kernel/sched.c   Wed May  6 10:56:06 1998
@@ -1227,7 +1227,7 @@
     
    newprio = increment;
    if (increment < 0) {
-      if (!suser())
+      if (!capable(CAP_SYS_NICE))
          return -EPERM;
       newprio = -increment;
       increase = 1;
@@ -1322,10 +1322,11 @@
       goto out_unlock;
 
    retval = -EPERM;
-   if ((policy == SCHED_FIFO || policy == SCHED_RR) && !suser())
+   if ((policy == SCHED_FIFO || policy == SCHED_RR) && 
+       !capable(CAP_SYS_NICE))
       goto out_unlock;
    if ((current->euid != p->euid) && (current->euid != p->uid) &&
-       !suser())
+       !capable(CAP_SYS_NICE))
       goto out_unlock;
 
    retval = 0;


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