Hello community, here is the log from the commit of package libcares2 for openSUSE:Factory checked in at 2011-11-16 17:18:37 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/libcares2 (Old) and /work/SRC/openSUSE:Factory/.libcares2.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libcares2", Maintainer is "[email protected]" Changes: -------- --- /work/SRC/openSUSE:Factory/libcares2/libcares2.changes 2011-10-18 14:29:44.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.libcares2.new/libcares2.changes 2011-11-16 17:19:11.000000000 +0100 @@ -1,0 +2,5 @@ +Mon Nov 14 23:42:39 UTC 2011 - [email protected] + +- Open all fds with O_CLOEXEC. + +------------------------------------------------------------------- New: ---- cares-ocloexec.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libcares2.spec ++++++ --- /var/tmp/diff_new_pack.J8Yg57/_old 2011-11-16 17:19:13.000000000 +0100 +++ /var/tmp/diff_new_pack.J8Yg57/_new 2011-11-16 17:19:13.000000000 +0100 @@ -32,6 +32,7 @@ Patch1: 0001-ares_destroy.c-fix-segfault-in-ares_destroy_options.patch Patch2: 0002-ares_getnameinfo-fix-random-results-with-c-ares-1.7..patch Patch3: 0003-ares_init.c-fix-segfault-triggered-in-ares_init_opti.patch +Patch4: cares-ocloexec.patch %description c-ares is a C library that performs DNS requests and name resolves @@ -55,6 +56,7 @@ %patch1 -p1 %patch2 -p1 %patch3 -p1 +%patch4 -p1 %build %configure --enable-symbol-hiding --enable-nonblocking --enable-shared --disable-static --with-pic ++++++ cares-ocloexec.patch ++++++ diff --git a/ares_gethostbyaddr.c b/ares_gethostbyaddr.c index 4b4c8a7..6896a91 100644 --- a/ares_gethostbyaddr.c +++ b/ares_gethostbyaddr.c @@ -222,7 +222,7 @@ static int file_lookup(struct ares_addr *addr, struct hostent **host) return ARES_ENOTFOUND; #endif - fp = fopen(PATH_HOSTS, "r"); + fp = fopen(PATH_HOSTS, "re"); if (!fp) { error = ERRNO; diff --git a/ares_gethostbyname.c b/ares_gethostbyname.c index 4869402..bfc54b6 100644 --- a/ares_gethostbyname.c +++ b/ares_gethostbyname.c @@ -380,7 +380,7 @@ static int file_lookup(const char *name, int family, struct hostent **host) return ARES_ENOTFOUND; #endif - fp = fopen(PATH_HOSTS, "r"); + fp = fopen(PATH_HOSTS, "re"); if (!fp) { error = ERRNO; diff --git a/ares_init.c b/ares_init.c index 0c1d545..b9b9508 100644 --- a/ares_init.c +++ b/ares_init.c @@ -978,7 +978,7 @@ DhcpNameServer if (ARES_CONFIG_CHECK(channel)) return ARES_SUCCESS; - fp = fopen(PATH_RESOLV_CONF, "r"); + fp = fopen(PATH_RESOLV_CONF, "re"); if (fp) { while ((status = ares__read_line(fp, &line, &linesize)) == ARES_SUCCESS) { @@ -1020,7 +1020,7 @@ DhcpNameServer if ((status == ARES_EOF) && (!channel->lookups)) { /* Many systems (Solaris, Linux, BSD's) use nsswitch.conf */ - fp = fopen("/etc/nsswitch.conf", "r"); + fp = fopen("/etc/nsswitch.conf", "re"); if (fp) { while ((status = ares__read_line(fp, &line, &linesize)) == ARES_SUCCESS) { @@ -1048,7 +1048,7 @@ DhcpNameServer if ((status == ARES_EOF) && (!channel->lookups)) { /* Linux / GNU libc 2.x and possibly others have host.conf */ - fp = fopen("/etc/host.conf", "r"); + fp = fopen("/etc/host.conf", "re"); if (fp) { while ((status = ares__read_line(fp, &line, &linesize)) == ARES_SUCCESS) { @@ -1076,7 +1076,7 @@ DhcpNameServer if ((status == ARES_EOF) && (!channel->lookups)) { /* Tru64 uses /etc/svc.conf */ - fp = fopen("/etc/svc.conf", "r"); + fp = fopen("/etc/svc.conf", "re"); if (fp) { while ((status = ares__read_line(fp, &line, &linesize)) == ARES_SUCCESS) { @@ -1705,7 +1705,7 @@ static void randomize_key(unsigned char* key,int key_data_len) } #else /* !WIN32 */ #ifdef RANDOM_FILE - FILE *f = fopen(RANDOM_FILE, "rb"); + FILE *f = fopen(RANDOM_FILE, "rbe"); if(f) { counter = aresx_uztosi(fread(key, 1, key_data_len, f)); fclose(f); diff --git a/ares_process.c b/ares_process.c index 5de1ae6..1b85640 100644 --- a/ares_process.c +++ b/ares_process.c @@ -877,7 +877,7 @@ static int configure_socket(ares_socket_t s, int family, ares_channel channel) setsocknonblock(s, TRUE); -#if defined(FD_CLOEXEC) && !defined(MSDOS) +#if !defined(SOCK_CLOEXEC) && defined(FD_CLOEXEC) && !defined(MSDOS) /* Configure the socket fd as close-on-exec. */ if (fcntl(s, F_SETFD, FD_CLOEXEC) == -1) return -1; @@ -964,7 +964,7 @@ static int open_tcp_socket(ares_channel channel, struct server_state *server) } /* Acquire a socket. */ - s = socket(server->addr.family, SOCK_STREAM, 0); + s = socket(server->addr.family, SOCK_STREAM | SOCK_CLOEXEC, 0); if (s == ARES_SOCKET_BAD) return -1; @@ -1056,7 +1056,7 @@ static int open_udp_socket(ares_channel channel, struct server_state *server) } /* Acquire a socket. */ - s = socket(server->addr.family, SOCK_DGRAM, 0); + s = socket(server->addr.family, SOCK_DGRAM | SOCK_CLOEXEC, 0); if (s == ARES_SOCKET_BAD) return -1; diff --git a/ares_search.c b/ares_search.c index 1877c19..387a16f 100644 --- a/ares_search.c +++ b/ares_search.c @@ -256,7 +256,7 @@ static int single_domain(ares_channel channel, const char *name, char **s) hostaliases = getenv("HOSTALIASES"); if (hostaliases) { - fp = fopen(hostaliases, "r"); + fp = fopen(hostaliases, "re"); if (fp) { while ((status = ares__read_line(fp, &line, &linesize)) -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
