Date: Mon, 22 Jan 2001 23:28:11 -0500 From: "Brian F. Feldman" <green@FreeBSD.org> To: Mike Smith <msmith@FreeBSD.org> Cc: arch@FreeBSD.org Subject: Re: struct ucred is evil and must be contained Message-ID: <200101230428.f0N4SBW01468@green.dyndns.org> In-Reply-To: Message from Mike Smith <msmith@freebsd.org> of "Mon, 22 Jan 2001 20:22:29 PST." <200101230422.f0N4MTG01012@mass.dis.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Mike Smith <msmith@freebsd.org> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200101230428.f0N4SBW01468>