aboutsummaryrefslogtreecommitdiffstats
path: root/net/socket.c
diff options
context:
space:
mode:
authorDavid Woodhouse <dwmw2@shinybook.infradead.org>2005-05-17 12:08:48 +0100
committerDavid Woodhouse <dwmw2@shinybook.infradead.org>2005-05-17 12:08:48 +0100
commit3ec3b2fba526ead2fa3f3d7c91924f39a0733749 (patch)
tree12b9b3de4e0d5bb3c977ea3ef534ba4f7e556cb9 /net/socket.c
parentMerge with master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6.git (diff)
downloadlinux-dev-3ec3b2fba526ead2fa3f3d7c91924f39a0733749.tar.xz
linux-dev-3ec3b2fba526ead2fa3f3d7c91924f39a0733749.zip
AUDIT: Capture sys_socketcall arguments and sockaddrs
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Diffstat (limited to 'net/socket.c')
-rw-r--r--net/socket.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/net/socket.c b/net/socket.c
index cec0cb38b9ce..6b7c3b51a7c1 100644
--- a/net/socket.c
+++ b/net/socket.c
@@ -81,6 +81,7 @@
#include <linux/syscalls.h>
#include <linux/compat.h>
#include <linux/kmod.h>
+#include <linux/audit.h>
#ifdef CONFIG_NET_RADIO
#include <linux/wireless.h> /* Note : will define WIRELESS_EXT */
@@ -226,7 +227,7 @@ int move_addr_to_kernel(void __user *uaddr, int ulen, void *kaddr)
return 0;
if(copy_from_user(kaddr,uaddr,ulen))
return -EFAULT;
- return 0;
+ return audit_sockaddr(ulen, kaddr);
}
/**
@@ -1906,7 +1907,11 @@ asmlinkage long sys_socketcall(int call, unsigned long __user *args)
/* copy_from_user should be SMP safe. */
if (copy_from_user(a, args, nargs[call]))
return -EFAULT;
-
+
+ err = audit_socketcall(nargs[call]/sizeof(unsigned long), args);
+ if (err)
+ return err;
+
a0=a[0];
a1=a[1];