public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Ian Kent <ikent@redhat.com>
To: git-commits@fedoraproject.org
Subject: [rpms/autofs] rawhide: fix map type check when reading master map.
Date: Fri, 20 Nov 2026 07:46:41 GMT	[thread overview]
Message-ID: <179516080121.1.3835448458381351158.rpms-autofs-2bd5cdcdcfb5@fedoraproject.org> (raw)

A new commit has been pushed.

Repo   : rpms/autofs
Branch : rawhide
Commit : 2bd5cdcdcfb5913ca2b95e73e736702894362588
Author : Ian Kent <ikent@redhat.com>
Date   : 2026-11-20T15:46:18+08:00
Stats  : +67/-522 in 8 file(s)
URL    : https://src.fedoraproject.org/rpms/autofs/c/2bd5cdcdcfb5913ca2b95e73e736702894362588?branch=rawhide

Log:
fix map type check when reading master map.

---
diff --git a/autofs-5.1.9-Fix-incompatible-function-pointer-types-in-cyrus-sasl-module.patch b/autofs-5.1.9-Fix-incompatible-function-pointer-types-in-cyrus-sasl-module.patch
deleted file mode 100644
index 497f68c..0000000
--- a/autofs-5.1.9-Fix-incompatible-function-pointer-types-in-cyrus-sasl-module.patch
+++ /dev/null
@@ -1,54 +0,0 @@
-autofs-5.1.9 - Fix incompatible function pointer types in cyrus-sasl module
-
-From: Florian Weimer <fweimer@redhat.com>
-
-Add casts to SASL callbacks to avoid incompatible-pointer-types
-errors.  Avoids a build failure with stricter compilers.
-
-Signed-off-by: Florian Weimer <fweimer@redhat.com>
-Signed-off-by: Ian Kent <raven@themaw.net>
----
- CHANGELOG            |    2 ++
- modules/cyrus-sasl.c |   14 +++++++-------
- 2 files changed, 9 insertions(+), 7 deletions(-)
-
-diff --git a/CHANGELOG b/CHANGELOG
-index 3e47daa12..fd9d8614a 100644
---- a/CHANGELOG
-+++ b/CHANGELOG
-@@ -1,4 +1,6 @@
- 
-+- Fix incompatible function pointer types in cyrus-sasl module.
-+
- 02/11/2023 autofs-5.1.9
- - fix kernel mount status notification.
- - fix fedfs build flags.
-diff --git a/modules/cyrus-sasl.c b/modules/cyrus-sasl.c
-index e742eaf8e..78b77942b 100644
---- a/modules/cyrus-sasl.c
-+++ b/modules/cyrus-sasl.c
-@@ -109,17 +109,17 @@ static int getpass_func(sasl_conn_t *, void *, int, sasl_secret_t **);
- static int getuser_func(void *, int, const char **, unsigned *);
- 
- static sasl_callback_t callbacks[] = {
--	{ SASL_CB_USER, &getuser_func, NULL },
--	{ SASL_CB_AUTHNAME, &getuser_func, NULL },
--	{ SASL_CB_PASS, &getpass_func, NULL },
-+	{ SASL_CB_USER, (int(*)(void)) &getuser_func, NULL },
-+	{ SASL_CB_AUTHNAME, (int(*)(void)) &getuser_func, NULL },
-+	{ SASL_CB_PASS, (int(*)(void)) &getpass_func, NULL },
- 	{ SASL_CB_LIST_END, NULL, NULL },
- };
- 
- static sasl_callback_t debug_callbacks[] = {
--	{ SASL_CB_LOG, &sasl_log_func, NULL },
--	{ SASL_CB_USER, &getuser_func, NULL },
--	{ SASL_CB_AUTHNAME, &getuser_func, NULL },
--	{ SASL_CB_PASS, &getpass_func, NULL },
-+	{ SASL_CB_LOG, (int(*)(void)) &sasl_log_func, NULL },
-+	{ SASL_CB_USER, (int(*)(void)) &getuser_func, NULL },
-+	{ SASL_CB_AUTHNAME, (int(*)(void)) &getuser_func, NULL },
-+	{ SASL_CB_PASS, (int(*)(void)) &getpass_func, NULL },
- 	{ SASL_CB_LIST_END, NULL, NULL },
- };
- 

