summaryrefslogtreecommitdiff
path: root/security/lsm_audit.c
diff options
context:
space:
mode:
authorFlorian Westphal <fw@strlen.de>2020-11-30 16:36:29 +0100
committerJakub Kicinski <kuba@kernel.org>2020-12-03 12:56:03 -0800
commit41dd9596d6b239a125c3d19f9d0ca90bdbfbf876 (patch)
treee9f12745deb241b4feaa431938dffcb79b5a6881 /security/lsm_audit.c
parentd4bff72c8401e6f56194ecf455db70ebc22929e2 (diff)
downloadlwn-41dd9596d6b239a125c3d19f9d0ca90bdbfbf876.tar.gz
lwn-41dd9596d6b239a125c3d19f9d0ca90bdbfbf876.zip
security: add const qualifier to struct sock in various places
A followup change to tcp_request_sock_op would have to drop the 'const' qualifier from the 'route_req' function as the 'security_inet_conn_request' call is moved there - and that function expects a 'struct sock *'. However, it turns out its also possible to add a const qualifier to security_inet_conn_request instead. Signed-off-by: Florian Westphal <fw@strlen.de> Acked-by: James Morris <jamorris@linux.microsoft.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'security/lsm_audit.c')
-rw-r--r--security/lsm_audit.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/security/lsm_audit.c b/security/lsm_audit.c
index 53d0d183db8f..078f9cdcd7f5 100644
--- a/security/lsm_audit.c
+++ b/security/lsm_audit.c
@@ -183,7 +183,7 @@ int ipv6_skb_to_auditdata(struct sk_buff *skb,
static inline void print_ipv6_addr(struct audit_buffer *ab,
- struct in6_addr *addr, __be16 port,
+ const struct in6_addr *addr, __be16 port,
char *name1, char *name2)
{
if (!ipv6_addr_any(addr))
@@ -322,7 +322,7 @@ static void dump_common_audit_data(struct audit_buffer *ab,
}
case LSM_AUDIT_DATA_NET:
if (a->u.net->sk) {
- struct sock *sk = a->u.net->sk;
+ const struct sock *sk = a->u.net->sk;
struct unix_sock *u;
struct unix_address *addr;
int len = 0;