Update of /cvsroot/ssic-linux/openssi/kernel/kernel
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1967/kernel
Modified Files:
Tag: OPENSSI-RH
sys.c
Log Message:
cluster/ssi/vproc/pvp.svc
cluster/ssi/vproc/dvp_pvpops.c
cluster/ssi/vproc/rvp_pvpops_server.c
kernel/sys.c
- Fix setpriority() to find remote processes and pass in the uid
for correct permission checks.
Index: sys.c
===================================================================
RCS file: /cvsroot/ssic-linux/openssi/kernel/kernel/Attic/sys.c,v
retrieving revision 1.2.2.8
retrieving revision 1.2.2.9
diff -C2 -d -r1.2.2.8 -r1.2.2.9
*** sys.c 6 Jan 2004 04:06:38 -0000 1.2.2.8
--- sys.c 25 Feb 2004 00:22:28 -0000 1.2.2.9
***************
*** 256,261 ****
--- 256,263 ----
if (!who)
who = current->pid;
+ #ifndef CONFIG_SSI
p = find_task_by_pid(who);
if (p)
+ #endif
error = SETPRIORITY(which, who, niceval,
current->uid, current->euid);
break;
***************
*** 299,305 ****
#ifdef CONFIG_SSI
long
! set_task_priority(struct task_struct *p, int niceval, int err)
{
! return set_one_prio(p, niceval, err);
}
--- 301,313 ----
#ifdef CONFIG_SSI
long
! set_task_priority(struct task_struct *p, int niceval, int uid)
{
! int save_uid = current->uid;
! int error = -ESRCH;
!
! current->uid = uid;
! error = set_one_prio(p, niceval, error);
! current->uid = save_uid;
! return error;
}
***************
*** 426,429 ****
--- 434,440 ----
if (!who)
who = current->pid;
+ #ifdef CONFIG_SSI
+ retval = GETPRIORITY(which, who);
+ #else
p = find_task_by_pid(who);
if (p) {
***************
*** 432,435 ****
--- 443,447 ----
retval = niceval;
}
+ #endif
break;
case PRIO_PGRP:
-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
|