summaryrefslogtreecommitdiff
path: root/gss-serv.c
diff options
context:
space:
mode:
Diffstat (limited to 'gss-serv.c')
-rw-r--r--gss-serv.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gss-serv.c b/gss-serv.c
index c33463bdf..50fa43834 100644
--- a/gss-serv.c
+++ b/gss-serv.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: gss-serv.c,v 1.26 2014/02/26 20:28:44 djm Exp $ */ 1/* $OpenBSD: gss-serv.c,v 1.27 2014/07/03 03:34:09 djm Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2001-2009 Simon Wilkinson. All rights reserved. 4 * Copyright (c) 2001-2009 Simon Wilkinson. All rights reserved.
@@ -103,14 +103,14 @@ static OM_uint32
103ssh_gssapi_acquire_cred(Gssctxt *ctx) 103ssh_gssapi_acquire_cred(Gssctxt *ctx)
104{ 104{
105 OM_uint32 status; 105 OM_uint32 status;
106 char lname[MAXHOSTNAMELEN]; 106 char lname[NI_MAXHOST];
107 gss_OID_set oidset; 107 gss_OID_set oidset;
108 108
109 if (options.gss_strict_acceptor) { 109 if (options.gss_strict_acceptor) {
110 gss_create_empty_oid_set(&status, &oidset); 110 gss_create_empty_oid_set(&status, &oidset);
111 gss_add_oid_set_member(&status, ctx->oid, &oidset); 111 gss_add_oid_set_member(&status, ctx->oid, &oidset);
112 112
113 if (gethostname(lname, MAXHOSTNAMELEN)) { 113 if (gethostname(lname, sizeof(lname))) {
114 gss_release_oid_set(&status, &oidset); 114 gss_release_oid_set(&status, &oidset);
115 return (-1); 115 return (-1);
116 } 116 }