From c69c838def37d46008e85fdc2f817fc9fd70c4d5 Mon Sep 17 00:00:00 2001 From: Vadim Kochan Date: Wed, 22 Apr 2015 17:36:50 +0300 Subject: 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 Signed-off-by: Tobias Klauser --- netsniff-ng.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- cgit v1.2.3-54-g00ecf