Hello community, here is the log from the commit of package tcpd for openSUSE:Factory checked in at 2013-06-05 13:38:29 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/tcpd (Old) and /work/SRC/openSUSE:Factory/.tcpd.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "tcpd" Changes: -------- --- /work/SRC/openSUSE:Factory/tcpd/tcpd.changes 2013-04-05 17:09:42.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.tcpd.new/tcpd.changes 2013-06-05 14:24:50.000000000 +0200 @@ -1,0 +2,6 @@ +Mon Jun 3 00:17:04 UTC 2013 - [email protected] + +- tcpd-ocloexec.patch: Use O_CLOEXEC whenever neccesary, + otherwise fd leaks will follow. + +------------------------------------------------------------------- New: ---- tcpd-ocloexec.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ tcpd.spec ++++++ --- /var/tmp/diff_new_pack.VG98rL/_old 2013-06-05 14:24:51.000000000 +0200 +++ /var/tmp/diff_new_pack.VG98rL/_new 2013-06-05 14:24:51.000000000 +0200 @@ -62,6 +62,7 @@ Patch26: tcp_wrappers_%{version}-fedora-bug17795.diff Patch27: tcp_wrappers_%{version}-fedora-bug17847.diff Patch28: tcp_wrappers_7.6-implicit-decl.patch +Patch29: tcpd-ocloexec.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build %description @@ -123,7 +124,7 @@ %patch26 %patch27 %patch28 - +%patch29 %build # make RPM_OPT_FLAGS="%{optflags} -fPIC -DPIC -D_REENTRANT -DHAVE_STRERROR" LDFLAGS="-pie" MAJOR=%{LIB_MAJOR} MINOR=%{LIB_MINOR} REL=%{LIB_REL} linux make %{?_smp_mflags} linux CC="gcc" ++++++ tcpd-ocloexec.patch ++++++ --- rfc931.c.orig +++ rfc931.c @@ -45,7 +45,7 @@ int protocol; int s; FILE *fp; - if ((s = socket(domain, type, protocol)) < 0) { + if ((s = socket(domain, type | SOCK_CLOEXEC, protocol)) < 0) { tcpd_warn("socket: %m"); return (0); } else { --- tcpdchk.c.orig +++ tcpdchk.c @@ -210,7 +210,7 @@ struct request_info *request; saved_context = tcpd_context; /* stupid compilers */ - if (fp = fopen(table, "r")) { + if (fp = fopen(table, "re")) { tcpd_context.file = table; tcpd_context.line = 0; while (xgets(sv_list, sizeof(sv_list), fp)) { --- inetcf.c.orig +++ inetcf.c @@ -81,12 +81,12 @@ char *conf; * guesses. */ if (conf != 0) { - if ((fp = fopen(conf, "r")) == 0) { + if ((fp = fopen(conf, "re")) == 0) { fprintf(stderr, percent_m(buf, "open %s: %m\n"), conf); exit(1); } } else { - for (i = 0; inet_files[i] && (fp = fopen(inet_files[i], "r")) == 0; i++) + for (i = 0; inet_files[i] && (fp = fopen(inet_files[i], "re")) == 0; i++) /* void */ ; if (!fp) { fprintf(stderr, "Cannot find your inetd.conf or tlid.conf file.\n"); --- options.c.orig +++ options.c @@ -227,7 +227,7 @@ struct request_info *request; FILE *fp; sprintf(path, "%s/%s", value, eval_daemon(request)); - if ((fp = fopen(path, "r")) != 0) { + if ((fp = fopen(path, "re")) != 0) { while ((ch = fgetc(fp)) == 0) write(request->fd, "", 1); ungetc(ch, fp); --- hosts_access.c.orig +++ hosts_access.c @@ -173,7 +173,7 @@ struct request_info *request; * file descriptor leaks. */ - if ((fp = fopen(table, "r")) != 0) { + if ((fp = fopen(table, "re")) != 0) { tcpd_context.file = table; tcpd_context.line = 0; while (match == NO && xgets(sv_list, sizeof(sv_list), fp) != 0) { @@ -283,7 +283,7 @@ struct hosts_info *host; int match = NO; FILE *fp; - if ((fp = fopen(path, "r")) != 0) { + if ((fp = fopen(path, "re")) != 0) { while (fscanf(fp, "%s", tok) == 1 && !(match = host_match(tok, host))) /* void */ ; fclose(fp); -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
