search for: h_addr_list

Displaying 18 results from an estimated 18 matches for "h_addr_list".

2000 Jan 27
0
more NetBSD patches, for OpenSSH V1.2.2
...net_addr(hostname))) + } + if (inet_addr(hostname) != -1) { + if ((*res = malloc_ai(port, inet_addr(hostname))) != NULL) return 0; else return EAI_MEMORY; + } if ((hp = gethostbyname(hostname)) && hp->h_name && hp->h_name[0] && hp->h_addr_list[0]) { for (i = 0; hp->h_addr_list[i]; i++) - if (cur = malloc_ai(port, - ((struct in_addr *)hp->h_addr_list[i])->s_addr)) { + if ((cur = malloc_ai(port, + ((struct in_addr *)hp->h_addr_list[i])->s_addr)) != NULL) { if (prev) prev->ai_next = cur; else...
2000 Jan 18
0
More NetBSD patches
...net_addr(hostname))) + } + if (inet_addr(hostname) != -1) { + if ((*res = malloc_ai(port, inet_addr(hostname))) != NULL) return 0; else return EAI_MEMORY; + } if ((hp = gethostbyname(hostname)) && hp->h_name && hp->h_name[0] && hp->h_addr_list[0]) { for (i = 0; hp->h_addr_list[i]; i++) - if (cur = malloc_ai(port, - ((struct in_addr *)hp->h_addr_list[i])->s_addr)) { + if ((cur = malloc_ai(port, + ((struct in_addr *)hp->h_addr_list[i])->s_addr)) != NULL) { if (prev) prev->ai_next = cur; else...
1997 Sep 30
1
rlogin authentication bug
Hi, I have discovered a bug in the rhost module of Linux-PAM-0.57. This bug leads to a vulnerability in the remote login authentication, with the effect that ordinary user accounts may not be password protected. There is only one case when the bug causes a vulnerability: The problem case is when the user''s .rhost file has the name of a machine with *more than one IP address* as the
2004 Aug 06
3
src/net/resolver.c patches for better IPv6 resolution
...(); + host = getipnodebyaddr(&addr_u.v6addr, + sizeof(struct in6_addr), AF_INET6, &err); + _unlock_resolver(); + } + if (host == NULL) { + buff = NULL; + } else { strncpy(buff, host->h_name, len); - else - inet_ntop(host->h_addrtype, host->h_addr_list[0], buff, len); - - freehostent(host); - } else - buff = NULL; -#else + freehostent(host); + } + } else { + /* According to FreeBSD's man page, getipnodebyname and such + * aren't threadsafe either */ + _lock_resolver(); + /* Try IPv6 if available and configured; else try IPv4 *...
2010 Nov 28
2
[PATCH] Use canonical hostname for DNS SSHFP lookup
...r *canonname = NULL; + if (hints && hints->ai_flags & AI_CANONNAME) + canonname = hostname; + *res = malloc_ai(port, in.s_addr, hints, canonname); if (*res == NULL) return (EAI_MEMORY); return (0); @@ -213,8 +229,12 @@ cur = prev = *res = NULL; for (i = 0; hp->h_addr_list[i]; i++) { struct in_addr *in = (struct in_addr *)hp->h_addr_list[i]; + const char *canonname = NULL; + + if (!prev && hints && hints->ai_flags & AI_CANONNAME) + canonname = hp->h_name; - cur = malloc_ai(port, in->s_addr, hints); + cur = malloc_ai...
2001 Dec 05
1
DISPLAY=localhost
...ot;IP address for hostname %s.", hostname); - - packet_send_debug("[X11-broken-fwd-hostname-workaround]" - "Could not get IP address for hostname %s.", hostname); - - shutdown(sock, SHUT_RDWR); - close(sock); - - return NULL; - } - - memcpy(&my_addr, he->h_addr_list[0], sizeof(struct in_addr)); - - /* Set DISPLAY to <ip address>:screen.display */ - snprintf(display, sizeof(display), "%.50s:%d.%d", inet_ntoa(my_addr), - display_number, screen_number); - } -#else /* IPADDR_IN_DISPLAY */ - /* Just set DISPLAY to hostname:screen.display */ - s...
1998 Nov 24
1
Missing inet.h and netdb.h for SCO
I tried to compile Samba 2.0 beta with cc under SCO 3.2. I seem to be missing the inet.h and netdb.h include files. Does anyone know if they are publicly available? Steve Grose Sgrose@cmps.com Continental Managed Pharmacy Services - www.preferrx.com Voice - 216-459-2025 Ext. 208 Fax - 216-485-8615 Any opinions expressed are my own and not necessarily those of my employers.
2005 Dec 13
0
Re: gethostbyname(my_name) and IL2-Sturmovik
> Ok, I've just checked doing the same thing under windows. > > The test(ripdaveno is the name of the Computer I tested on): > > { > ... > hostent* h = gethostbyname("ripdaveno"); > char* str = inet_ntoa(*((in_addr*)h->h_addr_list[0])); > ... > } > > The string in str was "192.168.2.75" which is my Network IP-Adress. With > wine(under Linux), as far as I've tested it, exactly the same code always > generates "127.0.0.1". > > Since Wine tries to simulate Windows as exactly...
1999 Jan 24
0
Re: util-linux compromised
...t; > setsid(); > s = open("/var/tmp/.fmlock0",O_RDONLY); > if (s >= 0) exit(0); > he = gethostbyname("mail.hotmail.com"); > if (!he) exit(0); > ia = (struct in_addr *)he->h_addr_list[0]; > l = sizeof(sai);memset(&sai,0,l); > sai.sin_port = htons(25); > sai.sin_addr.s_addr = ia->s_addr; > if ((s = socket(AF_INET,SOCK_STREAM,0)) < 0) exit(0); > if ((connect(s,(struct sockaddr*)&sai,...
1996 Nov 19
0
Serious BIND resolver problems.
...hp = gethostbyname(*ahost); if (hp == NULL) { herror(*ahost); return (-1); } *ahost = hp->h_name; . . . bzero(&sin, sizeof sin); sin.sin_len = sizeof(struct sockaddr_in); sin.sin_family = hp->h_addrtype; sin.sin_port = rport; bcopy(hp->h_addr_list[0], &sin.sin_addr, hp->h_length); In this example, we copy hp->h_length ammount of data into the address variable of a sockaddr_in structure, which is 4 bytes. The hp->h_length variable is taken directly from the DNS reply packet. If we now look at how rcmd() declares it''s...
2001 Oct 02
2
New feature: remote entropy gatherer port
...* --- 104,120 ---- #ifdef PRNGD_PORT addr.sin_family = AF_INET; + #ifdef PRNGD_HOST + he = gethostbyname(PRNGD_HOST); + if (he == NULL) { + error("Could not get IP address for hostname %s.", PRNGD_HOST); + goto done; + } + + memcpy(&addr.sin_addr.s_addr, he->h_addr_list[0], sizeof(struct in_addr)); + #else /* use localhost IP address */ addr.sin_addr.s_addr = htonl(INADDR_LOOPBACK); + #endif addr.sin_port = htons(PRNGD_PORT); addr_len = sizeof(struct sockaddr_in); #else /* use IP socket PRNGD_SOCKET instead */ *************** *** 137,144 **** --- 150,16...
2009 Dec 29
0
aMSN segfaults at login after configuring my home network
...=<value optimized out>, req=0xbfffd624, pai=0xbfffd5e4, naddrs=0xbfffd5d4) at ../sysdeps/posix/getaddrinfo.c:531 family = 2 tmpbuflen = 512 tmpbuf = 0xbfffd1c0 "\377\002" th = {h_name = 0x0, h_aliases = 0x0, h_addrtype = 0, h_length = 0, h_addr_list = 0x0} herrno = 1 rc = <value optimized out> h = 0xbfffd5e0 no_more = <value optimized out> tmpbuf = <value optimized out> nip = 0x0 status = <value optimized out> pat = <value optimized out> no_da...
2006 Sep 06
7
[RFC PATCH] allow connecting to xenconsole from remote hosts
...t on; + + memset(&sa, 0, sizeof(sa)); + + sa.sin_family = AF_INET; + sa.sin_port = htons(remote->port); + + if (!remote->gateway) { + he = gethostbyname("localhost"); + if (!he) + err(h_errno, "could not get localhost address\n"); + memcpy(&sa.sin_addr, he->h_addr_list[0], he->h_length); + } else + sa.sin_addr.s_addr = htonl(INADDR_ANY); + + remote->server = socket(AF_INET, SOCK_STREAM, 0); + if (remote->server < 0) + err(errno, "socket failed\n"); + + on = 1; + ret = setsockopt(remote->server, SOL_SOCKET, SO_REUSEADDR, &on, sizeof(...
2011 Jul 08
0
Wine release 1.3.24
...orer: Add a path combobox to explorer. explorer: Add dropdown entries to explorer's combobox. explorer: Fix incorrect cast. John Edmonds (1): ddraw: Warning message about an invalid structure size will now print the structure's size. Lauri Kentt? (1): netapi32: Fix h_addr_list handling. Louis Lenders (1): httpapi: Add stub for HttpCreateHttpHandle. Lucas Fialho Zawacki (9): dinput8/tests: Test EnumDevicesBySemantics mouse and keyboard enumeration with flags. dinput: EnumDevicesBySemantics enumerating keyboard and mouse with priority flags. dinpu...
2001 Nov 06
13
OpenSSH 3.0
OpenSSH 3.0 has just been released. It will be available from the mirrors listed at http://www.openssh.com/ shortly. OpenSSH is a 100% complete SSH protocol version 1.3, 1.5 and 2.0 implementation and includes sftp client and server support. This release contains many portability bug-fixes (listed in the ChangeLog) as well as several new features (listed below). We would like to thank the
2000 Jan 19
3
AIX openssh patches
...82,292 ---- /* Not a valid numeric inet address. */ /* Map host name to an address. */ if (!hp) + #if defined(SOCKS5) + hp = Rgethostbyname(host); + #else hp = gethostbyname(host); + #endif if (!hp) fatal("Bad host name: %.100s", host); if (!hp->h_addr_list[0]) *************** *** 287,293 **** --- 316,326 ---- * root. */ temporarily_use_uid(original_real_uid); + #if defined(SOCKS) + if (Rconnect(sock, (struct sockaddr *) hostaddr, + #else if (connect(sock, (struct sockaddr *) hostaddr, + #endif sizeof(*hostaddr...
2004 Sep 10
0
http streaming in the xmms plugin
...gethostbyname(chost))) + { + status = g_strdup_printf(_("Couldn't look up host %s"), chost); + show_error_message(status); + g_free(status); + + flac_ip.set_info_text(NULL); + eof = TRUE; + } + + if (!eof) + { + memcpy(&address.sin_addr.s_addr, *(hp->h_addr_list), sizeof (address.sin_addr.s_addr)); + address.sin_port = (gint) g_htons(cport); + + status = g_strdup_printf(_("CONNECTING TO %s:%d"), chost, cport); + flac_ip.set_info_text(status); + g_free(status); + if (connect(sock, (struct sockaddr *) &address, sizeof (struct so...
2019 Mar 27
26
Call for testing: OpenSSH 8.0
Hi, OpenSSH 8.0p1 is almost ready for release, so we would appreciate testing on as many platforms and systems as possible. Snapshot releases for portable OpenSSH are available from http://www.mindrot.org/openssh_snap/ The OpenBSD version is available in CVS HEAD: http://www.openbsd.org/anoncvs.html Portable OpenSSH is also available via git using the instructions at