Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 29 Oct 2002 00:35:27 -0800
From:      Luigi Rizzo <rizzo@icir.org>
To:        Alexey Dokuchaev <danfe@regency.nsu.ru>
Cc:        ipfw@FreeBSD.ORG
Subject:   Re: Typo in uid/gid handling in ipfw2
Message-ID:  <20021029003527.A7265@carp.icir.org>
In-Reply-To: <20021029082617.GA24516@regency.nsu.ru>; from danfe@regency.nsu.ru on Tue, Oct 29, 2002 at 02:26:17PM %2B0600
References:  <20021029082617.GA24516@regency.nsu.ru>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Oct 29, 2002 at 02:26:17PM +0600, Alexey Dokuchaev wrote:
> Hello!
> 
> Currently, both -STABLE and -CURRENT IPFW2 user-level code is broken WRT
> uid/gid handling stuff.
> 
> It looks more like a typo, but it is there.  I've notified Luigi and
> supplied a fix (attached).  I am not sure if it is worth mentioning in
> errata since IPFW2 is not enabled by default (and even hidden).
> 
> It's probably worth considering for review and possible commit.

definitely. if there are any takers... i believe you have tested
the fix is working, right ?

	cheers
	luiig

> Thank you.
> 
> ./danfe

> --- ipfw2.c.orig	Tue Oct 29 10:19:15 2002
> +++ ipfw2.c	Tue Oct 29 10:33:55 2002
> @@ -2937,7 +2937,7 @@
>  			pwd = (*end == '\0') ? getpwuid(uid) : getpwnam(*av);
>  			if (pwd == NULL)
>  				errx(EX_DATAERR, "uid \"%s\" nonexistent", *av);
> -			cmd32->d[0] = uid;
> +			cmd32->d[0] = pwd->pw_uid;
>  			cmd->len = F_INSN_SIZE(ipfw_insn_u32);
>  			ac--; av++;
>  		    }
> @@ -2956,7 +2956,7 @@
>  			if (grp == NULL)
>  				errx(EX_DATAERR, "gid \"%s\" nonexistent", *av);
>  			
> -			cmd32->d[0] = gid;
> +			cmd32->d[0] = grp->gr_gid;
>  			cmd->len = F_INSN_SIZE(ipfw_insn_u32);
>  			ac--; av++;
>  		    }


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ipfw" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20021029003527.A7265>