NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: kern/46767: struct kauth_cred bypasses the C type system
The following reply was made to PR kern/46767; it has been noted by GNATS.
From: David Holland <dholland-bugs%netbsd.org@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc:
Subject: Re: kern/46767: struct kauth_cred bypasses the C type system
Date: Sun, 1 Jan 2017 01:32:50 +0000
Update:
On Fri, Aug 03, 2012 at 12:55:00AM +0000, dholland%eecs.harvard.edu@localhost wrote:
> struct kauth_cred, which is defined in sys/kern/kern_auth.c, is
> ostensibly private to that file.
>
> However, it's actually exposed via a cut and paste copy of the
> structure, called struct kvm_kauth_cred, found in
> lib/libkvm/kvm_proc.c.
>
> Quite apart from the risk of nasal demons if the two copies of the
> definition diverge, spoofing the type system like this is not
> acceptable in a project like NetBSD where we care about code quality.
So, in the intervening years struct kauth_cred has ceased to be
actually private (it's now in sys/kauth.h) but it's still masquerading
under false pretenses: it's wrapped in #ifdef __KAUTH_PRIVATE,
whatever that's supposed to mean.
And the cutpaste copy in libkvm is still there.
--
David A. Holland
dholland%netbsd.org@localhost
Home |
Main Index |
Thread Index |
Old Index