From owner-freebsd-arch Mon Jan 22 20:28:31 2001 Delivered-To: freebsd-arch@freebsd.org Received: from green.dyndns.org (localhost [127.0.0.1]) by hub.freebsd.org (Postfix) with ESMTP id 7D7A137B400; Mon, 22 Jan 2001 20:28:13 -0800 (PST) Received: from localhost (green@localhost [127.0.0.1]) by green.dyndns.org (8.11.1/8.11.1) with ESMTP id f0N4SBW01468; Mon, 22 Jan 2001 23:28:12 -0500 (EST) (envelope-from green@FreeBSD.org) Message-Id: <200101230428.f0N4SBW01468@green.dyndns.org> X-Mailer: exmh version 2.2 06/23/2000 with nmh-1.0.4 To: Mike Smith Cc: arch@FreeBSD.org Subject: Re: struct ucred is evil and must be contained In-Reply-To: Message from Mike Smith of "Mon, 22 Jan 2001 20:22:29 PST." <200101230422.f0N4MTG01012@mass.dis.org> From: "Brian F. Feldman" Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Mon, 22 Jan 2001 23:28:11 -0500 Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Mike Smith wrote: > > Okay, maybe the subject is a bit sensationalistic, but the fact remains that > > ucred has grown into a monster, in the same manner of struct proc, that > > needs to be carefully contained. In this vain, I've created a struct xucred > > and replaced uses of ucred outside of the kernel with it where possible. > > > > This will also happen to fix the bug that if you screw up your interfaces > > (change the size of ucred, for example), mountd and nfsd will not panic the > > kernel because of it. This is a very good thing! Comments? > > #ifdef _KERNEL > struct xucred { > #else > struct ucred { > #endif > > The struct must be known as "ucred" in userspace to maintain > compatibility with the old interfaces. But it isn't compatible, necessarily, so it probably really should be changed. This is how it's done with e.g. xsocket, and the new proc interface doesn't use plain "proc" either. Is there a good reason to not change the name but still change the API? -- Brian Fundakowski Feldman \ FreeBSD: The Power to Serve! / green@FreeBSD.org `------------------------------' To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message