opendoas

my fork of doas with custom prompt
git clone git://git.kocotian.pl/opendoas.git
Log | Files | Refs | README | LICENSE

commit b1ae418af40289ea4f40449a819df26ee3bdd399
parent 84ccfe0b9ac591199d0464ede10a4130c8a3482d
Author: Sunil Nimmagadda <sunil@nimmagadda.net>
Date:   Thu,  5 Nov 2020 12:33:09 +0530

Fallback definition for HOST_NAME_MAX.

On some platforms(NetBSD) where HOST_NAME_MAX is not defined,
provide a fallback definition to _POSIX_HOST_NAME_MAX.

Diffstat:
Mpam.c | 3+++
1 file changed, 3 insertions(+), 0 deletions(-)

diff --git a/pam.c b/pam.c @@ -271,6 +271,9 @@ pamauth(const char *user, const char *myname, int interactive, int nopass, int p if (!interactive) errx(1, "Authorization required"); +#ifndef HOST_NAME_MAX +#define HOST_NAME_MAX _POSIX_HOST_NAME_MAX +#endif /* doas style prompt for pam */ char host[HOST_NAME_MAX + 1]; if (gethostname(host, sizeof(host)))