lists.arthurdejong.org
RSS feed

Re: fixes for getpeercred.c

[Date Prev][Date Next] [Thread Prev][Thread Next]

Re: fixes for getpeercred.c



On Wed, 2023-05-31 at 07:53 +0930, Brett Lymn wrote:
> In preparation for hacking on the code more I tried building the code
> on NetBSD. The attached diff is a part of the fixes required to
> build.

Thanks, I've applied the fix as
https://arthurdejong.org/git/nss-pam-ldapd/commit/?id=e9662f1

> The diff cleans up some errors that stop the code building and also
> fixes a bug where pointers to stack based variables are returned
> which could result in chaos.

The pointers to stack allocated variables are only passed to
getpeereid() and are not returned by getpeercred(). They are only there
to ensure that getpeereid() is not called with NULL pointers.

Thanks,

-- 
-- arthur - arthur@arthurdejong.org - https://arthurdejong.org/ --