search for: h_length

Displaying 13 results from an estimated 13 matches for "h_length".

Did you mean: _length
1996 Nov 19
0
Serious BIND resolver problems.
...== 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 variables, and after looking through r...
1997 Jan 02
2
Re: libc bugs (was Re: Distributions...)
Marek Michalkiewicz <marekm@I17LINUXB.ISTS.PWR.WROC.PL> wrote: : It seems that most of the RedHat 5.3.12 security patches are in the : standard 5.4.17, except for the patch below. Also, there are more : (different) fixes in 5.4.18 (check h_length against sizeof(sin_addr) : in inet/rcmd.c and inet/rexec.c). : + { : + syslog(LOG_NOTICE|LOG_AUTH, : + "Attempt to feed me an overlong A record. Probably a breakin attempt.");...
1996 Nov 20
2
About DNS again
...o 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 that it is a very serious, very immediate > threat. Effecting everything from person...
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.
1997 Nov 14
0
Linux IP fragment overlap bug (fwd)
...t); } u_long name_resolve(u_char *host_name) { struct in_addr addr; struct hostent *host_ent; if ((addr.s_addr = inet_addr(host_name)) == -1) { if (!(host_ent = gethostbyname(host_name))) return (0); bcopy(host_ent->h_addr, (char *)&addr.s_addr, host_ent->h_length); } return (addr.s_addr); } void usage(u_char *name) { fprintf(stderr, "%s src_ip dst_ip [ -s src_prt ] [ -t dst_prt ] [ -n how_many ]\n", name); exit(0); } /* EOF */ ------[End] -- Guby Linux ----------------------------------------------------...
1997 Sep 26
3
Forwarded mail....
...gned char namelen; }; struct typez{ u_int type; u_int type2; }; unsigned int host2ip(char *serv) { struct sockaddr_in sin; struct hostent *hent; hent=gethostbyname(serv); if(hent == NULL) return 0; bzero((char *)&sin, sizeof(sin)); bcopy(hent->h_addr, (char *)&sin.sin_addr, hent->h_length); return sin.sin_addr.s_addr; } main( int argc, char **argv) { struct sockaddr_in sin_me , sin_dst; struct nmbhdr *nmb,*nmb2; struct iphdr *ipz; struct typez *typz; struct hostent *hent; int socket_client,sr,num,i=1,bha,timeout=0,try=0,GO=0; int longueur=sizeof(struct sockaddr_in); char *dat...
2005 Sep 30
4
C Manager Interface Client
List: This is my first manager client that I've written so please bear with me: I am trying to write a C manager interface client to interface with our CRM software. I am having an issue while reading the data from the manager interface. I am writing this in C and I have the following code: while(1) { bzero(buffer,sizeof(buffer)); readCode = read(socketHandle,buffer,sizeof(buffer));
2007 Jan 23
2
Re: [nut-commits] svn commit r731
..._STREAM, 0)) < 0) { > + if ((ups->fd = socket(AF_INET, SOCK_STREAM, 0)) < 0) > + { > ups->upserror = UPSCLI_ERR_SOCKFAILURE; > ups->syserrno = errno; > return -1; > @@ -477,140 +485,123 @@ > > memcpy(&server.sin_addr, serv->h_addr, serv->h_length); > > - if (bind(ups->fd, (struct sockaddr *) &local, > - sizeof(struct sockaddr_in)) == -1) { > + if (bind(ups->fd, (struct sockaddr *) &local, sizeof(struct sockaddr_in)) == -1) > + { > ups->upserror = UPSCLI_ERR_BINDFAILURE; > ups->syserrno = er...
2007 Jan 06
1
Re: [nut-commits] svn commit r710 - in trunk: . clients server
...; > + local.sin_family = AF_INET; > + local.sin_port = htons(INADDR_ANY); > + > + memset(&server, '\0', sizeof(struct sockaddr_in)); > + server.sin_family = AF_INET; > + server.sin_port = htons(port); > + > + memcpy(&server.sin_addr, serv->h_addr, serv->h_length); > + > + if (bind(ups->fd, (struct sockaddr *) &local, > + sizeof(struct sockaddr_in)) == -1) { > + ups->upserror = UPSCLI_ERR_BINDFAILURE; > + ups->syserrno = errno; > + close(ups->fd); > + ups->fd = -1; > + > + return -1; > + } > + >...
2006 Feb 03
0
rquotad (NFS) quota plugin
...ta_get(char *host, getquota_args *qargs, getquota_rslt *qres) + { + struct sockaddr_in rhost; + struct hostent *hent; + struct timeval tout; + enum clnt_stat cstat; + CLIENT *clnt = NULL; + int sock = RPC_ANYSOCK; + + hent = gethostbyname(host); + if (!hent) + return -1; + if (hent->h_length > (int)sizeof(rhost.sin_addr)) + return -1; + + tout.tv_sec = 6; + tout.tv_usec = 0; + + *(long *)&rhost.sin_addr = *(long *)hent->h_addr; + rhost.sin_family = AF_INET; + rhost.sin_port = 0; + + clnt = clntudp_create(&rhost, RQUOTAPROG, RQUOTAVERS, tout, &sock); + if...
2009 Dec 29
0
aMSN segfaults at login after configuring my home network
...zed 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 = <value optimized out> pat = <value opti...
2006 Sep 06
7
[RFC PATCH] allow connecting to xenconsole from remote hosts
...a, 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(on)); + if (ret) +...
2007 Jan 06
3
Re: [nut-commits] svn commit r708 - in trunk: . clients server
...; > - local.sin_family = AF_INET; > - local.sin_port = htons(INADDR_ANY); > - > - memset(&server, '\0', sizeof(struct sockaddr_in)); > - server.sin_family = AF_INET; > - server.sin_port = htons(port); > - > - memcpy(&server.sin_addr, serv->h_addr, serv->h_length); > - > - if (bind(ups->fd, (struct sockaddr *) &local, > - sizeof(struct sockaddr_in)) == -1) { > - ups->upserror = UPSCLI_ERR_BINDFAILURE; > - ups->syserrno = errno; > - close(ups->fd); > - ups->fd = -1; > + memset (&hints, 0, sizeof (struct ad...