diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2008-02-06 08:44:34 +0000 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2008-02-06 08:44:34 +0000 |
commit | a899d134fb11a7cd835d9a2266d31451287c7d14 (patch) | |
tree | 245a78db834bc46c156ce99e07fbb89b4a8a77d6 | |
parent | 77757c8d84e0fdde04be923c8a7f3ea8cd7bcf39 (diff) | |
download | mailfromd-a899d134fb11a7cd835d9a2266d31451287c7d14.tar.gz mailfromd-a899d134fb11a7cd835d9a2266d31451287c7d14.tar.bz2 |
* src/dnsbase.c (dns_resolve_hostname,a_lookup): Change
initialization of domainbuf.
* src/syslog_async.c: Include fcntl.h.
git-svn-id: file:///svnroot/mailfromd/trunk@1604 7a8a7f39-df28-0410-adc6-e0d955640f24
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | src/dnsbase.c | 8 | ||||
-rw-r--r-- | src/syslog_async.c | 1 |
3 files changed, 12 insertions, 3 deletions
@@ -1,6 +1,12 @@ | |||
1 | 2008-02-06 Sergey Poznyakoff <gray@gnu.org.ua> | ||
2 | |||
3 | * src/dnsbase.c (dns_resolve_hostname,a_lookup): Change | ||
4 | initialization of domainbuf. | ||
5 | * src/syslog_async.c: Include fcntl.h. | ||
6 | |||
1 | 2008-02-04 Sergey Poznyakoff <gray@gnu.org.ua> | 7 | 2008-02-04 Sergey Poznyakoff <gray@gnu.org.ua> |
2 | 8 | ||
3 | * configure.ac: Check for locale.h | 9 | * configure.ac: Check for locale.h |
4 | * src/db.c, src/bi_sprintf.m4, src/prog.c, src/bi_db.m4, | 10 | * src/db.c, src/bi_sprintf.m4, src/prog.c, src/bi_db.m4, |
5 | src/engine.c: Fix format arguments (ported from | 11 | src/engine.c: Fix format arguments (ported from |
6 | branches/gmach@{2008-01-28 and 2008-01-09). | 12 | branches/gmach@{2008-01-28 and 2008-01-09). |
diff --git a/src/dnsbase.c b/src/dnsbase.c index 3d063166..ba5de172 100644 --- a/src/dnsbase.c +++ b/src/dnsbase.c | |||
@@ -573,14 +573,15 @@ dns_resolve_ipstr(const char *ipstr, const char *domain, | |||
573 | dns_status | 573 | dns_status |
574 | dns_resolve_hostname(const char *host, char *answer, size_t answer_size, | 574 | dns_resolve_hostname(const char *host, char *answer, size_t answer_size, |
575 | char *ipbuf, size_t ipbsize, unsigned long *ttl) | 575 | char *ipbuf, size_t ipbsize, unsigned long *ttl) |
576 | { | 576 | { |
577 | struct loop_data ld; | 577 | struct loop_data ld; |
578 | char namebuf[NSIZE]; | 578 | char namebuf[NSIZE]; |
579 | char domainbuf[NSIZE] = ""; | 579 | char domainbuf[NSIZE]; |
580 | 580 | ||
581 | domainbuf[0] = 0; | ||
581 | ld.qtype = ld.atype = T_A; | 582 | ld.qtype = ld.atype = T_A; |
582 | 583 | ||
583 | strncpy(namebuf, host, sizeof namebuf - 1); | 584 | strncpy(namebuf, host, sizeof namebuf - 1); |
584 | ld.name = namebuf; | 585 | ld.name = namebuf; |
585 | ld.name_size = sizeof namebuf; | 586 | ld.name_size = sizeof namebuf; |
586 | ld.domain = domainbuf; | 587 | ld.domain = domainbuf; |
@@ -613,14 +614,15 @@ dns_status | |||
613 | a_lookup(const char *host, | 614 | a_lookup(const char *host, |
614 | GACOPYZ_UINT32_T *ipbuf, size_t ipbsize, size_t *ipcount, | 615 | GACOPYZ_UINT32_T *ipbuf, size_t ipbsize, size_t *ipcount, |
615 | unsigned long *ttl, char *answer, size_t answer_size) | 616 | unsigned long *ttl, char *answer, size_t answer_size) |
616 | { | 617 | { |
617 | struct loop_data ld; | 618 | struct loop_data ld; |
618 | char namebuf[NSIZE]; | 619 | char namebuf[NSIZE]; |
619 | char domainbuf[NSIZE] = ""; | 620 | char domainbuf[NSIZE]; |
620 | 621 | ||
622 | domainbuf[0] = 0; | ||
621 | ld.qtype = ld.atype = T_A; | 623 | ld.qtype = ld.atype = T_A; |
622 | strncpy(namebuf, host, sizeof namebuf - 1); | 624 | strncpy(namebuf, host, sizeof namebuf - 1); |
623 | ld.name = namebuf; | 625 | ld.name = namebuf; |
624 | ld.name_size = sizeof namebuf; | 626 | ld.name_size = sizeof namebuf; |
625 | ld.domain = domainbuf; | 627 | ld.domain = domainbuf; |
626 | ld.domain_size = sizeof domainbuf; | 628 | ld.domain_size = sizeof domainbuf; |
diff --git a/src/syslog_async.c b/src/syslog_async.c index 006cf16e..0882f7be 100644 --- a/src/syslog_async.c +++ b/src/syslog_async.c | |||
@@ -21,12 +21,13 @@ | |||
21 | #include <sys/socket.h> | 21 | #include <sys/socket.h> |
22 | #include <sys/un.h> | 22 | #include <sys/un.h> |
23 | #include <sys/file.h> | 23 | #include <sys/file.h> |
24 | #include <sys/syslog.h> | 24 | #include <sys/syslog.h> |
25 | #include <netinet/in.h> | 25 | #include <netinet/in.h> |
26 | #include <signal.h> | 26 | #include <signal.h> |
27 | #include <fcntl.h> | ||
27 | 28 | ||
28 | #include <sys/uio.h> | 29 | #include <sys/uio.h> |
29 | #include <sys/wait.h> | 30 | #include <sys/wait.h> |
30 | #include <netdb.h> | 31 | #include <netdb.h> |
31 | #include <string.h> | 32 | #include <string.h> |
32 | #include <time.h> | 33 | #include <time.h> |