aboutsummaryrefslogtreecommitdiff
path: root/timezone/zdump.c
AgeCommit message (Expand)AuthorFilesLines
2017-06-16Update timezone code from tzcode 2017b.Joseph Myers1-236/+305
2016-01-07Update timezone code from tzcode 2015g.Paul Eggert1-213/+475
2014-06-25Update timezone code from tzcode 2014e.Joseph Myers1-1/+3
2013-12-20Update timezone code from tzcode 2013i.Joseph Myers1-123/+204
2012-11-13Update tzcode from upstream git and support --with-bugurl for it.Joseph Myers1-3/+3
2012-11-09Update tzcode to 2012i.Joseph Myers1-72/+59
2012-04-25Update zdump and zic from tzcode 2012b.Joseph Myers1-4/+6
2009-06-15Update from tzcode2009i.Ulrich Drepper1-10/+21
2008-04-11* version.h (VERSION): Bump to 2.8.Ulrich Drepper1-18/+17
2007-03-26[BZ #4276] Jakub Jelinek1-1/+1
2007-01-11[BZ #2510, BZ #2830, BZ #3137, BZ #3313, BZ #3426, BZ #3465, BZ #3480, BZ #34...Ulrich Drepper1-20/+17
2007-07-31.Jakub Jelinek1-17/+20
2006-11-14[BZ #3137]Ulrich Drepper1-2/+2
2006-11-11* time/tzfile.c (__tzfile_read): Extend to handle new file formatUlrich Drepper1-21/+18
2006-09-21[BZ #3137]Ulrich Drepper1-1/+1
2006-01-10* sysdeps/hppa/elf/start.S (_start): Use PLABEL32 relocationsRoland McGrath1-24/+28
2005-09-17* timezone/zdump.c: Include ctype.h.Andreas Jaeger1-0/+1
2005-09-07* timezone/africa: Update from tzdata2005m.Ulrich Drepper1-2/+1
2005-08-06Update from tzcode2005k.Ulrich Drepper1-2/+45
2005-04-04* sunrpc/pmap_rmt.c (xdr_rmtcall_args): Use a dummy arglen insteadUlrich Drepper1-8/+9
2005-01-26Update.Ulrich Drepper1-80/+297
2004-12-22(CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.Ulrich Drepper1-361/+99
2007-07-122.5-18.1Jakub Jelinek1-99/+361
2004-10-12Update.cvs/fedora-glibc-20041012T1128Ulrich Drepper1-20/+53
2003-09-22Update.Ulrich Drepper1-6/+7
2001-03-16Update.Ulrich Drepper1-4/+3
2000-10-23Update.Ulrich Drepper1-0/+1
1999-01-19Update.Ulrich Drepper1-10/+6
1998-05-20Update.Ulrich Drepper1-4/+8
1998-02-15Update.Ulrich Drepper1-0/+372
ass="hl str">'\0'; memset(&hints, '\0', sizeof(hints)); hints.ai_family = af; hints.ai_socktype = SOCK_STREAM; hints.ai_flags = AI_CANONNAME; gai = getaddrinfo(*ahost, servbuff, &hints, &res0); if (gai){ /* XXX: set errno? */ return -1; } if (res0->ai_canonname){ free (ahostbuf); ahostbuf = strdup (res0->ai_canonname); if (ahostbuf == NULL) { perror ("rexec: strdup"); return (-1); } *ahost = ahostbuf; } else { *ahost = NULL; __set_errno (ENOENT); return -1; } ruserpass(res0->ai_canonname, &name, &pass); retry: s = __socket(res0->ai_family, res0->ai_socktype, 0); if (s < 0) { perror("rexec: socket"); return (-1); } if (__connect(s, res0->ai_addr, res0->ai_addrlen) < 0) { if (errno == ECONNREFUSED && timo <= 16) { (void) __close(s); __sleep(timo); timo *= 2; goto retry; } perror(res0->ai_canonname); return (-1); } if (fd2p == 0) { (void) __write(s, "", 1); port = 0; } else { char num[32]; int s2; socklen_t sa2len; s2 = __socket(res0->ai_family, res0->ai_socktype, 0); if (s2 < 0) { (void) __close(s); return (-1); } __listen(s2, 1); sa2len = sizeof (sa2); if (__getsockname(s2, (struct sockaddr *)&sa2, &sa2len) < 0) { perror("getsockname"); (void) __close(s2); goto bad; } else if (sa2len != SA_LEN((struct sockaddr *)&sa2)) { __set_errno(EINVAL); (void) __close(s2); goto bad; } port = 0; if (!getnameinfo((struct sockaddr *)&sa2, sa2len, NULL, 0, servbuff, sizeof(servbuff), NI_NUMERICSERV)) port = atoi(servbuff); (void) sprintf(num, "%u", port); (void) __write(s, num, strlen(num)+1); { socklen_t len = sizeof (from); s3 = TEMP_FAILURE_RETRY (accept(s2, (struct sockaddr *)&from, &len)); __close(s2); if (s3 < 0) { perror("accept"); port = 0; goto bad; } } *fd2p = s3; } struct iovec iov[3] = { [0] = { .iov_base = (void *) name, .iov_len = strlen (name) + 1 }, /* should public key encypt the password here */ [1] = { .iov_base = (void *) pass, .iov_len = strlen (pass) + 1 }, [2] = { .iov_base = (void *) cmd, .iov_len = strlen (cmd) + 1 } }; (void) TEMP_FAILURE_RETRY (__writev (s, iov, 3)); /* We don't need the memory allocated for the name and the password in ruserpass anymore. */ if (name != orig_name) free ((char *) name); if (pass != orig_pass) free ((char *) pass); if (__read(s, &c, 1) != 1) { perror(*ahost); goto bad; } if (c != 0) { while (__read(s, &c, 1) == 1) { (void) __write(2, &c, 1); if (c == '\n') break; } goto bad; } freeaddrinfo(res0); return (s); bad: if (port) (void) __close(*fd2p); (void) __close(s); freeaddrinfo(res0); return (-1); } libc_hidden_def (rexec_af) int rexec(ahost, rport, name, pass, cmd, fd2p) char **ahost; int rport; const char *name, *pass, *cmd; int *fd2p; { return rexec_af(ahost, rport, name, pass, cmd, fd2p, AF_INET); }