]> git.ipfire.org Git - thirdparty/openssh-portable.git/commitdiff
gss-serv.c: `MAXHOSTNAMELEN` -> `HOST_NAME_MAX`
authorDavid Seifert <soap@gentoo.org>
Fri, 12 May 2023 12:06:01 +0000 (14:06 +0200)
committerDarren Tucker <dtucker@dtucker.net>
Wed, 5 Jul 2023 07:54:15 +0000 (17:54 +1000)
`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

index b5d4bb2d18b22803e2d222eb6dd61a73eee92472..00e3d118bd1fed89e73a6d750431513c62c240c1 100644 (file)
@@ -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);
                }