diff --git a/autofs-5.1.9-fix-always-recreate-credential-cache.patch b/autofs-5.1.9-fix-always-recreate-credential-cache.patch
deleted file mode 100644
index 36a02dd..0000000
--- a/autofs-5.1.9-fix-always-recreate-credential-cache.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-autofs-5.1.9 - fix always recreate credential cache
-
-From: Ian Kent <raven@themaw.net>
-
-When I aplied the original patch from Ian Collier for this I changed
-the credential end time comparison to be against the time returned from
-monotomic_time(). But this isn't the same as the calander time returned
-from time() which Ian used in his original patch.
-
-Signed-off-by: Ian Kent < raven@themaw.net>
----
- CHANGELOG            |    1 +
- modules/cyrus-sasl.c |    2 +-
- 2 files changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/CHANGELOG b/CHANGELOG
-index fd9d8614a..3fe6b6310 100644
---- a/CHANGELOG
-+++ b/CHANGELOG
-@@ -1,5 +1,6 @@
- 
- - Fix incompatible function pointer types in cyrus-sasl module.
-+- fix always recreate credential cache.
- 
- 02/11/2023 autofs-5.1.9
- - fix kernel mount status notification.
-diff --git a/modules/cyrus-sasl.c b/modules/cyrus-sasl.c
-index 78b77942b..69e613bad 100644
---- a/modules/cyrus-sasl.c
-+++ b/modules/cyrus-sasl.c
-@@ -676,7 +676,7 @@ sasl_do_kinit(unsigned logopt, struct lookup_context *ctxt)
- 	}
- 	else {
- 		krb5_creds match_creds, out_creds;
--		time_t now = monotonic_time(NULL);
-+		time_t now = time(NULL);
- 
- 		/* even if the cache is in use, we will clear it if it
- 		 * contains an expired credential for our principal,

diff --git a/autofs-5.1.9-fix-changelog.patch b/autofs-5.1.9-fix-changelog.patch
deleted file mode 100644
index 8b98024..0000000
--- a/autofs-5.1.9-fix-changelog.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-autofs-5.1.9 - fix changelog
-
-From: Ian Kent <raven@themaw.net>
-
-Add missed changelog entries.
-
-Signed-off-by: Ian Kent <raven@themaw.net>
----
- CHANGELOG |    3 +++
- 1 file changed, 3 insertions(+)
-
-diff --git a/CHANGELOG b/CHANGELOG
-index 3fe6b6310..505993f95 100644
---- a/CHANGELOG
-+++ b/CHANGELOG
-@@ -1,4 +1,7 @@
- 
-+- Update configure script.
-+- fix ldap_parse_page_control() check.
-+- fix crash in make_options_string().
- - Fix incompatible function pointer types in cyrus-sasl module.
- - fix always recreate credential cache.
- 

diff --git a/autofs-5.1.9-fix-crash-in-make_options_string.patch b/autofs-5.1.9-fix-crash-in-make_options_string.patch
deleted file mode 100644
index d893726..0000000
--- a/autofs-5.1.9-fix-crash-in-make_options_string.patch
+++ /dev/null
@@ -1,99 +0,0 @@
-autofs-5.1.9 - fix crash in make_options_string()
-
-From: Ian Kent <raven@themaw.net>
-
-glibc reports a memory overflow when make_options_string() in snprintf()
-As described by Andreas Hasenack on the autofs mailing list this is due
-to my incorrect use of max_len in snprintf(), it should in fact be
-max_len - <length of buffer already used>.
-
-Anyway looking at the calculated maximum options string length there's
-no actual overflow possible.
-
-To fix this use strcat(3) instead of snprintf(), in this case there's
-probably less overhead anyway. While we are at it drop the useless error
-checks because we know it won't overflow.
-
-Signed-off-by: Ian Kent <raven@themaw.net>
----
- lib/mounts.c |   35 +++++++++--------------------------
- 1 file changed, 9 insertions(+), 26 deletions(-)
-
-diff --git a/lib/mounts.c b/lib/mounts.c
-index 05f18dbcf..7680c59c1 100644
---- a/lib/mounts.c
-+++ b/lib/mounts.c
-@@ -695,10 +695,11 @@ static int cacl_max_options_len(unsigned int flags)
- 	unsigned int kver_minor = get_kver_minor();
- 	int max_len;
- 
--	/* %d and %u are maximum lenght of 10 and mount type is maximum
--	 * length of 9 (e. ",indirect").
-+	/* %d and %u are maximum length of 10 and mount type is maximum
-+	 * length of 9 (ie. ",indirect").
- 	 * The base temaplate is "fd=%d,pgrp=%u,minproto=5,maxproto=%d"
--	 * plus the length of mount type plus 1 for the NULL.
-+	 * plus the length of mount type plus 1 for the NULL (and an
-+	 * additional 10 characters for good measure!).
- 	 */
- 	max_len = 79 + 1;
- 
-@@ -728,7 +729,7 @@ char *make_options_string(char *path, int pipefd,
- 	unsigned int kver_major = get_kver_major();
- 	unsigned int kver_minor = get_kver_minor();
- 	char *options;
--	int max_len, len, new;
-+	int max_len, len;
- 
- 	max_len = cacl_max_options_len(flags);
- 
-@@ -751,21 +752,13 @@ char *make_options_string(char *path, int pipefd,
- 	if (len < 0)
- 		goto error_out;
- 
--	if (len >= max_len)
--		goto truncated;
--
- 	if (kver_major < 5 || (kver_major == 5 && kver_minor < 4))
- 		goto out;
- 
- 	/* maybe add ",strictexpire" */
- 	if (flags & MOUNT_FLAG_STRICTEXPIRE) {
--		new = snprintf(options + len,
--			       max_len, "%s", ",strictexpire");
--		if (new < 0)
--		       goto error_out;
--		len += new;
--		if (len >= max_len)
--			goto truncated;
-+		strcat(options, ",strictexpire");
-+		len += 13;
- 	}
- 
- 	if (kver_major == 5 && kver_minor < 5)
-@@ -773,23 +766,13 @@ char *make_options_string(char *path, int pipefd,
- 
- 	/* maybe add ",ignore" */
- 	if (flags & MOUNT_FLAG_IGNORE) {
--		new = snprintf(options + len,
--			       max_len, "%s", ",ignore");
--		if (new < 0)
--		       goto error_out;
--		len += new;
--		if (len >= max_len)
--			goto truncated;
-+		strcat(options, ",ignore");
-+		len += 7;
- 	}
- out:
- 	options[len] = '\0';
- 	return options;
- 
--truncated:
--	logerr("buffer to small for options - truncated");
--	len = max_len -1;
--	goto out;
--
- error_out:
- 	logerr("error constructing mount options string for %s", path);
- 	free(options);

diff --git a/autofs-5.1.9-fix-ldap_parse_page_control-check.patch b/autofs-5.1.9-fix-ldap_parse_page_control-check.patch
deleted file mode 100644
index ded337e..0000000
--- a/autofs-5.1.9-fix-ldap_parse_page_control-check.patch
+++ /dev/null
@@ -1,54 +0,0 @@
-autofs-5.1.9 - fix ldap_parse_page_control() check
-
-From: David Disseldorp <ddiss@suse.de>
-
-The final @cookie parameter should be a struct berval ** type. The
-check currently fails when -Werror=incompatible-pointer-types is set:
-
-conftest.c: In function 'main':
-conftest.c:54:47: error: passing argument 4 of 'ldap_parse_page_control'
-from incompatible pointer type [-Werror=incompatible-pointer-types]
-   54 |       ret = ldap_parse_page_control(ld,clp,ct,c);
-      |                                               ^
-      |                                               |
-      |                                               struct berval *
-In file included from /usr/include/lber_types.h:24,
-                 from /usr/include/lber.h:29,
-                 from /usr/include/ldap.h:30,
-                 from conftest.c:45:
-/usr/include/ldap.h:2155:25: note: expected 'struct berval **' but
-argument is of type 'struct berval *'
- 2155 | ldap_parse_page_control LDAP_P((
-
-Signed-off-by: David Disseldorp <ddiss@suse.de>
----
- aclocal.m4 |    2 +-
- configure  |    2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/aclocal.m4 b/aclocal.m4
-index 1046d72b1..fa18eb1df 100644
---- a/aclocal.m4
-+++ b/aclocal.m4
-@@ -424,7 +424,7 @@ AC_LINK_IFELSE(
-       #include <ldap.h> ]],
-    [[ LDAP *ld;
-       ber_int_t *ct;
--      struct berval *c;
-+      struct berval **c;
-       int ret;
-       LDAPControl **clp;
-       ret = ldap_parse_page_control(ld,clp,ct,c); ]])],
-diff --git a/configure b/configure
-index 3dc07f638..22ac5e1b1 100755
---- a/configure
-+++ b/configure
-@@ -5653,7 +5653,7 @@ main (void)
- {
-  LDAP *ld;
-       ber_int_t *ct;
--      struct berval *c;
-+      struct berval **c;
-       int ret;
-       LDAPControl **clp;
-       ret = ldap_parse_page_control(ld,clp,ct,c);

diff --git a/autofs-5.1.9-update-configure.patch b/autofs-5.1.9-update-configure.patch
deleted file mode 100644
index 790337e..0000000
--- a/autofs-5.1.9-update-configure.patch
+++ /dev/null
@@ -1,252 +0,0 @@
-Update configure script.
-
-From: Ian Kent <raven@themaw.net>
-
-Signed-off-by: Ian Kent <raven@themaw.net>
----
- configure |   92 +++++++++++++++++++++++++++++++------------------------------
- 1 file changed, 46 insertions(+), 46 deletions(-)
-
-diff --git a/configure b/configure
-index d9b94b3e5..3dc07f638 100755
---- a/configure
-+++ b/configure
-@@ -2437,8 +2437,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
- 
- 
- # for pkg-config macros
--# pkg.m4 - Macros to locate and utilise pkg-config.   -*- Autoconf -*-
--# serial 11 (pkg-config-0.29.1)
-+# pkg.m4 - Macros to locate and use pkg-config.   -*- Autoconf -*-
-+# serial 12 (pkg-config-0.29.2)
- 
- 
- 
-@@ -3706,8 +3706,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
- 
- 
- pkg_failed=no
--{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for systemd" >&5
--printf %s "checking for systemd... " >&6; }
-+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libsystemd" >&5
-+printf %s "checking for libsystemd... " >&6; }
- 
- if test -n "$systemd_CFLAGS"; then
-     pkg_cv_systemd_CFLAGS="$systemd_CFLAGS"
-@@ -3747,7 +3747,7 @@ fi
- 
- 
- if test $pkg_failed = yes; then
--   	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
-+        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
- printf "%s\n" "no" >&6; }
- 
- if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
-@@ -3756,12 +3756,12 @@ else
-         _pkg_short_errors_supported=no
- fi
-         if test $_pkg_short_errors_supported = yes; then
--	        systemd_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libsystemd" 2>&1`
-+                systemd_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libsystemd" 2>&1`
-         else
--	        systemd_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libsystemd" 2>&1`
-+                systemd_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libsystemd" 2>&1`
-         fi
--	# Put the nasty error message in config.log where it belongs
--	echo "$systemd_PKG_ERRORS" >&5
-+        # Put the nasty error message in config.log where it belongs
-+        echo "$systemd_PKG_ERRORS" >&5
- 
- 
-   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sm_notify in -lsystemd" >&5
-@@ -3807,7 +3807,7 @@ fi
- 
- 
- elif test $pkg_failed = untried; then
--     	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
-+        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
- printf "%s\n" "no" >&6; }
- 
-   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sm_notify in -lsystemd" >&5
-@@ -3853,8 +3853,8 @@ fi
- 
- 
- else
--	systemd_CFLAGS=$pkg_cv_systemd_CFLAGS
--	systemd_LIBS=$pkg_cv_systemd_LIBS
-+        systemd_CFLAGS=$pkg_cv_systemd_CFLAGS
-+        systemd_LIBS=$pkg_cv_systemd_LIBS
-         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
- printf "%s\n" "yes" >&6; }
- 
-@@ -3997,8 +3997,8 @@ fi
- if test "x$with_libtirpc" = "xyes"; then
- 
- pkg_failed=no
--{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for TIRPC" >&5
--printf %s "checking for TIRPC... " >&6; }
-+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libtirpc" >&5
-+printf %s "checking for libtirpc... " >&6; }
- 
- if test -n "$TIRPC_CFLAGS"; then
-     pkg_cv_TIRPC_CFLAGS="$TIRPC_CFLAGS"
-@@ -4038,7 +4038,7 @@ fi
- 
- 
- if test $pkg_failed = yes; then
--   	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
-+        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
- printf "%s\n" "no" >&6; }
- 
- if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
-@@ -4047,14 +4047,14 @@ else
-         _pkg_short_errors_supported=no
- fi
-         if test $_pkg_short_errors_supported = yes; then
--	        TIRPC_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libtirpc" 2>&1`
-+                TIRPC_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libtirpc" 2>&1`
-         else
--	        TIRPC_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libtirpc" 2>&1`
-+                TIRPC_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libtirpc" 2>&1`
-         fi
--	# Put the nasty error message in config.log where it belongs
--	echo "$TIRPC_PKG_ERRORS" >&5
-+        # Put the nasty error message in config.log where it belongs
-+        echo "$TIRPC_PKG_ERRORS" >&5
- 
--	as_fn_error $? "Package requirements (libtirpc) were not met:
-+        as_fn_error $? "Package requirements (libtirpc) were not met:
- 
- $TIRPC_PKG_ERRORS
- 
-@@ -4065,9 +4065,9 @@ Alternatively, you may set the environment variables TIRPC_CFLAGS
- and TIRPC_LIBS to avoid the need to call pkg-config.
- See the pkg-config man page for more details." "$LINENO" 5
- elif test $pkg_failed = untried; then
--     	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
-+        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
- printf "%s\n" "no" >&6; }
--	{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-+        { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
- printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
- as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
- is in your PATH or set the PKG_CONFIG environment variable to the full
-@@ -4080,8 +4080,8 @@ See the pkg-config man page for more details.
- To get pkg-config, see <http://pkg-config.freedesktop.org/>.
- See \`config.log' for more details" "$LINENO" 5; }
- else
--	TIRPC_CFLAGS=$pkg_cv_TIRPC_CFLAGS
--	TIRPC_LIBS=$pkg_cv_TIRPC_LIBS
-+        TIRPC_CFLAGS=$pkg_cv_TIRPC_CFLAGS
-+        TIRPC_LIBS=$pkg_cv_TIRPC_LIBS
-         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
- printf "%s\n" "yes" >&6; }
- 
-@@ -4812,8 +4812,8 @@ fi
- # LDAP SASL auth needs libxml and Kerberos
- 
- pkg_failed=no
--{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for XML" >&5
--printf %s "checking for XML... " >&6; }
-+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libxml-2.0" >&5
-+printf %s "checking for libxml-2.0... " >&6; }
- 
- if test -n "$XML_CFLAGS"; then
-     pkg_cv_XML_CFLAGS="$XML_CFLAGS"
-@@ -4853,7 +4853,7 @@ fi
- 
- 
- if test $pkg_failed = yes; then
--   	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
-+        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
- printf "%s\n" "no" >&6; }
- 
- if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
-@@ -4862,21 +4862,21 @@ else
-         _pkg_short_errors_supported=no
- fi
-         if test $_pkg_short_errors_supported = yes; then
--	        XML_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libxml-2.0" 2>&1`
-+                XML_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libxml-2.0" 2>&1`
-         else
--	        XML_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libxml-2.0" 2>&1`
-+                XML_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libxml-2.0" 2>&1`
-         fi
--	# Put the nasty error message in config.log where it belongs
--	echo "$XML_PKG_ERRORS" >&5
-+        # Put the nasty error message in config.log where it belongs
-+        echo "$XML_PKG_ERRORS" >&5
- 
--	HAVE_LIBXML=0
-+        HAVE_LIBXML=0
- elif test $pkg_failed = untried; then
--     	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
-+        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
- printf "%s\n" "no" >&6; }
--	HAVE_LIBXML=0
-+        HAVE_LIBXML=0
- else
--	XML_CFLAGS=$pkg_cv_XML_CFLAGS
--	XML_LIBS=$pkg_cv_XML_LIBS
-+        XML_CFLAGS=$pkg_cv_XML_CFLAGS
-+        XML_LIBS=$pkg_cv_XML_LIBS
-         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
- printf "%s\n" "yes" >&6; }
- 
-@@ -5079,8 +5079,8 @@ fi
- 
- 
- pkg_failed=no
--{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for NSL" >&5
--printf %s "checking for NSL... " >&6; }
-+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libnsl" >&5
-+printf %s "checking for libnsl... " >&6; }
- 
- if test -n "$NSL_CFLAGS"; then
-     pkg_cv_NSL_CFLAGS="$NSL_CFLAGS"
-@@ -5120,7 +5120,7 @@ fi
- 
- 
- if test $pkg_failed = yes; then
--   	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
-+        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
- printf "%s\n" "no" >&6; }
- 
- if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
-@@ -5129,12 +5129,12 @@ else
-         _pkg_short_errors_supported=no
- fi
-         if test $_pkg_short_errors_supported = yes; then
--	        NSL_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libnsl" 2>&1`
-+                NSL_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libnsl" 2>&1`
-         else
--	        NSL_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libnsl" 2>&1`
-+                NSL_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libnsl" 2>&1`
-         fi
--	# Put the nasty error message in config.log where it belongs
--	echo "$NSL_PKG_ERRORS" >&5
-+        # Put the nasty error message in config.log where it belongs
-+        echo "$NSL_PKG_ERRORS" >&5
- 
- 
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for yp_match in -lnsl" >&5
-@@ -5181,7 +5181,7 @@ fi
- NSL_CFLAGS=""
- 
- elif test $pkg_failed = untried; then
--     	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
-+        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
- printf "%s\n" "no" >&6; }
- 
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for yp_match in -lnsl" >&5
-@@ -5228,8 +5228,8 @@ fi
- NSL_CFLAGS=""
- 
- else
--	NSL_CFLAGS=$pkg_cv_NSL_CFLAGS
--	NSL_LIBS=$pkg_cv_NSL_LIBS
-+        NSL_CFLAGS=$pkg_cv_NSL_CFLAGS
-+        NSL_LIBS=$pkg_cv_NSL_LIBS
-         { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
- printf "%s\n" "yes" >&6; }
- 

