From owner-freebsd-bugs Mon Sep 9 0:50:18 2002 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4A73837B401 for ; Mon, 9 Sep 2002 00:50:15 -0700 (PDT) Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 17B7D43E42 for ; Mon, 9 Sep 2002 00:50:14 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.4/8.12.4) with ESMTP id g897oDJU020804 for ; Mon, 9 Sep 2002 00:50:13 -0700 (PDT) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.4/8.12.4/Submit) id g897oD6S020803; Mon, 9 Sep 2002 00:50:13 -0700 (PDT) Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8E7B837B400 for ; Mon, 9 Sep 2002 00:42:26 -0700 (PDT) Received: from ws.urai.ru (ws.urai.ru [212.76.171.29]) by mx1.FreeBSD.org (Postfix) with ESMTP id C9C4443E42 for ; Mon, 9 Sep 2002 00:42:24 -0700 (PDT) (envelope-from root@ws.urai.ru) Received: from ws.urai.ru (localhost [127.0.0.1]) by ws.urai.ru (8.12.6/8.12.6) with ESMTP id g897gCoa002424 for ; Mon, 9 Sep 2002 13:42:12 +0600 (YEKST) (envelope-from root@ws.urai.ru) Received: (from root@localhost) by ws.urai.ru (8.12.6/8.12.6/Submit) id g897gC8m002423; Mon, 9 Sep 2002 13:42:12 +0600 (YEKST) Message-Id: <200209090742.g897gC8m002423@ws.urai.ru> Date: Mon, 9 Sep 2002 13:42:12 +0600 (YEKST) From: Belousov Oleg Reply-To: Belousov Oleg To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: bin/42579: IPFW2 with UID/GID options problem Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >Number: 42579 >Category: bin >Synopsis: IPFW2 with UID/GID options problem >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon Sep 09 00:50:03 PDT 2002 >Closed-Date: >Last-Modified: >Originator: Belousov Oleg >Release: FreeBSD 4.7-PRERELEASE i386 >Organization: >Environment: System: FreeBSD ws 4.7-PRERELEASE FreeBSD 4.7-PRERELEASE #0: Mon Sep 9 09:26:22 YEKST 2002 root@ws:/usr/src/sys/compile/WS i386 >Description: ipfw add ... uid 1000 gid 1002 - work ok ipfw add ... uid user gid group - don't work! User always root, group allways wheel >How-To-Repeat: Always >Fix: --- ipfw2.c.old Mon Sep 9 13:05:59 2002 +++ ipfw2.c Mon Sep 9 13:10:52 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++; } >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message