projects/linux·blob master · refs

36 lines · 1.3 KiB

1/* SPDX-License-Identifier: GPL-2.0-only */
2/*
3 * AppArmor security module
4 *
5 * This file contains AppArmor inet/inet6 fine grained mediation
6 *
7 * Copyright 2024 Canonical Ltd.
8 *
9 * This program is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License as
11 * published by the Free Software Foundation, version 2 of the
12 * License.
13 */
14#ifndef __AA_AF_INET_H
15#define __AA_AF_INET_H
16
17#include "label.h"
18
19int aa_inet_sock_perm(const char *op, u32 request, struct socket *sock);
20int aa_inet_create_perm(struct aa_label *label, int family, int type,
21 int protocol);
22int aa_inet_bind_perm(struct socket *sock, struct sockaddr *address,
23 int addrlen);
24int aa_inet_connect_perm(struct socket *sock, struct sockaddr *address,
25 int addrlen);
26int aa_inet_listen_perm(struct socket *sock, int backlog);
27int aa_inet_accept_perm(struct socket *sock, struct socket *newsock);
28int aa_inet_msg_perm(const char *op, u32 request, struct socket *sock,
29 struct msghdr *msg, int size);
30int aa_inet_opt_perm(const char *op, u32 request, struct socket *sock, int level,
31 int optname);
32int aa_inet_file_perm(const struct cred *subj_cred,
33 struct aa_label *label, const char *op, u32 request,
34 struct socket *sock);
35
36#endif /* __AA_AF_INET_H */