summaryrefslogtreecommitdiffstats
path: root/loader2/ftp.c
diff options
context:
space:
mode:
authorDavid Cantrell <dcantrell@redhat.com>2006-11-02 02:20:24 +0000
committerDavid Cantrell <dcantrell@redhat.com>2006-11-02 02:20:24 +0000
commitc89579246f19348d5921e6148b235bf840b24f88 (patch)
treeae6e06ac2a1b98d7e911e5c8ed4a7013fcbaf245 /loader2/ftp.c
parentbf05f4da7b9d4e83095a633eef2ef759ded9499b (diff)
downloadanaconda-c89579246f19348d5921e6148b235bf840b24f88.tar.gz
anaconda-c89579246f19348d5921e6148b235bf840b24f88.tar.xz
anaconda-c89579246f19348d5921e6148b235bf840b24f88.zip
Added IPv6 DNS lookup support to libisys.
Diffstat (limited to 'loader2/ftp.c')
-rw-r--r--loader2/ftp.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/loader2/ftp.c b/loader2/ftp.c
index c6db27e30..7fe692c5f 100644
--- a/loader2/ftp.c
+++ b/loader2/ftp.c
@@ -221,7 +221,7 @@ static int getHostAddress(const char * host, void * address, int family) {
return FTPERR_BAD_HOST_ADDR;
}
} else {
- if (mygethostbyname(hostname, (struct in_addr *) address)) {
+ if (mygethostbyname(hostname, (struct in_addr *)address, AF_INET)) {
errno = h_errno;
return FTPERR_BAD_HOSTNAME;
} else {
@@ -273,8 +273,8 @@ int ftpOpen(char *host, int family, char *name, char *password,
}
if (proxy) {
- asprintf(&buf, "%s@%s", name, host);
- name = buf;
+ if (asprintf(&buf, "%s@%s", name, host) != -1)
+ name = buf;
host = proxy;
}
@@ -609,7 +609,8 @@ static char *find_header (char *headers, char *to_find)
{
char *start, *end, *searching_for, *retval;
- asprintf (&searching_for, "\r\n%s:", to_find);
+ if (asprintf(&searching_for, "\r\n%s:", to_find) == -1)
+ return NULL;
if ((start = strstr(headers, searching_for)) == NULL) {
free(searching_for);