From owner-cvs-all Wed Feb 27 4:32:27 2002 Delivered-To: cvs-all@freebsd.org Received: from green.bikeshed.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id B089D37B41C; Wed, 27 Feb 2002 04:32:18 -0800 (PST) Received: from localhost (green@localhost) by green.bikeshed.org (8.11.6/8.11.6) with ESMTP id g1RCWIM99653; Wed, 27 Feb 2002 07:32:18 -0500 (EST) (envelope-from green@green.bikeshed.org) Message-Id: <200202271232.g1RCWIM99653@green.bikeshed.org> X-Mailer: exmh version 2.5 07/13/2001 with nmh-1.0.4 To: Dima Dorfman Cc: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/lib/libc/gen getpeereid.3 getpeereid.c src/sbin/mountd mountd.c src/sys/kern kern_prot.c uipc_usrreq.c src/sys/netinet tcp_subr.c udp_usrreq.c src/sys/netinet6 udp6_usrreq.c src/sys/security/lomac kernel_socket.c src/sys/sys ... In-Reply-To: Message from Dima Dorfman of "Tue, 26 Feb 2002 20:45:37 PST." <200202270445.g1R4jbv29875@freefall.freebsd.org> From: "Brian F. Feldman" Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Wed, 27 Feb 2002 07:32:18 -0500 Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Dima Dorfman wrote: > dd 2002/02/26 20:45:37 PST > > Modified files: > lib/libc/gen getpeereid.3 getpeereid.c > sbin/mountd mountd.c > sys/kern kern_prot.c uipc_usrreq.c > sys/netinet tcp_subr.c udp_usrreq.c > sys/netinet6 udp6_usrreq.c > sys/security/lomac kernel_socket.c > sys/sys ucred.h > usr.sbin/inetd builtins.c > Log: > Introduce a version field to `struct xucred' in place of one of the > spares (the size of the field was changed from u_short to u_int to > reflect what it really ends up being). Accordingly, change users of > xucred to set and check this field as appropriate. In the kernel, > this is being done inside the new cru2x() routine which takes a > `struct ucred' and fills out a `struct xucred' according to the > former. This also has the pleasant sideaffect of removing some > duplicate code. > > Reviewed by: rwatson I believe that when I looked at this "way back when", I decided two things. One the cr_version _really_ should have not changed, otherwise programs that used xucred will now get ENOMEM when trying to request them from the kernel, despite the interface not having actually changed. I believe I also wanted XUCRED_VERSION to 0 initially so that there would be no incompatibility with programs currently using it; you've done this, but if the first field has changed size, also, then that would gratuitously be incompatible with old programs. What's done is done now, I suppose, but in the future I'd appreciate if you could keep a closer eye out to not gratuitously changing interfaces. They have a history of hurting us a lot in certain cases, and keep in mind they may also be part of a larger interface (cf. xucred is part of export_args). -- Brian Fundakowski Feldman \'[ FreeBSD ]''''''''''\ <> green@FreeBSD.org <> bfeldman@tislabs.com \ The Power to Serve! \ Opinions expressed are my own. \,,,,,,,,,,,,,,,,,,,,,,\ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message