Hello community,
here is the log from the commit of package autofs for openSUSE:Factory checked in at 2017-05-04 08:54:24
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/autofs (Old)
and /work/SRC/openSUSE:Factory/.autofs.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "autofs"
Thu May 4 08:54:24 2017 rev:109 rq:491897 version:5.1.1
Changes:
--------
--- /work/SRC/openSUSE:Factory/autofs/autofs.changes 2016-03-29 09:55:52.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.autofs.new/autofs.changes 2017-05-04 08:54:51.157175786 +0200
@@ -1,0 +2,15 @@
+Thu Apr 6 11:23:41 UTC 2017 - astieger@suse.com
+
+- remove rpmlintrc, review was boo#782691
+
+-------------------------------------------------------------------
+Wed Aug 10 13:10:50 UTC 2016 - jeffm@suse.com
+
+- Fix spurious ELOOP on certain kinds of failures (bsc#968918):
+ * autofs: fix yp map age not updated in s/_/./g case
+ * autofs: properly handle errors in lookup_nss_mount
+ * Added patches:
+ autofs-5.1.1-properly-handle-errors-in-lookup_nss_mount.patch
+ autofs-5.1.1-fix-yp-map-age-not-updated-during-map-lookup.patch
+
+-------------------------------------------------------------------
Old:
----
autofs-rpmlintrc
New:
----
autofs-5.1.1-fix-yp-map-age-not-updated-during-map-lookup.patch
autofs-5.1.1-properly-handle-errors-in-lookup_nss_mount.patch
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ autofs.spec ++++++
--- /var/tmp/diff_new_pack.vYsRYJ/_old 2017-05-04 08:54:52.157034777 +0200
+++ /var/tmp/diff_new_pack.vYsRYJ/_new 2017-05-04 08:54:52.161034212 +0200
@@ -1,7 +1,7 @@
#
# spec file for package autofs
#
-# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -76,11 +76,14 @@
Source7: NetworkManager-autofs
Source8: get-upstream-patches
Source42: org.freedesktop.AutoMount.conf
-Source100: autofs-rpmlintrc
# PATCH-FIX-UPSTREAM autofs-task-use-after-free.patch [bnc#727392]
Patch82: autofs-5.1.1-task-use-after-free.patch
# PATCH-FIX-UPSTREAM autofs-improve-scalability-of-direct-mount-path-comp.patch [bsc#966573]
Patch83: autofs-improve-scalability-of-direct-mount-path-comp.patch
+# PATCH-FIX-UPSTREAM autofs-5.1.1-properly-handle-errors-in-lookup_nss_mount.patch (bsc#968918)
+Patch84: autofs-5.1.1-properly-handle-errors-in-lookup_nss_mount.patch
+# PATCH-FIX-UPSTREAM autofs-5.1.1-fix-yp-map-age-not-updated-during-map-lookup.patch (bsc#968918)
+Patch85: autofs-5.1.1-fix-yp-map-age-not-updated-during-map-lookup.patch
# PATCH-FIX-OPENSUSE autofs-suse-auto_master_default.patch
Patch100: autofs-5.1.1-suse-auto_master_default.patch
# PATCH-FIX-OPENSUSE autofs-debuginfo-fix.patch
@@ -114,6 +117,8 @@
#
%patch82 -p1
%patch83 -p1
+%patch84 -p1
+%patch85 -p1
%patch100 -p1
%patch101 -p1
%patch102 -p1
++++++ autofs-5.1.1-fix-yp-map-age-not-updated-during-map-lookup.patch ++++++
From: Jeff Mahoney
Date: Thu, 5 May 2016 17:38:13 +0800
Subject: autofs-5.1.1 - fix yp map age not updated during map lookup
Patch-mainline: 5.1.2
Git-commit: 11fafab0bd1cc7682c55a7898f0e3652997fd3c5
The map source age field should be updated when we retry
the yp map lookup using dots instead of underscores.
Rather than just open code the exit path, just reverse the logic for
returning success so we only have one success path for both cases.
Signed-off-by: Jeff Mahoney
Signed-off-by: Ian Kent
---
modules/lookup_yp.c | 17 ++++++++---------
1 file changed, 8 insertions(+), 9 deletions(-)
diff --git a/modules/lookup_yp.c b/modules/lookup_yp.c
index eda2aba..502d850 100644
--- a/modules/lookup_yp.c
+++ b/modules/lookup_yp.c
@@ -431,17 +431,16 @@ int lookup_read_map(struct autofs_point *ap, time_t age, void *context)
err = yp_all((char *) ctxt->domainname, mapname, &ypcb);
}
- if (err == YPERR_SUCCESS)
- return NSS_STATUS_SUCCESS;
+ if (err != YPERR_SUCCESS) {
+ warn(ap->logopt,
+ MODPREFIX "read of map %s failed: %s",
+ ap->path, yperr_string(err));
- warn(ap->logopt,
- MODPREFIX "read of map %s failed: %s",
- ap->path, yperr_string(err));
+ if (err == YPERR_PMAP || err == YPERR_YPSERV)
+ return NSS_STATUS_UNAVAIL;
- if (err == YPERR_PMAP || err == YPERR_YPSERV)
- return NSS_STATUS_UNAVAIL;
-
- return NSS_STATUS_NOTFOUND;
+ return NSS_STATUS_NOTFOUND;
+ }
}
source->age = age;
++++++ autofs-5.1.1-properly-handle-errors-in-lookup_nss_mount.patch ++++++
From: Jeff Mahoney
Date: Thu, 5 May 2016 18:11:55 +0800
Subject: autofs-5.1.1 - properly handle errors in lookup_nss_mount
Patch-mainline: 5.1.2
Git-commit: b1b271204a291b80318d4232530a82a79321d751
The 'result' variable is initialized to 0 and inconsistently
set in the main while loop. If the map is expired, the strdup("ldap")
fails, or we end up bailing on an sss source with an amd map, and we're
processing the only map in the list or check_nss_result indicates that
we should continue even when we have NSS_STATUS_SUCCESS, we'll return
success when a failure has occured.
Without this change, the end result is still a failure for the user.
The caller attempting to traverse the map will eventually receive
ELOOP once the kernel has reached its internal automount/link follow
limit. We will have just wasted a bunch of time in the interim. This
behavior was observed on a system that was affected by the missing
map->age update fixed in the previous patch.
Acked-by: Jeff Mahoney
---
daemon/lookup.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/daemon/lookup.c b/daemon/lookup.c
index 0129f75..173f53e 100644
--- a/daemon/lookup.c
+++ b/daemon/lookup.c
@@ -1073,7 +1073,7 @@ int lookup_nss_mount(struct autofs_point *ap, struct map_source *source, const c
struct nss_source *this;
struct map_source *map;
enum nsswitch_status status;
- int result = 0;
+ int result = NSS_STATUS_UNKNOWN;
/*
* For each map source (ie. each entry for the mount
@@ -1092,6 +1092,7 @@ int lookup_nss_mount(struct autofs_point *ap, struct map_source *source, const c
* the map entry was last updated.
*/
if (entry->age > map->age) {
+ status = NSS_STATUS_UNAVAIL;
map = map->next;
continue;
}
@@ -1113,6 +1114,7 @@ int lookup_nss_mount(struct autofs_point *ap, struct map_source *source, const c
char *tmp = strdup("ldap");
if (!tmp) {
map = map->next;
+ status = NSS_STATUS_TRYAGAIN;
continue;
}
map->type = tmp;
@@ -1145,6 +1147,7 @@ int lookup_nss_mount(struct autofs_point *ap, struct map_source *source, const c
!strcmp(this->source, "sss")) {
warn(ap->logopt,
"source sss is not available for amd maps.");
+ result = NSS_STATUS_UNAVAIL;
continue;
}