]> err.no Git - linux-2.6/commitdiff
[NETFILTER]: {ip,ip6}t_LOG: log GID
authorMaciej Soltysiak <maciej.soltysiak@ae.poznan.pl>
Wed, 5 Dec 2007 07:50:38 +0000 (23:50 -0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 28 Jan 2008 22:56:03 +0000 (14:56 -0800)
Log GID in addition to UID

Signed-off-by: Maciej Soltysiak <maciej.soltysiak@ae.poznan.pl>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/netfilter/ipt_LOG.c
net/ipv6/netfilter/ip6t_LOG.c

index fba2155ffa3d2ea11dbefb68fe6813f28f047c0b..f8c613a6eb04e47fc06a343d9b162b2ce380ec91 100644 (file)
@@ -337,7 +337,9 @@ static void dump_packet(const struct nf_loginfo *info,
        if ((logflags & IPT_LOG_UID) && !iphoff && skb->sk) {
                read_lock_bh(&skb->sk->sk_callback_lock);
                if (skb->sk->sk_socket && skb->sk->sk_socket->file)
-                       printk("UID=%u ", skb->sk->sk_socket->file->f_uid);
+                       printk("UID=%u GID=%u",
+                               skb->sk->sk_socket->file->f_uid,
+                               skb->sk->sk_socket->file->f_gid);
                read_unlock_bh(&skb->sk->sk_callback_lock);
        }
 
index cd51c42727fca56d6241187558703a8284cd1d31..19523242991ddeb3560e7445ee9830bc7438c836 100644 (file)
@@ -362,7 +362,9 @@ static void dump_packet(const struct nf_loginfo *info,
        if ((logflags & IP6T_LOG_UID) && recurse && skb->sk) {
                read_lock_bh(&skb->sk->sk_callback_lock);
                if (skb->sk->sk_socket && skb->sk->sk_socket->file)
-                       printk("UID=%u ", skb->sk->sk_socket->file->f_uid);
+                       printk("UID=%u GID=%u",
+                               skb->sk->sk_socket->file->f_uid,
+                               skb->sk->sk_socket->file->f_gid);
                read_unlock_bh(&skb->sk->sk_callback_lock);
        }
 }