[autofs] - add latest upstream patches for autofs-5.0.8.

Ian Kent iankent at fedoraproject.org
Thu Nov 7 02:13:02 UTC 2013


commit e61a39830faf459410e6bb0de91504d120c73708
Author: Ian Kent <ikent at redhat.com>
Date:   Thu Nov 7 10:12:18 2013 +0800

    - add latest upstream patches for autofs-5.0.8.

 autofs-5.0.8-fix-master-map-type-check.patch       |   58 ++++++++++++++++++++
 ...0.8-fix-task-manager-not-getting-signaled.patch |   47 ++++++++++++++++
 ...ed-authtype_requires_creds-err-if-ldap-en.patch |   52 ++++++++++++++++++
 autofs.spec                                        |   13 ++++-
 4 files changed, 169 insertions(+), 1 deletions(-)
---
diff --git a/autofs-5.0.8-fix-master-map-type-check.patch b/autofs-5.0.8-fix-master-map-type-check.patch
new file mode 100644
index 0000000..5d96325
--- /dev/null
+++ b/autofs-5.0.8-fix-master-map-type-check.patch
@@ -0,0 +1,58 @@
+autofs-5.0.8 - fix master map type check
+
+From: Ian Kent <ikent at redhat.com>
+
+Map type has format <type>[,<format>] but the master map type check
+for old style map syntax doesn't allow for <format>.
+---
+ CHANGELOG       |    1 +
+ daemon/lookup.c |   24 ++++++++++++++++--------
+ 2 files changed, 17 insertions(+), 8 deletions(-)
+
+diff --git a/CHANGELOG b/CHANGELOG
+index a45ca6a..fb2f2d6 100644
+--- a/CHANGELOG
++++ b/CHANGELOG
+@@ -1,6 +1,7 @@
+ ??/??/20?? autofs-5.0.9
+ =======================
+ - fix undefined authtype_requires_creds err if ldap enabled but without sasl.
++- fix master map type check.
+ 
+ 17/10/2013 autofs-5.0.8
+ =======================
+diff --git a/daemon/lookup.c b/daemon/lookup.c
+index e3d9536..7fea942 100644
+--- a/daemon/lookup.c
++++ b/daemon/lookup.c
+@@ -171,14 +171,22 @@ int lookup_nss_read_master(struct master *master, time_t age)
+ 			char source[10];
+ 
+ 			memset(source, 0, 10);
+-			if (!strncmp(name, "file:", 5) ||
+-			    !strncmp(name, "yp:", 3) ||
+-			    !strncmp(name, "nis:", 4) ||
+-			    !strncmp(name, "nisplus:", 8) ||
+-			    !strncmp(name, "ldap:", 5) ||
+-			    !strncmp(name, "ldaps:", 6) ||
+-			    !strncmp(name, "sss:", 4) ||
+-			    !strncmp(name, "dir:", 4)) {
++			if ((!strncmp(name, "file", 4) &&
++				 (name[4] == ',' || name[4] == ':')) ||
++			    (!strncmp(name, "yp", 3) &&
++				 (name[3] == ',' || name[3] == ':')) ||
++			    (!strncmp(name, "nis", 3) &&
++				 (name[3] == ',' || name[3] == ':')) ||
++			    (!strncmp(name, "nisplus", 7) &&
++				 (name[7] == ',' || name[7] == ':')) ||
++			    (!strncmp(name, "ldap", 4) &&
++				 (name[4] == ',' || name[4] == ':')) ||
++			    (!strncmp(name, "ldaps", 5) &&
++				 (name[5] == ',' || name[5] == ':')) ||
++			    (!strncmp(name, "sss", 3) ||
++				 (name[3] == ',' || name[3] == ':')) ||
++			    (!strncmp(name, "dir", 3) &&
++				 (name[3] == ',' || name[3] == ':'))) {
+ 				strncpy(source, name, tmp - name);
+ 
+ 				/*
diff --git a/autofs-5.0.8-fix-task-manager-not-getting-signaled.patch b/autofs-5.0.8-fix-task-manager-not-getting-signaled.patch
new file mode 100644
index 0000000..d189820
--- /dev/null
+++ b/autofs-5.0.8-fix-task-manager-not-getting-signaled.patch
@@ -0,0 +1,47 @@
+autofs-5.0.8 - fix task manager not getting signaled
+
+From: Ian Kent <ikent at redhat.com>
+
+If a task is added and the task list isn't empty and in progress
+tasks depend on the new task completion the task manager doesn't
+get signaled.
+---
+ CHANGELOG      |    1 +
+ daemon/state.c |   10 +++++-----
+ 2 files changed, 6 insertions(+), 5 deletions(-)
+
+diff --git a/CHANGELOG b/CHANGELOG
+index fb2f2d6..a01393c 100644
+--- a/CHANGELOG
++++ b/CHANGELOG
+@@ -2,6 +2,7 @@
+ =======================
+ - fix undefined authtype_requires_creds err if ldap enabled but without sasl.
+ - fix master map type check.
++- fix task manager not getting signaled.
+ 
+ 17/10/2013 autofs-5.0.8
+ =======================
+diff --git a/daemon/state.c b/daemon/state.c
+index 8d81788..3174a9c 100644
+--- a/daemon/state.c
++++ b/daemon/state.c
+@@ -818,13 +818,13 @@ done:
+ 		new = st_alloc_task(ap, state);
+ 		if (new)
+ 			list_add(&new->list, head);
+-		/* Added to empty state queue, kick state machine */
+-		signaled = 1;
+-		status = pthread_cond_signal(&cond);
+-		if (status)
+-			fatal(status);
+ 	}
+ 
++	signaled = 1;
++	status = pthread_cond_signal(&cond);
++	if (status)
++		fatal(status);
++
+ 	return 1;
+ }
+ 
diff --git a/autofs-5.0.8-fix-undefined-authtype_requires_creds-err-if-ldap-en.patch b/autofs-5.0.8-fix-undefined-authtype_requires_creds-err-if-ldap-en.patch
new file mode 100644
index 0000000..bf50ab9
--- /dev/null
+++ b/autofs-5.0.8-fix-undefined-authtype_requires_creds-err-if-ldap-en.patch
@@ -0,0 +1,52 @@
+autofs-5.0.8 - fix undefined authtype_requires_creds err if ldap enabled but without sasl
+
+From: Lan Yixun (dlan) <dennis.yxun at gmail.com>
+
+This patch is moving "WITH_SASL" into authtype_requires_creds function
+make it return 0 if sasl not enabled, which mean authtype_requires_creds is not enabled
+
+https://bugs.gentoo.org/show_bug.cgi?id=489128
+---
+ CHANGELOG             |    4 ++++
+ modules/lookup_ldap.c |    4 ++--
+ 2 files changed, 6 insertions(+), 2 deletions(-)
+
+diff --git a/CHANGELOG b/CHANGELOG
+index 62dac81..a45ca6a 100644
+--- a/CHANGELOG
++++ b/CHANGELOG
+@@ -1,3 +1,7 @@
++??/??/20?? autofs-5.0.9
++=======================
++- fix undefined authtype_requires_creds err if ldap enabled but without sasl.
++
+ 17/10/2013 autofs-5.0.8
+ =======================
+ - fix nobind sun escaped map entries.
+diff --git a/modules/lookup_ldap.c b/modules/lookup_ldap.c
+index 2ab1e8c..04b1da7 100644
+--- a/modules/lookup_ldap.c
++++ b/modules/lookup_ldap.c
+@@ -846,20 +846,20 @@ int get_property(unsigned logopt, xmlNodePtr node, const char *prop, char **valu
+ 	return 0;
+ }
+ 
+-#ifdef WITH_SASL
+ /*
+  *  For plain text, login and digest-md5 authentication types, we need
+  *  user and password credentials.
+  */
+ int authtype_requires_creds(const char *authtype)
+ {
++#ifdef WITH_SASL
+ 	if (!strncmp(authtype, "PLAIN", strlen("PLAIN")) ||
+ 	    !strncmp(authtype, "DIGEST-MD5", strlen("DIGEST-MD5")) ||
+ 	    !strncmp(authtype, "LOGIN", strlen("LOGIN")))
+ 		return 1;
++#endif
+ 	return 0;
+ }
+-#endif
+ 
+ /*
+  *  Returns:
diff --git a/autofs.spec b/autofs.spec
index 773730c..7c86779 100644
--- a/autofs.spec
+++ b/autofs.spec
@@ -8,11 +8,14 @@
 Summary: A tool for automatically mounting and unmounting filesystems
 Name: autofs
 Version: 5.0.8
-Release: 2%{?dist}
+Release: 3%{?dist}
 Epoch: 1
 License: GPLv2+
 Group: System Environment/Daemons
 Source: ftp://ftp.kernel.org/pub/linux/daemons/autofs/v5/autofs-%{version}.tar.bz2
+Patch1: autofs-5.0.8-fix-undefined-authtype_requires_creds-err-if-ldap-en.patch
+Patch2: autofs-5.0.8-fix-master-map-type-check.patch
+Patch3: autofs-5.0.8-fix-task-manager-not-getting-signaled.patch
 Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 %if %{with_systemd}
 BuildRequires: systemd-units
@@ -70,6 +73,9 @@ echo %{version}-%{release} > .version
   %define unitdir %{?_unitdir:/usr/lib/systemd/system}
   %define systemd_configure_arg --with-systemd
 %endif
+%patch1 -p1
+%patch2 -p1
+%patch3 -p1
 
 %build
 LDFLAGS=-Wl,-z,now
@@ -161,6 +167,11 @@ fi
 %dir /etc/auto.master.d
 
 %changelog
+* Thu Nov 7 2013 Ian Kent <ikent at redhat.com> - 1:5.0.8-3
+- fix undefined authtype_requires_creds err if ldap enabled but without sasl.
+- fix master map type check.
+- fix task manager not getting signaled.
+
 * Mon Oct 21 2013 Ian Kent <ikent at redhat.com> - 1:5.0.8-2
 - remove now unused patch files (bz1020242).
 


More information about the scm-commits mailing list