From: Chris Provenzano Date: Thu, 27 Apr 1995 01:12:53 +0000 (+0000) Subject: * kcmd.c (kcmd()) : Don't use hp->h_name use host_save instead X-Git-Tag: krb5-1.0-beta5~222 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=6ab34fd819f14008c4bb517d1fea8ef590201e43;p=krb5.git * kcmd.c (kcmd()) : Don't use hp->h_name use host_save instead git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@5530 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/appl/bsd/ChangeLog b/src/appl/bsd/ChangeLog index d2ba8af43..3605fdc86 100644 --- a/src/appl/bsd/ChangeLog +++ b/src/appl/bsd/ChangeLog @@ -1,3 +1,7 @@ +Wed Apr 26 21:09:34 1995 Chris Provenzano (proven@mit.edu) + + * kcmd.c (kcmd()) : Don't use hp->h_name use host_save instead. + Wed Apr 26 17:43:08 1995 Mark Eichin * logutil.c (EMPTY): linux has UT_UNKNOWN, not EMPTY. diff --git a/src/appl/bsd/kcmd.c b/src/appl/bsd/kcmd.c index b23f2f9b7..ad376e530 100644 --- a/src/appl/bsd/kcmd.c +++ b/src/appl/bsd/kcmd.c @@ -109,8 +109,7 @@ kcmd(sock, ahost, rport, locuser, remuser, cmd, fd2p, service, realm, return (-1); } - host_save = (char *)malloc(strlen(hp->h_name) + 1); - if ( host_save == (char *) 0){ + if ((host_save = malloc(strlen(hp->h_name) + 1)) == NULL) { fprintf(stderr,"kcmd: no memory\n"); return(-1); } @@ -209,7 +208,7 @@ kcmd(sock, ahost, rport, locuser, remuser, cmd, fd2p, service, realm, continue; } #endif /* !(defined(ultrix) || defined(sun)) */ - perror(hp->h_name); + perror(host_save); #ifdef POSIX_SIGNALS sigprocmask(SIG_SETMASK, &oldmask, (sigset_t*)0); #else @@ -329,7 +328,7 @@ kcmd(sock, ahost, rport, locuser, remuser, cmd, fd2p, service, realm, if (options & OPTS_FORWARD_CREDS) { /* Forward credentials */ if (status = get_for_creds(bsd_context, auth_context, - hp->h_name, + host_save, ret_cred->client, /* Forwardable TGT? */ options & OPTS_FORWARDABLE_CREDS,