From owner-freebsd-current Tue Feb 18 2:10:12 2003 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E501737B401 for ; Tue, 18 Feb 2003 02:10:10 -0800 (PST) Received: from relay.macomnet.ru (relay.macomnet.ru [195.128.64.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id 767D443FA3 for ; Tue, 18 Feb 2003 02:10:09 -0800 (PST) (envelope-from maxim@macomnet.ru) Received: from news1.macomnet.ru (news1.macomnet.ru [195.128.64.14]) by relay.macomnet.ru (8.11.6/8.11.6) with ESMTP id h1IA9XI110584; Tue, 18 Feb 2003 13:09:33 +0300 (MSK) Date: Tue, 18 Feb 2003 13:09:33 +0300 (MSK) From: Maxim Konovalov To: Giorgos Keramidas Cc: Wiktor Niesiobedzki , current@FreeBSD.ORG Subject: Re: IPFW/socheckuid() patch In-Reply-To: <20030218011820.GB23002@gothmog.gr> Message-ID: <20030218130845.P12810@news1.macomnet.ru> References: <20030217224732.GC2315@mail.evip.pl> <20030217230227.GD2315@mail.evip.pl> <20030218011820.GB23002@gothmog.gr> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On 03:18+0200, Feb 18, 2003, Giorgos Keramidas wrote: > On 2003-02-18 00:02, Wiktor Niesiobedzki wrote: > > On Mon, Feb 17, 2003 at 11:47:32PM +0100, Wiktor Niesiobedzki wrote: > > There is an obvious mistake in patch (or change in ip_fw2.c should > > be considered). > > [...] > > --- sys/kern/uipc_socket.c 2003/02/17 22:37:58 1.144 > > +++ sys/kern/uipc_socket.c 2003/02/17 22:56:41 > > @@ -1846,8 +1846,8 @@ > > { > > > > if (so == NULL) > > - return (EPERM); > > - if (so->so_cred->cr_uid == uid) > > return (0); > > - return (EPERM); > > + if (so->so_cred->cr_uid == uid) > > + return (1); > > + return (0); > > } > > The rest of the uipc_socket.c functions (socreate, sobind, solisten, > soclose, soabort, ...) that return int's use zero as a "success" > value, and return errno based errors otherwise. I'm thinking if the > error is ipfw2's fault and should be fixed there. It seems slightly > preferable to me. Yes, I have already fixed this bug in rev.1.26 src/sys/netinet/ip_fw2.c -- Maxim Konovalov, maxim@macomnet.ru, maxim@FreeBSD.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message