[openssh-commits] [openssh] 01/01: gss-serv.c: `MAXHOSTNAMELEN` -> `HOST_NAME_MAX`

git+noreply at mindrot.org git+noreply at mindrot.org
Wed Jul 5 18:36:22 AEST 2023


This is an automated email from the git hooks/post-receive script.

dtucker pushed a commit to branch master
in repository openssh.

commit a95fc5eed09a0238fb127b6c50e8498432b79dae
Author: David Seifert <soap at gentoo.org>
Date:   Fri May 12 14:06:01 2023 +0200

    gss-serv.c: `MAXHOSTNAMELEN` -> `HOST_NAME_MAX`
    
    `MAXHOSTNAMELEN` is not defined in POSIX, which breaks on musl:
    https://pubs.opengroup.org/onlinepubs/9699919799/functions/gethostname.html
    
    Bug: https://bugs.gentoo.org/834044
---
 gss-serv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gss-serv.c b/gss-serv.c
index b5d4bb2d..00e3d118 100644
--- a/gss-serv.c
+++ b/gss-serv.c
@@ -105,7 +105,7 @@ ssh_gssapi_acquire_cred(Gssctxt *ctx)
 		gss_create_empty_oid_set(&status, &oidset);
 		gss_add_oid_set_member(&status, ctx->oid, &oidset);
 
-		if (gethostname(lname, MAXHOSTNAMELEN)) {
+		if (gethostname(lname, HOST_NAME_MAX)) {
 			gss_release_oid_set(&status, &oidset);
 			return (-1);
 		}

-- 
To stop receiving notification emails like this one, please contact
djm at mindrot.org.


More information about the openssh-commits mailing list