From f5c313503f543594b427acddd7c0d5a44f34f180 Mon Sep 17 00:00:00 2001 From: Ian Kent Date: Tue, 20 Nov 2012 17:34:05 +0800 Subject: [PATCH] - add a couple of upstream bug fixes. --- ..._conf-to-not-contain-automount-lines.patch | 50 +++++++++++++++++++ ...map-entry-duplicate-offset-detection.patch | 37 ++++++++++++++ autofs.spec | 10 +++- 3 files changed, 96 insertions(+), 1 deletion(-) create mode 100644 autofs-5.0.7-allow-nsswitch_conf-to-not-contain-automount-lines.patch create mode 100644 autofs-5.0.7-fix-map-entry-duplicate-offset-detection.patch diff --git a/autofs-5.0.7-allow-nsswitch_conf-to-not-contain-automount-lines.patch b/autofs-5.0.7-allow-nsswitch_conf-to-not-contain-automount-lines.patch new file mode 100644 index 0000000..c342d10 --- /dev/null +++ b/autofs-5.0.7-allow-nsswitch_conf-to-not-contain-automount-lines.patch @@ -0,0 +1,50 @@ +autofs-5.0.7 - Allow nsswitch.conf to not contain "automount:" lines + +From: Michael Tokarev + +Current code does not allow a case when nsswitch.conf +does not mention automount map at all, like all new +installations. It logs a rather unpleasant error +message instead: + + syntax error in nsswitch config near [ syntax error ] + +this patch has a minimal fix, to allo "file" to be empty. + +Whole parser in C is about 25 lines of code, the "grammar" +is trivial, and it is better to ditch all this yacc/lex +stuff, but that will be much more intrusive change. + +Signed-off-by: Michael Tokarev +Cc: 682266@bugs.debian.org +--- + + CHANGELOG | 1 + + lib/nss_parse.y | 1 + + 2 files changed, 2 insertions(+), 0 deletions(-) + + +diff --git a/CHANGELOG b/CHANGELOG +index bd0dd82..16ac2a0 100644 +--- a/CHANGELOG ++++ b/CHANGELOG +@@ -16,6 +16,7 @@ + - increase file map read buffer size. + - handle new location of systemd. + - fix map entry duplicate offset detection. ++- Allow nsswitch.conf to not contain "automount:" lines. + + 25/07/2012 autofs-5.0.7 + ======================= +diff --git a/lib/nss_parse.y b/lib/nss_parse.y +index a39fda4..055e9d7 100644 +--- a/lib/nss_parse.y ++++ b/lib/nss_parse.y +@@ -72,6 +72,7 @@ file: { + nss_debug = YYDEBUG; + #endif + } sources NL ++ | /* empty */ + ; + + sources: nss_source diff --git a/autofs-5.0.7-fix-map-entry-duplicate-offset-detection.patch b/autofs-5.0.7-fix-map-entry-duplicate-offset-detection.patch new file mode 100644 index 0000000..126d9a2 --- /dev/null +++ b/autofs-5.0.7-fix-map-entry-duplicate-offset-detection.patch @@ -0,0 +1,37 @@ +autofs-5.0.7 - fix map entry duplicate offset detection + +From: Ian Kent + +Recent changes broke the detection of duplicate offsets in map entries. +--- + + CHANGELOG | 1 + + lib/cache.c | 2 +- + 2 files changed, 2 insertions(+), 1 deletions(-) + + +diff --git a/CHANGELOG b/CHANGELOG +index 8f6bb3a..bd0dd82 100644 +--- a/CHANGELOG ++++ b/CHANGELOG +@@ -15,6 +15,7 @@ + - fix recursive mount deadlock. + - increase file map read buffer size. + - handle new location of systemd. ++- fix map entry duplicate offset detection. + + 25/07/2012 autofs-5.0.7 + ======================= +diff --git a/lib/cache.c b/lib/cache.c +index 9179ad5..1e05a99 100644 +--- a/lib/cache.c ++++ b/lib/cache.c +@@ -659,7 +659,7 @@ int cache_update_offset(struct mapent_cache *mc, const char *mkey, const char *k + + me = cache_lookup_distinct(mc, key); + if (me && me->age == age) { +- if (me->multi != owner) ++ if (me->multi == owner) + return CHE_DUPLICATE; + } + diff --git a/autofs.spec b/autofs.spec index 18eb4b8..9fbf8c7 100644 --- a/autofs.spec +++ b/autofs.spec @@ -8,7 +8,7 @@ Summary: A tool for automatically mounting and unmounting filesystems Name: autofs Version: 5.0.7 -Release: 7%{?dist} +Release: 8%{?dist} Epoch: 1 License: GPLv2+ Group: System Environment/Daemons @@ -30,6 +30,8 @@ Patch14: autofs-5.0.7-configure-allow-cross-compilation-update.patch Patch15: autofs-5.0.6-fix-recursive-mount-deadlock.patch Patch16: autofs-5.0.6-increase-file-map-read-buffer-size.patch Patch17: autofs-5.0.7-handle-new-location-of-systemd.patch +Patch18: autofs-5.0.7-fix-map-entry-duplicate-offset-detection.patch +Patch19: autofs-5.0.7-allow-nsswitch_conf-to-not-contain-automount-lines.patch Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) %if %{with_systemd} BuildRequires: systemd-units @@ -103,6 +105,8 @@ echo %{version}-%{release} > .version %patch15 -p1 %patch16 -p1 %patch17 -p1 +%patch18 -p1 +%patch19 -p1 %build #CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=/usr --libdir=%{_libdir} @@ -194,6 +198,10 @@ fi %dir /etc/auto.master.d %changelog +* Tue Nov 20 2012 Ian Kent - 1:5.0.7-8 +- fix map entry duplicate offset detection. +- Allow nsswitch.conf to not contain "automount:" lines. + * Thu Oct 18 2012 Ian Kent - 1:5.0.7-7 - use spec file systemd unit file location.