Date: Tue, 18 Feb 2003 03:18:20 +0200 From: Giorgos Keramidas <keramida@ceid.upatras.gr> To: Wiktor Niesiobedzki <w@evip.pl> Cc: current@FreeBSD.ORG Subject: Re: IPFW/socheckuid() patch Message-ID: <20030218011820.GB23002@gothmog.gr> In-Reply-To: <20030217230227.GD2315@mail.evip.pl> References: <20030217224732.GC2315@mail.evip.pl> <20030217230227.GD2315@mail.evip.pl>
next in thread | previous in thread | raw e-mail | index | archive | help
On 2003-02-18 00:02, Wiktor Niesiobedzki <w@evip.pl> 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. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030218011820.GB23002>