summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-02-20 00:29:54 +0300
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-02-20 00:29:54 +0300
commitcb4aaf46c0283dd79ab2e8b8b165c0bf13ab6194 (patch)
tree2e01de06d4740300cfcfbb9e9f9fd3b7078dd3ce /fs
parent874ff01bd9183ad16495acfd54e93a619d12b8b5 (diff)
parentdb3495099d3d52854b13874905af6e40a91f4721 (diff)
downloadlinux-cb4aaf46c0283dd79ab2e8b8b165c0bf13ab6194.tar.xz
Merge branch 'audit.b37' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/audit-current
* 'audit.b37' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/audit-current: [PATCH] AUDIT_FD_PAIR [PATCH] audit config lockdown [PATCH] minor update to rule add/delete messages (ver 2)
Diffstat (limited to 'fs')
-rw-r--r--fs/pipe.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/fs/pipe.c b/fs/pipe.c
index 68090e84f589..ebafde7d6aba 100644
--- a/fs/pipe.c
+++ b/fs/pipe.c
@@ -16,6 +16,7 @@
#include <linux/uio.h>
#include <linux/highmem.h>
#include <linux/pagemap.h>
+#include <linux/audit.h>
#include <asm/uaccess.h>
#include <asm/ioctls.h>
@@ -985,6 +986,10 @@ int do_pipe(int *fd)
goto err_fdr;
fdw = error;
+ error = audit_fd_pair(fdr, fdw);
+ if (error < 0)
+ goto err_fdw;
+
fd_install(fdr, fr);
fd_install(fdw, fw);
fd[0] = fdr;
@@ -992,6 +997,8 @@ int do_pipe(int *fd)
return 0;
+ err_fdw:
+ put_unused_fd(fdw);
err_fdr:
put_unused_fd(fdr);
err_read_pipe: