search for: h_name

Displaying 15 results from an estimated 15 matches for "h_name".

Did you mean: __name
2000 Sep 25
2
off-by-one errors in getnameinfo()
...n 1.14.2.1) does this sort of buffer size checks (these is just two of many cases): if (strlen(sp->s_name) > servlen) return ENI_MEMORY; strcpy(serv, sp->s_name); ... if (strlen(hp->h_name) > hostlen) { return ENI_MEMORY; } strcpy(host, hp->h_name); i.e. it can write up to servlen / hostlen bytes PLUS a terminating zero. This contradicts the manpage (and RFC 2533) as well as the way your own progra...
2000 Jan 27
0
more NetBSD patches, for OpenSSH V1.2.2
...dr(hostname) != -1) - if (*res = malloc_ai(port, inet_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))...
1998 May 08
4
Lightning fast attacks?
RH4.2 Linux Intel Last night I got three of these log messages: Two in a row, one a bit later. May 8 00:35:15 osg-gw imapd[4307]: warning: can''t get client address: Connectio n reset by peer May 8 00:35:15 osg-gw imapd[4307]: refused connect from unknown Now, I have imapd blocked to non-local users using tcpd wrappers, so tcpd is trying to find the address of the remote machine (all
2000 Jan 18
0
More NetBSD patches
...dr(hostname) != -1) - if (*res = malloc_ai(port, inet_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))...
2004 Sep 13
4
Pending OpenSSH release, call for testing.
Darren, We have systems which are multihomed for virtualisation, but run only one sshd. You can connect to any IP-address and should be authenticated with gssapi/kerberos. So the client will ask for a principal host/virt-ip-X and the server has to have an entry for this in the keytab and has to select the right key by determining the hostname from the connection IP-address. There is no other way
1996 Nov 20
2
About DNS again
...up until the latest official release (and beta releases), has > been vulnerable to this attack. The fix apparantly being made by fluke, > after incorporating IPv6 support. > > I have also never seen any other reference to this anywhere else (yes > there has been alot of talk about h_name problems in various places, > causing string buffer overflows, yet not the h_length problem). > > I also feel it is important to point out that, this bug whether new or old > has not been addressed. Even if the bug was discussed at SANS or elsewhere > it does not change the fact th...
2008 Jul 07
2
copyin having secondary effects.
...in the array get corrupted. So I have ended up with this script: #!/usr/bin/dtrace -CZs #include <netdb.h> pid$target::gethostbyname_r:return { self->r = (struct hostent *)copyin(arg1, sizeof (struct hostent)); printf("%d Host: %s", pid, copyinstr((uintptr_t)self->r->h_name)); printf(" h_aliases %p ", self->r->h_aliases); self->a = (char **)copyin((uintptr_t)self->r->h_aliases, 4*sizeof (char *)); } #define ALIAS(X) \ pid$target::gethostbyname_r:return \ / self->a[X] != 0 / \ { \ printf("%d h_alias[%d]: %p", pid, X, (uintptr_...
2006 Aug 25
0
Session request packet
...< "Scocket error." << endl; else cout << "Socket is " << socketid << endl; //Get name by ip address of host struct hostent* host; if((host = gethostbyname(szHost)) != NULL) cout << "Get host name is " << host->h_name << endl; else { cout << "Get host name failed." << endl; return -1; } //Connect port of host what want to connect struct sockaddr_in sockaddr; sockaddr.sin_family = AF_INET; sockaddr.sin_port = htons(iPort); sockaddr.sin_addr = *((struct in_a...
2001 Feb 21
3
X11 display issues
...ly"); + + shutdown(sock, SHUT_RDWR); + close(sock); + + return NULL; + } + + #ifndef IPADDR_IN_DISPLAY + if ((he = gethostbyaddr ((void *)&me.sin_addr, + sizeof(me.sin_addr),AF_INET)) != NULL) + snprintf (display, sizeof(display),"%.400s:%d.%d", + he->h_name, display_number, screen_number); + else + #endif + snprintf(display, sizeof(display), "%.50s:%d.%d", + inet_ntoa(me.sin_addr), display_number, screen_number); + } + #endif + /* Allocate a channel for each socket. */ for (n = 0; n < num_socks; n++) { sock = socks[n]...
1996 Nov 19
0
Serious BIND resolver problems.
...brary routine which is used by rsh and rlogin to remotely connect to systems. Note that the code itself is not faulty, however the resolver implementation is. Example code follows: 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 addr...
2004 Aug 06
3
src/net/resolver.c patches for better IPv6 resolution
...; + _unlock_resolver(); + if (host == NULL) { + _lock_resolver(); + 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_...
2010 Nov 28
2
[PATCH] Use canonical hostname for DNS SSHFP lookup
...13,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(port, in->s_addr, hints, canonname); if (cur == NULL) { if (*res != NULL) freeaddrinfo(*res); diff -ur openssh/roaming_client.c openssh-sshfp/roaming_client.c --- openssh/roaming_client.c 2010-01-26 02:53:06.0...
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.
2007 Jun 11
24
multiple routing tables for internal router programs
Maybe a strange request, I''ll try to explain this as clearer as I can (forgive my bad english, please :-) ). I''m setting a linux box as a router. My router uses multiple routing tables, so I can address the traffic from specific ip addresses of my lan to distinct ISPs providers (specifying a different default gateway fo r each table), marking packets with iptables
2009 Dec 29
0
aMSN segfaults at login after configuring my home network
...0xb7a7ee43 in gaih_inet (name=<value optimized out>, service=<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 = <val...