ioctl.c (2d8ad8719591fa803b0d589ed057fa46f49b7155) | ioctl.c (e87cc4728f0e2fb663e592a1141742b1d6c63256) |
---|---|
1/* ATM ioctl handling */ 2 3/* Written 1995-2000 by Werner Almesberger, EPFL LRC/ICA */ 4/* 2003 John Levon <levon@movementarian.org> */ 5 6#define pr_fmt(fmt) KBUILD_MODNAME ":%s: " fmt, __func__ 7 8#include <linux/module.h> --- 83 unchanged lines hidden (view full) --- 92#ifdef CONFIG_COMPAT 93 if (compat) 94 error = compat_sock_get_timestampns(sk, argp); 95 else 96#endif 97 error = sock_get_timestampns(sk, argp); 98 goto done; 99 case ATM_SETSC: | 1/* ATM ioctl handling */ 2 3/* Written 1995-2000 by Werner Almesberger, EPFL LRC/ICA */ 4/* 2003 John Levon <levon@movementarian.org> */ 5 6#define pr_fmt(fmt) KBUILD_MODNAME ":%s: " fmt, __func__ 7 8#include <linux/module.h> --- 83 unchanged lines hidden (view full) --- 92#ifdef CONFIG_COMPAT 93 if (compat) 94 error = compat_sock_get_timestampns(sk, argp); 95 else 96#endif 97 error = sock_get_timestampns(sk, argp); 98 goto done; 99 case ATM_SETSC: |
100 if (net_ratelimit()) 101 pr_warning("ATM_SETSC is obsolete; used by %s:%d\n", 102 current->comm, task_pid_nr(current)); | 100 net_warn_ratelimited("ATM_SETSC is obsolete; used by %s:%d\n", 101 current->comm, task_pid_nr(current)); |
103 error = 0; 104 goto done; 105 case ATMSIGD_CTRL: 106 if (!capable(CAP_NET_ADMIN)) { 107 error = -EPERM; 108 goto done; 109 } 110 /* --- 7 unchanged lines hidden (view full) --- 118 error = -EPERM; 119 goto done; 120 } 121#ifdef CONFIG_COMPAT 122 /* WTF? I don't even want to _think_ about making this 123 work for 32-bit userspace. TBH I don't really want 124 to think about it at all. dwmw2. */ 125 if (compat) { | 102 error = 0; 103 goto done; 104 case ATMSIGD_CTRL: 105 if (!capable(CAP_NET_ADMIN)) { 106 error = -EPERM; 107 goto done; 108 } 109 /* --- 7 unchanged lines hidden (view full) --- 117 error = -EPERM; 118 goto done; 119 } 120#ifdef CONFIG_COMPAT 121 /* WTF? I don't even want to _think_ about making this 122 work for 32-bit userspace. TBH I don't really want 123 to think about it at all. dwmw2. */ 124 if (compat) { |
126 if (net_ratelimit()) 127 pr_warning("32-bit task cannot be atmsigd\n"); | 125 net_warn_ratelimited("32-bit task cannot be atmsigd\n"); |
128 error = -EINVAL; 129 goto done; 130 } 131#endif 132 error = sigd_attach(vcc); 133 if (!error) 134 sock->state = SS_CONNECTED; 135 goto done; --- 236 unchanged lines hidden --- | 126 error = -EINVAL; 127 goto done; 128 } 129#endif 130 error = sigd_attach(vcc); 131 if (!error) 132 sock->state = SS_CONNECTED; 133 goto done; --- 236 unchanged lines hidden --- |