mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
[PATCH] AUDIT_FD_PAIR
Provide an audit record of the descriptor pair returned by pipe() and socketpair(). Rewritten from the original posted to linux-audit by John D. Ramsdell <[email protected]> Signed-off-by: Al Viro <[email protected]>
This commit is contained in:
parent
6a01b07fae
commit
db3495099d
4 changed files with 95 additions and 13 deletions
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Reference in a new issue