summaryrefslogtreecommitdiff
path: root/netsniff-ng.c
diff options
context:
space:
mode:
authorVadim Kochan <vadim4j@gmail.com>2015-04-22 17:36:50 +0300
committerTobias Klauser <tklauser@distanz.ch>2015-04-22 18:58:29 +0200
commitc69c838def37d46008e85fdc2f817fc9fd70c4d5 (patch)
tree9d16a8e6ae568f6e539ce2d055da1a15d58de150 /netsniff-ng.c
parent4956bd05e1e9f6f381e6a8ff36fb80a10ba14272 (diff)
netsniff-ng: Store getgid() result in correct member of struct context
Changed to use ctx->gid when call getgid() on init_ctx. Before we were overwriting ctx->uid which clearly is an error. Signed-off-by: Vadim Kochan <vadim4j@gmail.com> Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Diffstat (limited to 'netsniff-ng.c')
-rw-r--r--netsniff-ng.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/netsniff-ng.c b/netsniff-ng.c
index c0d70c8..4ad8b19 100644
--- a/netsniff-ng.c
+++ b/netsniff-ng.c
@@ -1096,7 +1096,7 @@ static void init_ctx(struct ctx *ctx)
memset(ctx, 0, sizeof(*ctx));
ctx->uid = getuid();
- ctx->uid = getgid();
+ ctx->gid = getgid();
ctx->cpu = -1;
ctx->packet_type = -1;