diff --git a/autofs-5.2.0-fix-map-type-check-when-reading-master-map.patch b/autofs-5.2.0-fix-map-type-check-when-reading-master-map.patch
new file mode 100644
index 0000000..d1f6a34
--- /dev/null
+++ b/autofs-5.2.0-fix-map-type-check-when-reading-master-map.patch
@@ -0,0 +1,62 @@
+autofs-5.2.0 - fix map type check when reading master map
+
+From: Ian Kent <raven@themaw.net>
+
+Commit 567b4ea2 ("dont auto readmap for hosts map") added two
+strcmp(ap->entry->maps->type, "hosts") calls in daemon/master.c without
+a NULL check. If ap->maps->type is NULL when the master map entry has
+no explicit type, e.g. "/auto /etc/auto.auto", automount segfaults.
+
+After the daemon dies, processes that accessed the mount point stay
+blocked in autofs_wait and the system frequently needs to be rebooted.
+
+Thanks to Derek Parks for the initial patch.
+
+Fixes: 567b4ea2 ("dont auto readmap for hosts map")
+Reported-by: Derek Parks <dnparks@gmail.com>
+Signed-off-by: Ian Kent <raven@themaw.net>
+---
+ CHANGELOG       |    2 ++
+ daemon/master.c |    9 +++++++--
+ 2 files changed, 9 insertions(+), 2 deletions(-)
+
+diff --git a/CHANGELOG b/CHANGELOG
+index a7c7abd4f..fdf4570ad 100644
+--- a/CHANGELOG
++++ b/CHANGELOG
+@@ -1,3 +1,5 @@
++- fix map type check when reading master map.
++
+ 10/11/2026 autofs-5.2.0
+ - Update configure script.
+ - fix ldap_parse_page_control() check.
+diff --git a/daemon/master.c b/daemon/master.c
+index f1df80731..94b0d8db8 100644
+--- a/daemon/master.c
++++ b/daemon/master.c
+@@ -613,10 +613,14 @@ void send_map_update_request(struct autofs_point *ap)
+ 	struct map_source *map;
+ 	int status, need_update = 0;
+ 
++	/* Don't bother if there are no maps. */
++	if (!ap->entry->maps)
++		return;
++
+ 	/* Don't send an update request if the primary map is the
+ 	 * "hosts" map.
+ 	 */
+-	if (!strcmp(ap->entry->maps->type, "hosts"))
++	if (ap->entry->maps->type && !strcmp(ap->entry->maps->type, "hosts"))
+ 		return;
+ 
+ 	status = pthread_mutex_lock(&instance_mutex);
+@@ -1513,7 +1517,8 @@ void check_update_map_sources(struct master_mapent *entry, int readall)
+ 		/* Don't send an update request if the primary map is
+ 		 * the "hosts" map.
+ 		 */
+-		if (strcmp(ap->entry->maps->type, "hosts"))
++		if (entry->maps &&
++		   (!entry->maps->type || strcmp(entry->maps->type, "hosts")))
+ 			st_add_task(ap, ST_READMAP);
+ 	}
+ 

