packages: kernel/kernel-small_fixes.patch - fix getrlimit (postfix on newer...

arekm arekm at pld-linux.org
Thu Feb 10 19:52:30 CET 2011


Author: arekm                        Date: Thu Feb 10 18:52:30 2011 GMT
Module: packages                      Tag: HEAD
---- Log message:
- fix getrlimit (postfix on newer glibc case)

---- Files affected:
packages/kernel:
   kernel-small_fixes.patch (1.16 -> 1.17) 

---- Diffs:

================================================================
Index: packages/kernel/kernel-small_fixes.patch
diff -u packages/kernel/kernel-small_fixes.patch:1.16 packages/kernel/kernel-small_fixes.patch:1.17
--- packages/kernel/kernel-small_fixes.patch:1.16	Tue Feb  1 19:00:51 2011
+++ packages/kernel/kernel-small_fixes.patch	Thu Feb 10 19:52:25 2011
@@ -141,3 +141,32 @@
  	}
  	mutex_unlock(&xfs_Gqm->qm_dqfrlist_lock);
  	return dqpout;
+commit aa5bd67dcfdf9af34c7fa36ebc87d4e1f7e91873
+Author: Kacper Kornet <kornet at camk.edu.pl>
+Date:   Sat Jan 29 00:21:04 2011 +0100
+
+    Fix prlimit64 for suid/sgid processes
+    
+    Since check_prlimit_permission always fails in the case of SUID/GUID
+    processes, such processes are not able to read or set their own limits.
+    This commit changes this by assuming that process can always read/change
+    its own limits.
+    
+    Signed-off-by: Kacper Kornet <kornet at camk.edu.pl>
+    Acked-by: Jiri Slaby <jslaby at suse.cz>
+    Signed-off-by: Linus Torvalds <torvalds at linux-foundation.org>
+
+diff --git a/kernel/sys.c b/kernel/sys.c
+index 31b71a2..18da702 100644
+--- a/kernel/sys.c
++++ b/kernel/sys.c
+@@ -1385,7 +1385,8 @@ static int check_prlimit_permission(struct task_struct *task)
+ 	const struct cred *cred = current_cred(), *tcred;
+ 
+ 	tcred = __task_cred(task);
+-	if ((cred->uid != tcred->euid ||
++	if (current != task &&
++	    (cred->uid != tcred->euid ||
+ 	     cred->uid != tcred->suid ||
+ 	     cred->uid != tcred->uid  ||
+ 	     cred->gid != tcred->egid ||
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/kernel/kernel-small_fixes.patch?r1=1.16&r2=1.17&f=u



More information about the pld-cvs-commit mailing list