You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
netlabel: Cleanup the Smack/NetLabel code to fix incoming TCP connections
This patch cleans up a lot of the Smack network access control code. The largest changes are to fix the labeling of incoming TCP connections in a manner similar to the recent SELinux changes which use the security_inet_conn_request() hook to label the request_sock and let the label move to the child socket via the normal network stack mechanisms. In addition to the incoming TCP connection fixes this patch also removes the smk_labled field from the socket_smack struct as the minor optimization advantage was outweighed by the difficulty in maintaining it's proper state. Signed-off-by: Paul Moore <paul.moore@hp.com> Acked-by: Casey Schaufler <casey@schaufler-ca.com> Signed-off-by: James Morris <jmorris@namei.org>
This commit is contained in:
@@ -417,6 +417,7 @@ int netlbl_conn_setattr(struct sock *sk,
|
||||
const struct netlbl_lsm_secattr *secattr);
|
||||
int netlbl_req_setattr(struct request_sock *req,
|
||||
const struct netlbl_lsm_secattr *secattr);
|
||||
void netlbl_req_delattr(struct request_sock *req);
|
||||
int netlbl_skbuff_setattr(struct sk_buff *skb,
|
||||
u16 family,
|
||||
const struct netlbl_lsm_secattr *secattr);
|
||||
@@ -547,6 +548,10 @@ static inline int netlbl_req_setattr(struct request_sock *req,
|
||||
{
|
||||
return -ENOSYS;
|
||||
}
|
||||
static inline void netlbl_req_delattr(struct request_sock *req)
|
||||
{
|
||||
return;
|
||||
}
|
||||
static inline int netlbl_skbuff_setattr(struct sk_buff *skb,
|
||||
u16 family,
|
||||
const struct netlbl_lsm_secattr *secattr)
|
||||
|
||||
Reference in New Issue
Block a user