From: Eric Leblond <eric@inl.fr>
To: netfilter-devel@vger.kernel.org
Cc: Eric Leblond <eric@inl.fr>
Subject: [ULOGD PATCH 4/5] Add support for UID dumping to NFLOG input plugin.
Date: Sat, 9 Feb 2008 13:36:34 +0100 [thread overview]
Message-ID: <12025605962908-git-send-email-eric@inl.fr> (raw)
In-Reply-To: <12025605952271-git-send-email-eric@inl.fr>
Signed-off-by: Eric Leblond <eric@inl.fr>
---
input/packet/ulogd_inppkt_NFLOG.c | 14 ++++++++++++++
1 files changed, 14 insertions(+), 0 deletions(-)
diff --git a/input/packet/ulogd_inppkt_NFLOG.c b/input/packet/ulogd_inppkt_NFLOG.c
index 1b8e32c..3f013cc 100644
--- a/input/packet/ulogd_inppkt_NFLOG.c
+++ b/input/packet/ulogd_inppkt_NFLOG.c
@@ -106,6 +106,7 @@ enum nflog_keys {
NFLOG_KEY_OOB_SEQ_GLOBAL,
NFLOG_KEY_OOB_FAMILY,
NFLOG_KEY_OOB_PROTOCOL,
+ NFLOG_KEY_OOB_UID,
};
static struct ulogd_key output_keys[] = {
@@ -240,6 +241,12 @@ static struct ulogd_key output_keys[] = {
.flags = ULOGD_RETF_NONE,
.name = "oob.protocol",
},
+ {
+ .type = ULOGD_RET_UINT32,
+ .flags = ULOGD_RETF_NONE,
+ .name = "oob.uid",
+ },
+
};
static inline int
@@ -257,6 +264,8 @@ interp_packet(struct ulogd_pluginstance *upi, struct nflog_data *ldata)
u_int32_t indev = nflog_get_indev(ldata);
u_int32_t outdev = nflog_get_outdev(ldata);
u_int32_t seq;
+ u_int32_t uid;
+
ret[NFLOG_KEY_OOB_FAMILY].u.value.ui8 = af_ce(upi->config_kset).u.value;
ret[NFLOG_KEY_OOB_FAMILY].flags |= ULOGD_RETF_VALID;
@@ -317,6 +326,11 @@ interp_packet(struct ulogd_pluginstance *upi, struct nflog_data *ldata)
ret[NFLOG_KEY_OOB_IFINDEX_OUT].flags |= ULOGD_RETF_VALID;
}
+ if (nflog_get_uid(ldata, &uid) == 0) {
+ ret[NFLOG_KEY_OOB_UID].u.value.ui32 = uid;
+ ret[NFLOG_KEY_OOB_UID].flags |= ULOGD_RETF_VALID;
+ }
+
if (nflog_get_seq(ldata, &seq) == 0) {
ret[NFLOG_KEY_OOB_SEQ_LOCAL].u.value.ui32 = seq;
ret[NFLOG_KEY_OOB_SEQ_LOCAL].flags |= ULOGD_RETF_VALID;
--
1.5.2.5
next prev parent reply other threads:[~2008-02-09 12:36 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-09 12:36 [ULOGD PATCH 0/5] UID dump support in NFLOG, IPCMPv6 support in SQL Eric Leblond
2008-02-09 12:36 ` [ULOGD PATCH 1/5] Fix treatment of return from function Eric Leblond
2008-02-09 17:28 ` Pablo Neira Ayuso
2008-02-09 17:31 ` Pablo Neira Ayuso
2008-02-09 12:36 ` [ULOGD PATCH 2/5] Factorize definition of some macros Eric Leblond
2008-02-09 17:33 ` Pablo Neira Ayuso
2008-02-09 12:36 ` [PATCH 3/5] Add Icmpv6 support to SQL schema Eric Leblond
2008-02-09 17:39 ` Pablo Neira Ayuso
2008-02-09 12:36 ` Eric Leblond [this message]
2008-02-09 17:40 ` [ULOGD PATCH 4/5] Add support for UID dumping to NFLOG input plugin Pablo Neira Ayuso
2008-02-09 12:36 ` [ULOGD PATCH 5/5] Add UID display to PRINTPKT filter Eric Leblond
2008-02-09 17:43 ` Pablo Neira Ayuso
2008-02-09 17:44 ` [ULOGD PATCH 0/5] UID dump support in NFLOG, IPCMPv6 support in SQL Pablo Neira Ayuso
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=12025605962908-git-send-email-eric@inl.fr \
--to=eric@inl.fr \
--cc=netfilter-devel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox