diff options
author | 2014-07-03 03:34:09 +0000 | |
---|---|---|
committer | 2014-07-03 03:34:09 +0000 | |
commit | e6da133e3de394ff56dc84131922a1e9cdc85ea0 (patch) | |
tree | fc7256609b4802343e1cff9f261dcffa8231790f /usr.bin/ssh/gss-serv.c | |
parent | use EVP_Digest() for one-shot hash instead of creating, updating, (diff) | |
download | wireguard-openbsd-e6da133e3de394ff56dc84131922a1e9cdc85ea0.tar.xz wireguard-openbsd-e6da133e3de394ff56dc84131922a1e9cdc85ea0.zip |
standardise on NI_MAXHOST for gethostname() string lengths; about
1/2 the cases were using it already. Fixes bz#2239 en passant
Diffstat (limited to 'usr.bin/ssh/gss-serv.c')
-rw-r--r-- | usr.bin/ssh/gss-serv.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/ssh/gss-serv.c b/usr.bin/ssh/gss-serv.c index 8974c5f780f..930e2d2aa12 100644 --- a/usr.bin/ssh/gss-serv.c +++ b/usr.bin/ssh/gss-serv.c @@ -1,4 +1,4 @@ -/* $OpenBSD: gss-serv.c,v 1.26 2014/02/26 20:28:44 djm Exp $ */ +/* $OpenBSD: gss-serv.c,v 1.27 2014/07/03 03:34:09 djm Exp $ */ /* * Copyright (c) 2001-2003 Simon Wilkinson. All rights reserved. @@ -93,13 +93,13 @@ static OM_uint32 ssh_gssapi_acquire_cred(Gssctxt *ctx) { OM_uint32 status; - char lname[MAXHOSTNAMELEN]; + char lname[NI_MAXHOST]; gss_OID_set oidset; gss_create_empty_oid_set(&status, &oidset); gss_add_oid_set_member(&status, ctx->oid, &oidset); - if (gethostname(lname, MAXHOSTNAMELEN)) { + if (gethostname(lname, sizeof(lname))) { gss_release_oid_set(&status, &oidset); return (-1); } |