diff options
Diffstat (limited to 'net/socket.c')
-rw-r--r-- | net/socket.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/net/socket.c b/net/socket.c index cec0cb38b9ce..38729af09461 100644 --- a/net/socket.c +++ b/net/socket.c | |||
@@ -81,6 +81,7 @@ | |||
81 | #include <linux/syscalls.h> | 81 | #include <linux/syscalls.h> |
82 | #include <linux/compat.h> | 82 | #include <linux/compat.h> |
83 | #include <linux/kmod.h> | 83 | #include <linux/kmod.h> |
84 | #include <linux/audit.h> | ||
84 | 85 | ||
85 | #ifdef CONFIG_NET_RADIO | 86 | #ifdef CONFIG_NET_RADIO |
86 | #include <linux/wireless.h> /* Note : will define WIRELESS_EXT */ | 87 | #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) | |||
226 | return 0; | 227 | return 0; |
227 | if(copy_from_user(kaddr,uaddr,ulen)) | 228 | if(copy_from_user(kaddr,uaddr,ulen)) |
228 | return -EFAULT; | 229 | return -EFAULT; |
229 | return 0; | 230 | return audit_sockaddr(ulen, kaddr); |
230 | } | 231 | } |
231 | 232 | ||
232 | /** | 233 | /** |
@@ -1906,7 +1907,11 @@ asmlinkage long sys_socketcall(int call, unsigned long __user *args) | |||
1906 | /* copy_from_user should be SMP safe. */ | 1907 | /* copy_from_user should be SMP safe. */ |
1907 | if (copy_from_user(a, args, nargs[call])) | 1908 | if (copy_from_user(a, args, nargs[call])) |
1908 | return -EFAULT; | 1909 | return -EFAULT; |
1909 | 1910 | ||
1911 | err = audit_socketcall(nargs[call]/sizeof(unsigned long), a); | ||
1912 | if (err) | ||
1913 | return err; | ||
1914 | |||
1910 | a0=a[0]; | 1915 | a0=a[0]; |
1911 | a1=a[1]; | 1916 | a1=a[1]; |
1912 | 1917 | ||