According to "man gethostname," gssd is handling the return value of gethostname(3) incorrectly. It looks like other gethostname(3) call sites in nfs-utils are already correct. Signed-off-by: Chuck Lever <chuck.lever@xxxxxxxxxx> --- utils/gssd/krb5_util.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/utils/gssd/krb5_util.c b/utils/gssd/krb5_util.c index 6c37094..215c0a4 100644 --- a/utils/gssd/krb5_util.c +++ b/utils/gssd/krb5_util.c @@ -802,8 +802,8 @@ find_keytab_entry(krb5_context context, krb5_keytab kt, const char *tgtname, goto out; /* Get full local hostname */ - retval = gethostname(myhostname, sizeof(myhostname)); - if (retval) { + if (gethostname(myhostname, sizeof(myhostname)) == -1) { + retval = errno; k5err = gssd_k5_err_msg(context, retval); printerr(1, "%s while getting local hostname\n", k5err); goto out; -- To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html