From 46912f1c18e01b63660a56ea7d9c572741e06117 Mon Sep 17 00:00:00 2001 From: Roman Kubiak Date: Tue, 16 Jun 2015 18:14:47 +0200 Subject: src: add security context information This commit adds security context information structures and functions. This will allow userspace to find the security context of each packet (if it exists) and make decisions based on that. It should work for SELinux and SMACK. Signed-off-by: Roman Kubiak Signed-off-by: Pablo Neira Ayuso --- include/libnetfilter_queue/libnetfilter_queue.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/libnetfilter_queue/libnetfilter_queue.h') diff --git a/include/libnetfilter_queue/libnetfilter_queue.h b/include/libnetfilter_queue/libnetfilter_queue.h index bde7209..2e38411 100644 --- a/include/libnetfilter_queue/libnetfilter_queue.h +++ b/include/libnetfilter_queue/libnetfilter_queue.h @@ -105,6 +105,7 @@ extern uint32_t nfq_get_outdev(struct nfq_data *nfad); extern uint32_t nfq_get_physoutdev(struct nfq_data *nfad); extern int nfq_get_uid(struct nfq_data *nfad, uint32_t *uid); extern int nfq_get_gid(struct nfq_data *nfad, uint32_t *gid); +extern int nfq_get_secctx(struct nfq_data *nfad, unsigned char **secdata); extern int nfq_get_indev_name(struct nlif_handle *nlif_handle, struct nfq_data *nfad, char *name); @@ -129,6 +130,7 @@ enum { NFQ_XML_TIME = (1 << 5), NFQ_XML_UID = (1 << 6), NFQ_XML_GID = (1 << 7), + NFQ_XML_SECCTX = (1 << 8), NFQ_XML_ALL = ~0U, }; -- cgit v1.2.3