diff --git a/autofs.spec b/autofs.spec
index 907041e..a9a044a 100644
--- a/autofs.spec
+++ b/autofs.spec
@@ -15,10 +15,11 @@
 Summary: A tool for automatically mounting and unmounting filesystems
 Name: autofs
 Version: 5.2.0
-Release: 1%{?dist}
+Release: 2%{?dist}
 Epoch: 1
 License: GPL-2.0-or-later
 Source: https://www.kernel.org/pub/linux/daemons/autofs/v5/autofs-%{version}.tar.gz
+Patch1: autofs-5.2.0-fix-map-type-check-when-reading-master-map.patch
 
 %if %{with systemd}
 BuildRequires: systemd-units
@@ -194,6 +195,9 @@ fi
 %dir /etc/auto.master.d
 
 %changelog
+* Wed Nov 11 2026 Ian Kent <ikent@redhat.com> - 1:5.2.0-2
+- fix map type check when reading master map.
+
 * Wed Nov 11 2026 Ian Kent <ikent@redhat.com> - 1:5.2.0-1
 - Update to upstream release 5.2.0.
 

                 reply	other threads:[~2026-11-20  7:46 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=179516080121.1.3835448458381351158.rpms-autofs-2bd5cdcdcfb5@fedoraproject.org \
    --to=ikent@redhat.com \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox