[patch 19/23] openmosix/openmosix-set-info_02.patch

Florian Delizy <[email protected]> Mon, 25 Sep 2006 17:34:36 +0200
Newsgroups gmane.linux.cluster.openmosix.devel
Message-ID <[email protected]>
(updated to work on the top of the patch tree)

Instead of calling sys_* functions to set uid,gid,guid,ruid on the
migrated process,... just set them directly. This was how it was
originally and I changed it trying to fix other bugs. This is tha back
out.

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

_______________________________________________
openMosix-devel mailing list
openMosix-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/openmosix-devel
openmosix-set-info_02.patch (text/x-patch, 1.2 KB)
Instead of calling sys_* functions to set uid,gid,guid,ruid on the
migrated process,... just set them directly.  This was how it was
originally and I changed it trying to fix other bugs.  This is tha back
out.
Index: linux/hpc/migrecv.c
===================================================================
--- linux.orig/hpc/migrecv.c	2006-09-25 16:27:40.000000000 +0200
+++ linux/hpc/migrecv.c	2006-09-25 16:35:57.000000000 +0200
@@ -434,12 +434,14 @@
 	p->om.tgid = m->tgid;
 
 	/* copy credentials */
-	sys_setuid(m->uid);
-	sys_setresuid(m->uid,m->euid,m->suid);
-	sys_setfsuid(m->fsuid);
-	sys_setgid(m->gid);
-	sys_setresgid(m->gid, m->egid, m->sgid);
-	sys_setfsgid(m->fsgid);
+ 	p->uid = m->uid;
+ 	p->euid = m->euid;
+ 	p->suid = m->suid;
+ 	p->fsuid = m->fsuid;
+ 	p->gid = m->gid;
+ 	p->egid = m->egid;
+ 	p->sgid = m->sgid;
+ 	p->fsgid = m->fsgid;
 
 	/* signals stuffs */
 	p->blocked = m->blocked;
@@ -452,8 +454,7 @@
   	/* FIXME we don't trust the other node anyway so copy rlimit from node[nr] */
 
   	memcpy(p->comm, m->comm, sizeof(m->comm));
-	/* p->personality = m->personality;*/
-	set_personality(m->personality);
+ 	p->personality = m->personality;
 	arch_pick_mmap_layout(p->mm);
 
 	kcom_send_ack(p, pkt);