lkml.org 
[lkml]   [2002]   [Jun]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
SubjectRe: [PATCH] Fix sys_capset in 2.5.20+patches...
From
Date
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;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:26    [W:0.346 / U:0.068 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site