projects
/
linux-block.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e36f724
)
pipe: F_SETPIPE_SZ should return -EPERM for non-root
author
Jens Axboe
<jens.axboe@oracle.com>
Mon, 24 May 2010 17:15:57 +0000
(19:15 +0200)
committer
Jens Axboe
<jens.axboe@oracle.com>
Mon, 24 May 2010 17:15:57 +0000
(19:15 +0200)
If the passed in size is larger than what has been set as the
system wide limit and the user is not root, we want to return
permission denied (not invalid value).
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
fs/pipe.c
patch
|
blob
|
blame
|
history
diff --git
a/fs/pipe.c
b/fs/pipe.c
index d79872eba09a56a03ade25f28a9d9cc8c8b86cb8..01ca9fab95fac24db82cec25f7ef748addce0060 100644
(file)
--- a/
fs/pipe.c
+++ b/
fs/pipe.c
@@
-1170,7
+1170,7
@@
long pipe_fcntl(struct file *file, unsigned int cmd, unsigned long arg)
switch (cmd) {
case F_SETPIPE_SZ:
if (!capable(CAP_SYS_ADMIN) && arg > pipe_max_pages)
- return -E
INVAL
;
+ return -E
PERM
;
/*
* The pipe needs to be at least 2 pages large to
* guarantee POSIX behaviour.