From 72edde2a44fe5801a89b908ad77cc046b491f5be Mon Sep 17 00:00:00 2001 From: Adam Tkac Date: Apr 24 2009 15:30:40 +0000 Subject: - useradd now takes "-N" instead of "-n" (atkac, #495726) - print nicer error msg when zone file is actually a directory (atkac, #490837) --- diff --git a/bind-96-dyndb.patch b/bind-96-dyndb.patch index 80346ec..2f5914f 100644 --- a/bind-96-dyndb.patch +++ b/bind-96-dyndb.patch @@ -1,7 +1,6 @@ -diff --git a/bin/named/main.c b/bin/named/main.c -index aa6575a..aed2a55 100644 ---- a/bin/named/main.c -+++ b/bin/named/main.c +diff -up bind-9.6.1b1/bin/named/main.c.dyndb bind-9.6.1b1/bin/named/main.c +--- bind-9.6.1b1/bin/named/main.c.dyndb 2009-01-19 00:47:34.000000000 +0100 ++++ bind-9.6.1b1/bin/named/main.c 2009-04-24 17:09:55.747902371 +0200 @@ -44,6 +44,7 @@ #include @@ -19,11 +18,10 @@ index aa6575a..aed2a55 100644 dns_name_destroy(); isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL, NS_LOGMODULE_MAIN, -diff --git a/bin/named/server.c b/bin/named/server.c -index 31b2761..7670f1a 100644 ---- a/bin/named/server.c -+++ b/bin/named/server.c -@@ -56,6 +56,7 @@ +diff -up bind-9.6.1b1/bin/named/server.c.dyndb bind-9.6.1b1/bin/named/server.c +--- bind-9.6.1b1/bin/named/server.c.dyndb 2009-01-30 04:53:38.000000000 +0100 ++++ bind-9.6.1b1/bin/named/server.c 2009-04-24 17:12:06.467623220 +0200 +@@ -57,6 +57,7 @@ #ifdef DLZ #include #endif @@ -31,7 +29,7 @@ index 31b2761..7670f1a 100644 #include #include #include -@@ -849,6 +850,72 @@ configure_peer(const cfg_obj_t *cpeer, isc_mem_t *mctx, dns_peer_t **peerp) { +@@ -849,6 +850,72 @@ configure_peer(const cfg_obj_t *cpeer, i } static isc_result_t @@ -104,7 +102,7 @@ index 31b2761..7670f1a 100644 disable_algorithms(const cfg_obj_t *disabled, dns_resolver_t *resolver) { isc_result_t result; const cfg_obj_t *algorithms; -@@ -999,6 +1066,7 @@ configure_view(dns_view_t *view, const cfg_obj_t *config, +@@ -1016,6 +1083,7 @@ configure_view(dns_view_t *view, const c unsigned int dlzargc; char **dlzargv; #endif @@ -112,8 +110,8 @@ index 31b2761..7670f1a 100644 const cfg_obj_t *disabled; const cfg_obj_t *obj; const cfg_listelt_t *element; -@@ -1171,6 +1239,37 @@ configure_view(dns_view_t *view, const cfg_obj_t *config, - #endif +@@ -1238,6 +1306,37 @@ configure_view(dns_view_t *view, const c + view->maxncachettl = 7 * 24 * 3600; /* + * Configure dynamic databases. @@ -150,7 +148,7 @@ index 31b2761..7670f1a 100644 * Configure the view's cache. Try to reuse an existing * cache if possible, otherwise create a new cache. * Note that the ADB is not preserved in either case. -@@ -2903,6 +3002,7 @@ load_configuration(const char *filename, ns_server_t *server, +@@ -2942,6 +3041,7 @@ load_configuration(const char *filename, result = isc_task_beginexclusive(server->task); RUNTIME_CHECK(result == ISC_R_SUCCESS); @@ -158,7 +156,7 @@ index 31b2761..7670f1a 100644 /* * Parse the global default pseudo-config file. */ -@@ -4140,6 +4240,8 @@ loadconfig(ns_server_t *server) { +@@ -4185,6 +4285,8 @@ loadconfig(ns_server_t *server) { static isc_result_t reload(ns_server_t *server) { isc_result_t result; @@ -167,34 +165,9 @@ index 31b2761..7670f1a 100644 CHECK(loadconfig(server)); result = load_zones(server, ISC_FALSE); -diff --git a/lib/dns/Makefile.in b/lib/dns/Makefile.in -index ef5c12a..0f7abba 100644 ---- a/lib/dns/Makefile.in -+++ b/lib/dns/Makefile.in -@@ -57,7 +57,8 @@ DSTOBJS = @DST_EXTRA_OBJS@ \ - DNSOBJS = acache.@O@ acl.@O@ adb.@O@ byaddr.@O@ \ - cache.@O@ callbacks.@O@ compress.@O@ \ - db.@O@ dbiterator.@O@ dbtable.@O@ diff.@O@ dispatch.@O@ \ -- dlz.@O@ dnssec.@O@ ds.@O@ forward.@O@ iptable.@O@ journal.@O@ \ -+ dlz.@O@ dnssec.@O@ ds.@O@ dynamic_db.@O@ forward.@O@ \ -+ iptable.@O@ journal.@O@ \ - keytable.@O@ lib.@O@ log.@O@ lookup.@O@ \ - master.@O@ masterdump.@O@ message.@O@ \ - name.@O@ ncache.@O@ nsec.@O@ nsec3.@O@ order.@O@ peer.@O@ portlist.@O@ \ -@@ -83,7 +84,7 @@ DSTSRCS = @DST_EXTRA_SRCS@ \ - DNSSRCS = acache.c acl.c adb.c byaddr.c \ - cache.c callbacks.c compress.c \ - db.c dbiterator.c dbtable.c diff.c dispatch.c \ -- dlz.c dnssec.c ds.c forward.c iptable.c journal.c \ -+ dlz.c dnssec.c ds.c dynamic_db.c forward.c iptable.c journal.c \ - keytable.c lib.c log.c lookup.c \ - master.c masterdump.c message.c \ - name.c ncache.c nsec.c nsec3.c order.c peer.c portlist.c \ -diff --git a/lib/dns/dynamic_db.c b/lib/dns/dynamic_db.c -new file mode 100644 -index 0000000..de2daf7 ---- /dev/null -+++ b/lib/dns/dynamic_db.c +diff -up /dev/null bind-9.6.1b1/lib/dns/dynamic_db.c +--- /dev/null 2009-04-24 12:29:41.524001256 +0200 ++++ bind-9.6.1b1/lib/dns/dynamic_db.c 2009-04-24 17:09:55.751902027 +0200 @@ -0,0 +1,347 @@ +/* + * Copyright (C) 2008-2009 Red Hat, Inc. @@ -543,24 +516,9 @@ index 0000000..de2daf7 + + return args->timermgr; +} -diff --git a/lib/dns/include/dns/Makefile.in b/lib/dns/include/dns/Makefile.in -index e9e049e..27fdc45 100644 ---- a/lib/dns/include/dns/Makefile.in -+++ b/lib/dns/include/dns/Makefile.in -@@ -23,7 +23,7 @@ top_srcdir = @top_srcdir@ - - HEADERS = acl.h adb.h byaddr.h cache.h callbacks.h \ - cert.h compress.h \ -- db.h dbiterator.h dbtable.h diff.h dispatch.h dlz.h \ -+ db.h dbiterator.h dbtable.h diff.h dispatch.h dlz.h dynamic_db.h \ - dnssec.h ds.h events.h fixedname.h iptable.h journal.h keyflags.h \ - keytable.h keyvalues.h lib.h log.h master.h masterdump.h \ - message.h name.h ncache.h \ -diff --git a/lib/dns/include/dns/dynamic_db.h b/lib/dns/include/dns/dynamic_db.h -new file mode 100644 -index 0000000..7b1c1ce ---- /dev/null -+++ b/lib/dns/include/dns/dynamic_db.h +diff -up /dev/null bind-9.6.1b1/lib/dns/include/dns/dynamic_db.h +--- /dev/null 2009-04-24 12:29:41.524001256 +0200 ++++ bind-9.6.1b1/lib/dns/include/dns/dynamic_db.h 2009-04-24 17:09:55.755932610 +0200 @@ -0,0 +1,50 @@ +/* + * Copyright (C) 2008-2009 Red Hat, Inc. @@ -612,11 +570,10 @@ index 0000000..7b1c1ce +isc_timermgr_t *dns_dyndb_get_timermgr(dns_dyndb_arguments_t *args); + +#endif -diff --git a/lib/dns/include/dns/log.h b/lib/dns/include/dns/log.h -index 5adcedd..e171028 100644 ---- a/lib/dns/include/dns/log.h -+++ b/lib/dns/include/dns/log.h -@@ -73,6 +73,7 @@ LIBDNS_EXTERNAL_DATA extern isc_logmodule_t dns_modules[]; +diff -up bind-9.6.1b1/lib/dns/include/dns/log.h.dyndb bind-9.6.1b1/lib/dns/include/dns/log.h +--- bind-9.6.1b1/lib/dns/include/dns/log.h.dyndb 2009-01-19 00:47:41.000000000 +0100 ++++ bind-9.6.1b1/lib/dns/include/dns/log.h 2009-04-24 17:09:55.755932610 +0200 +@@ -73,6 +73,7 @@ LIBDNS_EXTERNAL_DATA extern isc_logmodul #define DNS_LOGMODULE_HINTS (&dns_modules[24]) #define DNS_LOGMODULE_ACACHE (&dns_modules[25]) #define DNS_LOGMODULE_DLZ (&dns_modules[26]) @@ -624,11 +581,22 @@ index 5adcedd..e171028 100644 ISC_LANG_BEGINDECLS -diff --git a/lib/dns/include/dns/types.h b/lib/dns/include/dns/types.h -index 5223397..f434188 100644 ---- a/lib/dns/include/dns/types.h -+++ b/lib/dns/include/dns/types.h -@@ -56,6 +56,7 @@ typedef struct dns_dbtable dns_dbtable_t; +diff -up bind-9.6.1b1/lib/dns/include/dns/Makefile.in.dyndb bind-9.6.1b1/lib/dns/include/dns/Makefile.in +--- bind-9.6.1b1/lib/dns/include/dns/Makefile.in.dyndb 2008-11-15 00:47:33.000000000 +0100 ++++ bind-9.6.1b1/lib/dns/include/dns/Makefile.in 2009-04-24 17:09:55.755932610 +0200 +@@ -23,7 +23,7 @@ top_srcdir = @top_srcdir@ + + HEADERS = acl.h adb.h byaddr.h cache.h callbacks.h \ + cert.h compress.h \ +- db.h dbiterator.h dbtable.h diff.h dispatch.h dlz.h \ ++ db.h dbiterator.h dbtable.h diff.h dispatch.h dlz.h dynamic_db.h \ + dnssec.h ds.h events.h fixedname.h iptable.h journal.h keyflags.h \ + keytable.h keyvalues.h lib.h log.h master.h masterdump.h \ + message.h name.h ncache.h \ +diff -up bind-9.6.1b1/lib/dns/include/dns/types.h.dyndb bind-9.6.1b1/lib/dns/include/dns/types.h +--- bind-9.6.1b1/lib/dns/include/dns/types.h.dyndb 2009-01-29 23:40:35.000000000 +0100 ++++ bind-9.6.1b1/lib/dns/include/dns/types.h 2009-04-24 17:09:55.755932610 +0200 +@@ -56,6 +56,7 @@ typedef struct dns_dbtable dns_dbtable typedef void dns_dbversion_t; typedef struct dns_dlzimplementation dns_dlzimplementation_t; typedef struct dns_dlzdb dns_dlzdb_t; @@ -636,11 +604,10 @@ index 5223397..f434188 100644 typedef struct dns_sdlzimplementation dns_sdlzimplementation_t; typedef struct dns_decompress dns_decompress_t; typedef struct dns_dispatch dns_dispatch_t; -diff --git a/lib/dns/log.c b/lib/dns/log.c -index 7551e15..b9864eb 100644 ---- a/lib/dns/log.c -+++ b/lib/dns/log.c -@@ -79,6 +79,7 @@ LIBDNS_EXTERNAL_DATA isc_logmodule_t dns_modules[] = { +diff -up bind-9.6.1b1/lib/dns/log.c.dyndb bind-9.6.1b1/lib/dns/log.c +--- bind-9.6.1b1/lib/dns/log.c.dyndb 2007-06-19 01:47:40.000000000 +0200 ++++ bind-9.6.1b1/lib/dns/log.c 2009-04-24 17:09:55.755932610 +0200 +@@ -79,6 +79,7 @@ LIBDNS_EXTERNAL_DATA isc_logmodule_t dns { "dns/hints", 0 }, { "dns/acache", 0 }, { "dns/dlz", 0 }, @@ -648,10 +615,31 @@ index 7551e15..b9864eb 100644 { NULL, 0 } }; -diff --git a/lib/isccfg/namedconf.c b/lib/isccfg/namedconf.c -index 0610489..a1dba32 100644 ---- a/lib/isccfg/namedconf.c -+++ b/lib/isccfg/namedconf.c +diff -up bind-9.6.1b1/lib/dns/Makefile.in.dyndb bind-9.6.1b1/lib/dns/Makefile.in +--- bind-9.6.1b1/lib/dns/Makefile.in.dyndb 2009-04-24 17:09:55.739922815 +0200 ++++ bind-9.6.1b1/lib/dns/Makefile.in 2009-04-24 17:09:55.751902027 +0200 +@@ -57,7 +57,8 @@ DSTOBJS = @DST_EXTRA_OBJS@ \ + DNSOBJS = acache.@O@ acl.@O@ adb.@O@ byaddr.@O@ \ + cache.@O@ callbacks.@O@ compress.@O@ \ + db.@O@ dbiterator.@O@ dbtable.@O@ diff.@O@ dispatch.@O@ \ +- dlz.@O@ dnssec.@O@ ds.@O@ forward.@O@ iptable.@O@ journal.@O@ \ ++ dlz.@O@ dnssec.@O@ ds.@O@ dynamic_db.@O@ forward.@O@ \ ++ iptable.@O@ journal.@O@ \ + keytable.@O@ lib.@O@ log.@O@ lookup.@O@ \ + master.@O@ masterdump.@O@ message.@O@ \ + name.@O@ ncache.@O@ nsec.@O@ nsec3.@O@ order.@O@ peer.@O@ portlist.@O@ \ +@@ -83,7 +84,7 @@ DSTSRCS = @DST_EXTRA_SRCS@ \ + DNSSRCS = acache.c acl.c adb.c byaddr.c \ + cache.c callbacks.c compress.c \ + db.c dbiterator.c dbtable.c diff.c dispatch.c \ +- dlz.c dnssec.c ds.c forward.c iptable.c journal.c \ ++ dlz.c dnssec.c ds.c dynamic_db.c forward.c iptable.c journal.c \ + keytable.c lib.c log.c lookup.c \ + master.c masterdump.c message.c \ + name.c ncache.c nsec.c nsec3.c order.c peer.c portlist.c \ +diff -up bind-9.6.1b1/lib/isccfg/namedconf.c.dyndb bind-9.6.1b1/lib/isccfg/namedconf.c +--- bind-9.6.1b1/lib/isccfg/namedconf.c.dyndb 2008-09-28 01:35:31.000000000 +0200 ++++ bind-9.6.1b1/lib/isccfg/namedconf.c 2009-04-24 17:09:55.755932610 +0200 @@ -78,6 +78,7 @@ static cfg_type_t cfg_type_controls; static cfg_type_t cfg_type_controls_sockaddr; static cfg_type_t cfg_type_destinationlist; @@ -668,7 +656,7 @@ index 0610489..a1dba32 100644 { "server", &cfg_type_server, CFG_CLAUSEFLAG_MULTI }, { "trusted-keys", &cfg_type_trustedkeys, CFG_CLAUSEFLAG_MULTI }, { NULL, NULL, 0 } -@@ -1365,6 +1367,40 @@ static cfg_type_t cfg_type_dialuptype = { +@@ -1365,6 +1367,40 @@ static cfg_type_t cfg_type_dialuptype = &cfg_rep_string, dialup_enums }; diff --git a/bind.spec b/bind.spec index c05761b..98440f6 100644 --- a/bind.spec +++ b/bind.spec @@ -52,6 +52,7 @@ Patch87: bind-9.5-parallel-build.patch Patch99: bind-96-libtool2.patch Patch101:bind-96-old-api.patch Patch102:bind-95-rh452060.patch +Patch106:bind93-rh490837.patch # SDB patches Patch11: bind-9.3.2b2-sdbsrc.patch @@ -216,6 +217,7 @@ mkdir m4 %patch99 -p1 -b .libtool2 %patch102 -p1 -b .rh452060 +%patch106 -p0 -b .rh490837 # Sparc and s390 arches need to use -fPIE %ifarch sparcv9 sparc64 s390 s390x @@ -363,7 +365,7 @@ done %pre if [ "$1" -eq 1 ]; then /usr/sbin/groupadd -g %{bind_gid} -f -r named >/dev/null 2>&1 || :; - /usr/sbin/useradd -u %{bind_uid} -r -n -M -g named -s /sbin/nologin -d /var/named -c Named named >/dev/null 2>&1 || :; + /usr/sbin/useradd -u %{bind_uid} -r -N -M -g named -s /sbin/nologin -d /var/named -c Named named >/dev/null 2>&1 || :; fi; :; @@ -571,9 +573,11 @@ rm -rf ${RPM_BUILD_ROOT} %ghost %{chroot_prefix}/etc/localtime %changelog -* Wed Apr 22 2009 Martin Nagy 32:9.6.1-0.2.b1 +* Fri Apr 24 2009 Martin Nagy 32:9.6.1-0.2.b1 - update the patch for dynamic loading of database backends - fix dns_db_unregister() +- useradd now takes "-N" instead of "-n" (atkac, #495726) +- print nicer error msg when zone file is actually a directory (atkac, #490837) * Mon Mar 30 2009 Adam Tkac 32:9.6.1-0.1.b1 - 9.6.1b1 release diff --git a/bind93-rh490837.patch b/bind93-rh490837.patch new file mode 100644 index 0000000..230d7a7 --- /dev/null +++ b/bind93-rh490837.patch @@ -0,0 +1,95 @@ +? patch +? lib/isc/lex.c.rh490837 +Index: lib/isc/lex.c +=================================================================== +RCS file: /var/snap/bind9/lib/isc/lex.c,v +retrieving revision 1.86 +diff -p -u -r1.86 lex.c +--- lib/isc/lex.c 17 Sep 2007 09:56:29 -0000 1.86 ++++ lib/isc/lex.c 6 Apr 2009 13:24:15 -0000 +@@ -425,17 +425,14 @@ isc_lex_gettoken(isc_lex_t *lex, unsigne + if (source->is_file) { + stream = source->input; + +-#if defined(HAVE_FLOCKFILE) && defined(HAVE_GETCUNLOCKED) +- c = getc_unlocked(stream); +-#else +- c = getc(stream); +-#endif +- if (c == EOF) { +- if (ferror(stream)) { +- source->result = ISC_R_IOERROR; +- result = source->result; ++ result = isc_stdio_fgetc(stream, &c); ++ ++ if (result != ISC_R_SUCCESS) { ++ if (result != ISC_R_EOF) { ++ source->result = result; + goto done; + } ++ + source->at_eof = ISC_TRUE; + } + } else { +Index: lib/isc/include/isc/stdio.h +=================================================================== +RCS file: /var/snap/bind9/lib/isc/include/isc/stdio.h,v +retrieving revision 1.13 +diff -p -u -r1.13 stdio.h +--- lib/isc/include/isc/stdio.h 19 Jun 2007 23:47:18 -0000 1.13 ++++ lib/isc/include/isc/stdio.h 6 Apr 2009 13:24:15 -0000 +@@ -72,6 +72,9 @@ isc_stdio_sync(FILE *f); + * direct counterpart in the stdio library. + */ + ++isc_result_t ++isc_stdio_fgetc(FILE *f, int *ret); ++ + ISC_LANG_ENDDECLS + + #endif /* ISC_STDIO_H */ +Index: lib/isc/unix/errno2result.c +=================================================================== +RCS file: /var/snap/bind9/lib/isc/unix/errno2result.c,v +retrieving revision 1.17 +diff -p -u -r1.17 errno2result.c +--- lib/isc/unix/errno2result.c 19 Jun 2007 23:47:18 -0000 1.17 ++++ lib/isc/unix/errno2result.c 6 Apr 2009 13:24:15 -0000 +@@ -43,6 +43,7 @@ isc__errno2result(int posixerrno) { + case EINVAL: /* XXX sometimes this is not for files */ + case ENAMETOOLONG: + case EBADF: ++ case EISDIR: + return (ISC_R_INVALIDFILE); + case ENOENT: + return (ISC_R_FILENOTFOUND); +Index: lib/isc/unix/stdio.c +=================================================================== +RCS file: /var/snap/bind9/lib/isc/unix/stdio.c,v +retrieving revision 1.8 +diff -p -u -r1.8 stdio.c +--- lib/isc/unix/stdio.c 19 Jun 2007 23:47:18 -0000 1.8 ++++ lib/isc/unix/stdio.c 6 Apr 2009 13:24:15 -0000 +@@ -115,3 +115,22 @@ isc_stdio_sync(FILE *f) { + return (isc__errno2result(errno)); + } + ++isc_result_t ++isc_stdio_fgetc(FILE *f, int *ret) { ++ int r; ++ isc_result_t result = ISC_R_SUCCESS; ++ ++#if defined(HAVE_FLOCKFILE) && defined(HAVE_GETCUNLOCKED) ++ r = fgetc_unlocked(f); ++#else ++ r = fgets(f); ++#endif ++ ++ if (r == EOF) ++ result = ferror(f) ? isc__errno2result(errno) : ISC_R_EOF; ++ ++ *ret = r; ++ ++ return result; ++} ++