public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Fix sys_capset in 2.5.20+patches...
@ 2002-06-06  2:07 Peter Chubb
  2002-06-06  2:18 ` Robert Love
  0 siblings, 1 reply; 2+ messages in thread
From: Peter Chubb @ 2002-06-06  2:07 UTC (permalink / raw)
  To: linux-kernel, rml, trivial


Hi,
	The current head-of-bk-tree 2.5 kernel breaks capset() (and so
named, for one, won't run).  SYS_setcap() will *always* return -EINVAL
with the current tree.



--- /tmp/geta315	Thu Jun  6 12:05:43 2002
+++ linux-2.5-import/kernel/capability.c	Thu Jun  6 12:05:19 2002
@@ -134,10 +134,11 @@
      if (get_user(version, &header->version))
 	     return -EFAULT; 
 
-     if (version != _LINUX_CAPABILITY_VERSION)
+     if (version != _LINUX_CAPABILITY_VERSION) {
 	     if (put_user(_LINUX_CAPABILITY_VERSION, &header->version))
 		     return -EFAULT; 
              return -EINVAL;
+     }
 
      if (get_user(pid, &header->pid))
 	     return -EFAULT; 


--
Peter C					    peterc@gelato.unsw.edu.au
You are lost in a maze of BitKeeper repositories, all almost the same.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] Fix sys_capset in 2.5.20+patches...
  2002-06-06  2:07 [PATCH] Fix sys_capset in 2.5.20+patches Peter Chubb
@ 2002-06-06  2:18 ` Robert Love
  0 siblings, 0 replies; 2+ messages in thread
From: Robert Love @ 2002-06-06  2:18 UTC (permalink / raw)
  To: torvalds; +Cc: linux-kernel, trivial, Peter Chubb

On Wed, 2002-06-05 at 19:07, Peter Chubb wrote:

> 	The current head-of-bk-tree 2.5 kernel breaks capset() (and so
> named, for one, won't run).  SYS_setcap() will *always* return -EINVAL
> with the current tree.

Ugh, do I really need braces there???

(there is another occurrence of this, too... brown paper bag me)

Linus, please apply this patch.  Against 2.5-bk...

	Robert Love

--- linux-2.5.20/kernel/capability.c	Wed Jun  5 19:16:11 2002
+++ linux/kernel/capability.c	Wed Jun  5 19:15:49 2002
@@ -39,13 +39,14 @@
      if (get_user(version, &header->version))
 	     return -EFAULT;
 
-     if (version != _LINUX_CAPABILITY_VERSION)
+     if (version != _LINUX_CAPABILITY_VERSION) {
 	     if (put_user(_LINUX_CAPABILITY_VERSION, &header->version))
 		     return -EFAULT; 
              return -EINVAL;
+     }
 
      if (get_user(pid, &header->pid))
-	     return -EFAULT; 
+	     return -EFAULT;
 
      if (pid < 0) 
              return -EINVAL;
@@ -134,10 +135,11 @@
      if (get_user(version, &header->version))
 	     return -EFAULT; 
 
-     if (version != _LINUX_CAPABILITY_VERSION)
+     if (version != _LINUX_CAPABILITY_VERSION) {
 	     if (put_user(_LINUX_CAPABILITY_VERSION, &header->version))
 		     return -EFAULT; 
              return -EINVAL;
+     }
 
      if (get_user(pid, &header->pid))
 	     return -EFAULT; 


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-06-06  2:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-06-06  2:07 [PATCH] Fix sys_capset in 2.5.20+patches Peter Chubb
2002-06-06  2:18 ` Robert Love

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox