diff options
Diffstat (limited to 'crypto/heimdal/appl/ftp/ftp/ruserpass.c')
-rw-r--r-- | crypto/heimdal/appl/ftp/ftp/ruserpass.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/crypto/heimdal/appl/ftp/ftp/ruserpass.c b/crypto/heimdal/appl/ftp/ftp/ruserpass.c index b22f699..8c0cd8d 100644 --- a/crypto/heimdal/appl/ftp/ftp/ruserpass.c +++ b/crypto/heimdal/appl/ftp/ftp/ruserpass.c @@ -32,7 +32,7 @@ */ #include "ftp_locl.h" -RCSID("$Id: ruserpass.c,v 1.19 2000/01/08 07:45:11 assar Exp $"); +RCSID("$Id: ruserpass.c 16161 2005-10-12 09:44:24Z joda $"); static int token (void); static FILE *cfile; @@ -69,39 +69,39 @@ static struct toktab { */ static char * -guess_domain (char *hostname, size_t sz) +guess_domain (char *hostname_str, size_t sz) { struct addrinfo *ai, *a; struct addrinfo hints; int error; char *dot; - if (gethostname (hostname, sz) < 0) { - strlcpy (hostname, "", sz); + if (gethostname (hostname_str, sz) < 0) { + strlcpy (hostname_str, "", sz); return ""; } - dot = strchr (hostname, '.'); + dot = strchr (hostname_str, '.'); if (dot != NULL) return dot + 1; memset (&hints, 0, sizeof(hints)); hints.ai_flags = AI_CANONNAME; - error = getaddrinfo (hostname, NULL, &hints, &ai); + error = getaddrinfo (hostname_str, NULL, &hints, &ai); if (error) - return hostname; + return hostname_str; for (a = ai; a != NULL; a = a->ai_next) if (a->ai_canonname != NULL) { - strlcpy (hostname, ai->ai_canonname, sz); + strlcpy (hostname_str, ai->ai_canonname, sz); break; } freeaddrinfo (ai); - dot = strchr (hostname, '.'); + dot = strchr (hostname_str, '.'); if (dot != NULL) return dot + 1; else - return hostname; + return hostname_str; } int @@ -256,7 +256,7 @@ next: break; case PROT: token(); - if(sec_request_prot(tokval) < 0) + if(doencrypt == 0 && sec_request_prot(tokval) < 0) warnx("Unknown protection level \"%s\"", tokval); break; default: |