rpms/autofs/devel autofs-5.0.4-add-nfs-mount-proto-default-conf-option.patch, NONE, 1.1 autofs-5.0.4-configure-libtirpc-fix.patch, 1.1, 1.2 autofs-5.0.4-easy-alloca-replacements-fix.patch, 1.1, 1.2 autofs-5.0.4-libxml2-workaround-fix.patch, 1.1, 1.2 autofs.spec, 1.268, 1.269

Ian Kent iankent at fedoraproject.org
Tue Feb 24 04:16:37 UTC 2009


Author: iankent

Update of /cvs/pkgs/rpms/autofs/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv11463

Modified Files:
	autofs.spec 
Added Files:
	autofs-5.0.4-add-nfs-mount-proto-default-conf-option.patch 
	autofs-5.0.4-configure-libtirpc-fix.patch 
	autofs-5.0.4-easy-alloca-replacements-fix.patch 
	autofs-5.0.4-libxml2-workaround-fix.patch 
Log Message:
* Tue Feb 24 2009 Ian Kent <ikent at redhat.com> - 1:5.0.4-15
- fix array out of bounds accesses and cleanup couple of other alloca() calls.
- Undo mistake in copy order for submount path introduced by rev 11 patch.
- add check for alternate libxml2 library for libxml2 tsd workaround.
- add check for alternate libtirpc library for libtirpc tsd workaround.
- cleanup configure defines for libtirpc.
- add WITH_LIBTIRPC to -V status report.
- add libtirpc-devel to BuildRequires.
- add nfs mount protocol default configuration option.


autofs-5.0.4-add-nfs-mount-proto-default-conf-option.patch:

--- NEW FILE autofs-5.0.4-add-nfs-mount-proto-default-conf-option.patch ---
autofs-5.0.4 - add nfs mount protocol default configuration option

From: Ian Kent <raven at themaw.net>

Add configuration option MOUNT_NFS_DEFAULT_PROTOCOL with default of 3.
Since the default mount protocol used by mount.nfs(8) will change to
NFS version 4 at some point, and because we can't identify the default
automatically, we need to be able to set it in our configuration.
This will only make a difference for replicated map entries as
availability probing isn't used for single host map entries.
---

 CHANGELOG                      |    1 +
 include/defaults.h             |    2 ++
 lib/defaults.c                 |   15 ++++++++++++++-
 man/auto.master.5.in           |    6 ++++++
 modules/mount_nfs.c            |    8 +++++---
 redhat/autofs.sysconfig.in     |   10 ++++++++++
 samples/autofs.conf.default.in |   10 ++++++++++
 7 files changed, 48 insertions(+), 4 deletions(-)


diff --git a/CHANGELOG b/CHANGELOG
index ad74b7d..0ce2a56 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -25,6 +25,7 @@
 - add check for alternate libtirpc library for libtirpc tsd workaround.
 - cleanup configure defines for libtirpc.
 - add WITH_LIBTIRPC to -V status report.
+- add nfs mount protocol default configuration option.
 
 4/11/2008 autofs-5.0.4
 -----------------------
diff --git a/include/defaults.h b/include/defaults.h
index 9a2430f..9bf16e5 100644
--- a/include/defaults.h
+++ b/include/defaults.h
@@ -37,6 +37,7 @@
 #define DEFAULT_ENTRY_ATTR		"cn"
 #define DEFAULT_VALUE_ATTR		"nisMapEntry"
 
+#define DEFAULT_NFS_MOUNT_PROTOCOL	3
 #define DEFAULT_APPEND_OPTIONS		1
 #define DEFAULT_AUTH_CONF_FILE		AUTOFS_MAP_DIR "/autofs_ldap_auth.conf"
 
@@ -61,6 +62,7 @@ struct ldap_schema *defaults_get_default_schema(void);
 struct ldap_schema *defaults_get_schema(void);
 struct ldap_searchdn *defaults_get_searchdns(void);
 void defaults_free_searchdns(struct ldap_searchdn *);
+unsigned int defaults_get_mount_nfs_default_proto(void);
 unsigned int defaults_get_append_options(void);
 unsigned int defaults_get_umount_wait(void);
 const char *defaults_get_auth_conf_file(void);
diff --git a/lib/defaults.c b/lib/defaults.c
index e507a59..17164bd 100644
--- a/lib/defaults.c
+++ b/lib/defaults.c
@@ -45,6 +45,7 @@
 #define ENV_NAME_ENTRY_ATTR		"ENTRY_ATTRIBUTE"
 #define ENV_NAME_VALUE_ATTR		"VALUE_ATTRIBUTE"
 
+#define ENV_MOUNT_NFS_DEFAULT_PROTOCOL	"MOUNT_NFS_DEFAULT_PROTOCOL"
 #define ENV_APPEND_OPTIONS		"APPEND_OPTIONS"
 #define ENV_UMOUNT_WAIT			"UMOUNT_WAIT"
 #define ENV_AUTH_CONF_FILE		"AUTH_CONF_FILE"
@@ -326,7 +327,8 @@ unsigned int defaults_read_config(unsigned int to_syslog)
 		    check_set_config_value(key, ENV_APPEND_OPTIONS, value, to_syslog) ||
 		    check_set_config_value(key, ENV_UMOUNT_WAIT, value, to_syslog) ||
 		    check_set_config_value(key, ENV_AUTH_CONF_FILE, value, to_syslog) ||
-		    check_set_config_value(key, ENV_MAP_HASH_TABLE_SIZE, value, to_syslog))
+		    check_set_config_value(key, ENV_MAP_HASH_TABLE_SIZE, value, to_syslog) ||
+		    check_set_config_value(key, ENV_MOUNT_NFS_DEFAULT_PROTOCOL, value, to_syslog))
 			;
 	}
 
@@ -643,6 +645,17 @@ struct ldap_schema *defaults_get_schema(void)
 	return schema;
 }
 
+unsigned int defaults_get_mount_nfs_default_proto(void)
+{
+	long proto;
+
+	proto = get_env_number(ENV_MOUNT_NFS_DEFAULT_PROTOCOL);
+	if (proto < 2 || proto > 4)
+		proto = DEFAULT_NFS_MOUNT_PROTOCOL;
+
+	return (unsigned int) proto;
+}
+
 unsigned int defaults_get_append_options(void)
 {
 	int res;
diff --git a/man/auto.master.5.in b/man/auto.master.5.in
index 9cc5f02..aaa6324 100644
--- a/man/auto.master.5.in
+++ b/man/auto.master.5.in
@@ -183,6 +183,12 @@ but it is the best we can do.
 .B BROWSE_MODE
 Maps are browsable by default (program default "yes").
 .TP
+.B MOUNT_NFS_DEFAULT_PROTOCOL
+Specify the default protocol used by mount.nfs(8) (program default 3). Since
+we can't identify this default automatically we need to set it in the autofs
+configuration. This option will only make a difference for replicated map
+entries as availability probing isn't used for single host map entries.
+.TP
 .B APPEND_OPTIONS
 Determine whether global options, given on the command line or per mount
 in the master map, are appended to map entry options or if the map entry
diff --git a/modules/mount_nfs.c b/modules/mount_nfs.c
index 4f3f514..14d3850 100644
--- a/modules/mount_nfs.c
+++ b/modules/mount_nfs.c
@@ -61,7 +61,7 @@ int mount_mount(struct autofs_point *ap, const char *root, const char *name, int
 	char fullpath[PATH_MAX];
 	char buf[MAX_ERR_BUF];
 	struct host *this, *hosts = NULL;
-	unsigned int vers;
+	unsigned int mount_default_proto, vers;
 	char *nfsoptions = NULL;
 	unsigned int random_selection = ap->flags & MOUNT_FLAG_RANDOM_SELECT;
 	int len, status, err, existed = 1;
@@ -130,10 +130,12 @@ int mount_mount(struct autofs_point *ap, const char *root, const char *name, int
 		      nfsoptions, nosymlink, ro);
 	}
 
+	mount_default_proto = defaults_get_mount_nfs_default_proto();
+	vers = NFS_VERS_MASK | NFS_PROTO_MASK;
 	if (strcmp(fstype, "nfs4") == 0)
 		vers = NFS4_VERS_MASK | TCP_SUPPORTED;
-	else
-		vers = NFS_VERS_MASK | NFS_PROTO_MASK;
+	else if (mount_default_proto == 4)
+		vers = vers | NFS4_VERS_MASK;
 
 	if (!parse_location(ap->logopt, &hosts, what)) {
 		info(ap->logopt, MODPREFIX "no hosts available");
diff --git a/redhat/autofs.sysconfig.in b/redhat/autofs.sysconfig.in
index fe36f45..04e521c 100644
--- a/redhat/autofs.sysconfig.in
+++ b/redhat/autofs.sysconfig.in
@@ -22,6 +22,16 @@ TIMEOUT=300
 #
 BROWSE_MODE="no"
 #
+# MOUNT_NFS_DEFAULT_PROTOCOL - specify the default protocol used by
+# 			       mount.nfs(8). Since we can't identify
+# 			       the default automatically we need to
+# 			       set it in our configuration. This will
+# 			       only make a difference for replicated
+# 			       map entries as availability probing isn't
+# 			       used for single host map entries.
+#
+#MOUNT_NFS_DEFAULT_PROTOCOL=3
+#
 # APPEND_OPTIONS - append to global options instead of replace.
 #
 #APPEND_OPTIONS="yes"
diff --git a/samples/autofs.conf.default.in b/samples/autofs.conf.default.in
index 4496738..52d18ec 100644
--- a/samples/autofs.conf.default.in
+++ b/samples/autofs.conf.default.in
@@ -22,6 +22,16 @@ TIMEOUT=300
 #
 BROWSE_MODE="no"
 #
+# MOUNT_NFS_DEFAULT_PROTOCOL - specify the default protocol used by
+# 			       mount.nfs(8). Since we can't identify
+# 			       the default automatically we need to
+# 			       set it in our configuration. This will
+# 			       only make a difference for replicated
+# 			       map entries as availability probing isn't
+# 			       used for single host map entries.
+#
+#MOUNT_NFS_DEFAULT_PROTOCOL=3
+#
 # APPEND_OPTIONS - append to global options instead of replace.
 #
 #APPEND_OPTIONS="yes"

autofs-5.0.4-configure-libtirpc-fix.patch:

View full diff with command:
/usr/bin/cvs -f diff  -kk -u -N -r 1.1 -r 1.2 autofs-5.0.4-configure-libtirpc-fix.patch
Index: autofs-5.0.4-configure-libtirpc-fix.patch
===================================================================
RCS file: autofs-5.0.4-configure-libtirpc-fix.patch
diff -N autofs-5.0.4-configure-libtirpc-fix.patch
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ autofs-5.0.4-configure-libtirpc-fix.patch	24 Feb 2009 04:16:36 -0000	1.2
@@ -0,0 +1,5421 @@
+autofs-5.0.4 - configure libtirpc fix
+
+From: Ian Kent <raven at themaw.net>
+
+Cleanup configure defines for libtirpc.
+Add WITH_LIBTIRPC to the -V status report.
+Add a check for libtirpc.so.1 for the libtirpc workaround in case libtirpc.so
+is not present.
+---
+
+ CHANGELOG           |    3 
+ aclocal.m4          |    3 
+ configure           | 2769 ++++++++++++++++++++++++++++-----------------------
+ daemon/automount.c  |   12 
+ include/config.h.in |    5 
+ 5 files changed, 1539 insertions(+), 1253 deletions(-)
+
+
+diff --git a/CHANGELOG b/CHANGELOG
+index b8ad22e..ad74b7d 100644
+--- a/CHANGELOG
++++ b/CHANGELOG
+@@ -22,6 +22,9 @@
+ - update to provide ipv6 address parsing.
+ - easy alloca replacements fix.
+ - add check for alternate libxml2 library for libxml2 tsd workaround.
++- add check for alternate libtirpc library for libtirpc tsd workaround.
++- cleanup configure defines for libtirpc.
++- add WITH_LIBTIRPC to -V status report.
+ 
+ 4/11/2008 autofs-5.0.4
+ -----------------------
+diff --git a/aclocal.m4 b/aclocal.m4
+index 5777fcd..e7f1a30 100644
+--- a/aclocal.m4
++++ b/aclocal.m4
+@@ -364,7 +364,8 @@ AC_TRY_LINK(
+     [ AC_MSG_RESULT(no) ])
+ 
+ if test "$af_have_libtirpc" = "yes"; then
+-    AC_DEFINE(TIRPC_WORKAROUND,1, [Use libtirpc tsd usage workaround])
++    AC_DEFINE(WITH_LIBTIRPC,1, [Define to 1 if you have the libtirpc library installed])
++    AC_DEFINE(TIRPC_WORKAROUND,1, [Define to 1 to use the libtirpc tsd usage workaround])
+     TIRPCLIB="-ltirpc"
+ fi
+ 
+diff --git a/configure b/configure
+index 8a6d944..995a472 100755
+--- a/configure
++++ b/configure
+@@ -1,9 +1,9 @@
+ #! /bin/sh
+ # Guess values for system-dependent variables and create Makefiles.
+-# Generated by GNU Autoconf 2.61.
++# Generated by GNU Autoconf 2.63.
+ #
+ # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
+-# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
++# 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+ # This configure script is free software; the Free Software Foundation
+ # gives unlimited permission to copy, distribute and modify it.
+ ## --------------------- ##
+@@ -15,7 +15,7 @@ DUALCASE=1; export DUALCASE # for MKS sh
+ if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+   emulate sh
+   NULLCMD=:
+-  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
++  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+   # is contrary to our usage.  Disable this feature.
+   alias -g '${1+"$@"}'='"$@"'
+   setopt NO_GLOB_SUBST
+@@ -37,17 +37,45 @@ as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+ as_cr_digits='0123456789'
+ as_cr_alnum=$as_cr_Letters$as_cr_digits
+ 
+-# The user is always right.
+-if test "${PATH_SEPARATOR+set}" != set; then
+-  echo "#! /bin/sh" >conf$$.sh
+-  echo  "exit 0"   >>conf$$.sh
+-  chmod +x conf$$.sh
+-  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+-    PATH_SEPARATOR=';'
++as_nl='
++'
++export as_nl
++# Printing a long string crashes Solaris 7 /usr/bin/printf.
++as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
++as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
++as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
++if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
++  as_echo='printf %s\n'
++  as_echo_n='printf %s'
++else
++  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
++    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
++    as_echo_n='/usr/ucb/echo -n'
+   else
+-    PATH_SEPARATOR=:
++    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
++    as_echo_n_body='eval
++      arg=$1;
++      case $arg in
++      *"$as_nl"*)
++	expr "X$arg" : "X\\(.*\\)$as_nl";
++	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
++      esac;
++      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
++    '
++    export as_echo_n_body
++    as_echo_n='sh -c $as_echo_n_body as_echo'
+   fi
+-  rm -f conf$$.sh
++  export as_echo_body
++  as_echo='sh -c $as_echo_body as_echo'
++fi
++
++# The user is always right.
++if test "${PATH_SEPARATOR+set}" != set; then
++  PATH_SEPARATOR=:
++  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
++    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
++      PATH_SEPARATOR=';'
++  }
+ fi
+ 
+ # Support unset when possible.
+@@ -63,8 +91,6 @@ fi
+ # there to prevent editors from complaining about space-tab.
+ # (If _AS_PATH_WALK were called with IFS unset, it would disable word
+ # splitting by setting IFS to empty value.)
+-as_nl='
+-'
+ IFS=" ""	$as_nl"
+ 
+ # Find who we are.  Look in the path if we contain no directory separator.
+@@ -87,7 +113,7 @@ if test "x$as_myself" = x; then
+   as_myself=$0
+ fi
+ if test ! -f "$as_myself"; then
+-  echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
++  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+   { (exit 1); exit 1; }
+ fi
+ 
+@@ -100,17 +126,10 @@ PS2='> '
+ PS4='+ '
+ 
+ # NLS nuisances.
+-for as_var in \
+-  LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
+-  LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
+-  LC_TELEPHONE LC_TIME
+-do
+-  if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
+-    eval $as_var=C; export $as_var
+-  else
+-    ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+-  fi
+-done
++LC_ALL=C
++export LC_ALL
++LANGUAGE=C
++export LANGUAGE
+ 
+ # Required to use basename.
+ if expr a : '\(a\)' >/dev/null 2>&1 &&
+@@ -132,7 +151,7 @@ as_me=`$as_basename -- "$0" ||
+ $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ 	 X"$0" : 'X\(//\)$' \| \
+ 	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+-echo X/"$0" |
++$as_echo X/"$0" |
+     sed '/^.*\/\([^/][^/]*\)\/*$/{
+ 	    s//\1/
+ 	    q
+@@ -158,7 +177,7 @@ else
+   as_have_required=no
+ fi
+ 
+-  if test $as_have_required = yes && 	 (eval ":
++  if test $as_have_required = yes &&	 (eval ":
+ (as_func_return () {
+   (exit \$1)
+ }
+@@ -240,7 +259,7 @@ IFS=$as_save_IFS
+ if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+   emulate sh
+   NULLCMD=:
+-  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
++  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+   # is contrary to our usage.  Disable this feature.
+   alias -g '${1+"$@"}'='"$@"'
+   setopt NO_GLOB_SUBST
[...5028 lines suppressed...]
++  esac \
++  || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
++$as_echo "$as_me: error: could not create $ac_file" >&2;}
++   { (exit 1); exit 1; }; }
+  ;;
+   :H)
+   #
+   # CONFIG_HEADER
+   #
+-_ACEOF
+-
+-# Transform confdefs.h into a sed script `conftest.defines', that
+-# substitutes the proper values into config.h.in to produce config.h.
+-rm -f conftest.defines conftest.tail
+-# First, append a space to every undef/define line, to ease matching.
+-echo 's/$/ /' >conftest.defines
+-# Then, protect against being on the right side of a sed subst, or in
+-# an unquoted here document, in config.status.  If some macros were
+-# called several times there might be several #defines for the same
+-# symbol, which is useless.  But do not sort them, since the last
+-# AC_DEFINE must be honored.
+-ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
+-# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
+-# NAME is the cpp macro being defined, VALUE is the value it is being given.
+-# PARAMS is the parameter list in the macro definition--in most cases, it's
+-# just an empty string.
+-ac_dA='s,^\\([	 #]*\\)[^	 ]*\\([	 ]*'
+-ac_dB='\\)[	 (].*,\\1define\\2'
+-ac_dC=' '
+-ac_dD=' ,'
+-
+-uniq confdefs.h |
+-  sed -n '
+-	t rset
+-	:rset
+-	s/^[	 ]*#[	 ]*define[	 ][	 ]*//
+-	t ok
+-	d
+-	:ok
+-	s/[\\&,]/\\&/g
+-	s/^\('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
+-	s/^\('"$ac_word_re"'\)[	 ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
+-  ' >>conftest.defines
+-
+-# Remove the space that was appended to ease matching.
+-# Then replace #undef with comments.  This is necessary, for
+-# example, in the case of _POSIX_SOURCE, which is predefined and required
+-# on some systems where configure will not decide to define it.
+-# (The regexp can be short, since the line contains either #define or #undef.)
+-echo 's/ $//
+-s,^[	 #]*u.*,/* & */,' >>conftest.defines
+-
+-# Break up conftest.defines:
+-ac_max_sed_lines=50
+-
+-# First sed command is:	 sed -f defines.sed $ac_file_inputs >"$tmp/out1"
+-# Second one is:	 sed -f defines.sed "$tmp/out1" >"$tmp/out2"
+-# Third one will be:	 sed -f defines.sed "$tmp/out2" >"$tmp/out1"
+-# et cetera.
+-ac_in='$ac_file_inputs'
+-ac_out='"$tmp/out1"'
+-ac_nxt='"$tmp/out2"'
+-
+-while :
+-do
+-  # Write a here document:
+-    cat >>$CONFIG_STATUS <<_ACEOF
+-    # First, check the format of the line:
+-    cat >"\$tmp/defines.sed" <<\\CEOF
+-/^[	 ]*#[	 ]*undef[	 ][	 ]*$ac_word_re[	 ]*\$/b def
+-/^[	 ]*#[	 ]*define[	 ][	 ]*$ac_word_re[(	 ]/b def
+-b
+-:def
+-_ACEOF
+-  sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
+-  echo 'CEOF
+-    sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
+-  ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
+-  sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
+-  grep . conftest.tail >/dev/null || break
+-  rm -f conftest.defines
+-  mv conftest.tail conftest.defines
+-done
+-rm -f conftest.defines conftest.tail
+-
+-echo "ac_result=$ac_in" >>$CONFIG_STATUS
+-cat >>$CONFIG_STATUS <<\_ACEOF
+   if test x"$ac_file" != x-; then
+-    echo "/* $configure_input  */" >"$tmp/config.h"
+-    cat "$ac_result" >>"$tmp/config.h"
+-    if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
+-      { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
+-echo "$as_me: $ac_file is unchanged" >&6;}
++    {
++      $as_echo "/* $configure_input  */" \
++      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
++    } >"$tmp/config.h" \
++      || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
++$as_echo "$as_me: error: could not create $ac_file" >&2;}
++   { (exit 1); exit 1; }; }
++    if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
++      { $as_echo "$as_me:$LINENO: $ac_file is unchanged" >&5
++$as_echo "$as_me: $ac_file is unchanged" >&6;}
+     else
+-      rm -f $ac_file
+-      mv "$tmp/config.h" $ac_file
++      rm -f "$ac_file"
++      mv "$tmp/config.h" "$ac_file" \
++	|| { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
++$as_echo "$as_me: error: could not create $ac_file" >&2;}
++   { (exit 1); exit 1; }; }
+     fi
+   else
+-    echo "/* $configure_input  */"
+-    cat "$ac_result"
++    $as_echo "/* $configure_input  */" \
++      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
++      || { { $as_echo "$as_me:$LINENO: error: could not create -" >&5
++$as_echo "$as_me: error: could not create -" >&2;}
++   { (exit 1); exit 1; }; }
+   fi
+-  rm -f "$tmp/out12"
+  ;;
+ 
+ 
+@@ -6900,6 +7158,11 @@ _ACEOF
+ chmod +x $CONFIG_STATUS
+ ac_clean_files=$ac_clean_files_save
+ 
++test $ac_write_fail = 0 ||
++  { { $as_echo "$as_me:$LINENO: error: write failure creating $CONFIG_STATUS" >&5
++$as_echo "$as_me: error: write failure creating $CONFIG_STATUS" >&2;}
++   { (exit 1); exit 1; }; }
++
+ 
+ # configure is writing to config.log, and then calls config.status.
+ # config.status does its own redirection, appending to config.log.
+@@ -6921,6 +7184,10 @@ if test "$no_create" != yes; then
+   # would make configure fail if this is the last instruction.
+   $ac_cs_success || { (exit 1); exit 1; }
+ fi
++if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
++  { $as_echo "$as_me:$LINENO: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
++$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
++fi
+ 
+ 
+ #
+diff --git a/daemon/automount.c b/daemon/automount.c
+index a664277..776c92c 100644
+--- a/daemon/automount.c
++++ b/daemon/automount.c
+@@ -1730,6 +1730,16 @@ static void show_build_info(void)
+ #ifdef LIBXML2_WORKAROUND
+ 	printf("LIBXML2_WORKAROUND ");
+ 	count = count + 19;
++
++	if (count > 60) {
++		printf("\n  ");
++		count = 0;
++	}
++#endif
++
++#ifdef WITH_LIBTIRPC
++	printf("WITH_LIBTIRPC ");
++	count = count + 14;
+ #endif
+ 
+ 	printf("\n\n");
+@@ -2063,6 +2073,8 @@ int main(int argc, char *argv[])
+ #endif
+ #ifdef TIRPC_WORKAROUND
+ 	void *dh_tirpc = dlopen("libitirpc.so", RTLD_NOW);
++	if (!dh_tirpc)
++		dh_tirpc = dlopen("libitirpc.so.1", RTLD_NOW);
+ #endif
+ 
+ 	if (!master_read_master(master_list, age, 0)) {
+diff --git a/include/config.h.in b/include/config.h.in
+index 31b0d75..39cfa4b 100644
+--- a/include/config.h.in
++++ b/include/config.h.in
+@@ -117,7 +117,7 @@
+ /* Define to 1 if you have the ANSI C header files. */
+ #undef STDC_HEADERS
+ 
+-/* Use libtirpc tsd usage workaround */
++/* Define to 1 to use the libtirpc tsd usage workaround */
+ #undef TIRPC_WORKAROUND
+ 
+ /* Define if using the dmalloc debugging malloc package */
+@@ -129,5 +129,8 @@
+ /* Define if using LDAP as a source of automount maps */
+ #undef WITH_LDAP
+ 
++/* Define to 1 if you have the libtirpc library installed */
++#undef WITH_LIBTIRPC
++
+ /* Define if using SASL authentication with the LDAP module */
+ #undef WITH_SASL

autofs-5.0.4-easy-alloca-replacements-fix.patch:

Index: autofs-5.0.4-easy-alloca-replacements-fix.patch
===================================================================
RCS file: autofs-5.0.4-easy-alloca-replacements-fix.patch
diff -N autofs-5.0.4-easy-alloca-replacements-fix.patch
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ autofs-5.0.4-easy-alloca-replacements-fix.patch	24 Feb 2009 04:16:36 -0000	1.2
@@ -0,0 +1,190 @@
+autofs-5.0.4 - easy alloca replacements fix
+
+From: Ian Kent <raven at themaw.net>
+
+Fix array out of bounds accesses and remove alloca(3) calls from
+modules/mount_autofs.c and modules/mount_nfs.c as well.
+---
+
+ CHANGELOG               |    1 +
+ modules/lookup_ldap.c   |    3 ---
+ modules/mount_autofs.c  |    9 ++-------
+ modules/mount_bind.c    |    6 +++++-
+ modules/mount_changer.c |    6 +++++-
+ modules/mount_ext2.c    |    6 +++++-
+ modules/mount_generic.c |    6 +++++-
+ modules/mount_nfs.c     |   12 +++++++-----
+ 8 files changed, 30 insertions(+), 19 deletions(-)
+
+
+--- autofs-5.0.4.orig/CHANGELOG
++++ autofs-5.0.4/CHANGELOG
+@@ -20,6 +20,7 @@
+ - update to configure libtirpc if present.
+ - update to provide ipv6 name and address support.
+ - update to provide ipv6 address parsing.
++- easy alloca replacements fix.
+ 
+ 4/11/2008 autofs-5.0.4
+ -----------------------
+--- autofs-5.0.4.orig/modules/lookup_ldap.c
++++ autofs-5.0.4/modules/lookup_ldap.c
+@@ -1474,7 +1474,6 @@ int lookup_read_master(struct master *ma
+ 		free(query);
+ 		return NSS_STATUS_UNAVAIL;
+ 	}
+-	query[l] = '\0';
+ 
+ 	/* Initialize the LDAP context. */
+ 	ldap = do_reconnect(logopt, ctxt);
+@@ -2213,7 +2212,6 @@ static int read_one_map(struct autofs_po
+ 		free(sp.query);
+ 		return NSS_STATUS_UNAVAIL;
+ 	}
+-	sp.query[l] = '\0';
+ 
+ 	/* Initialize the LDAP context. */
+ 	sp.ldap = do_reconnect(ap->logopt, ctxt);
+@@ -2404,7 +2402,6 @@ static int lookup_one(struct autofs_poin
+ 		free(query);
+ 		return CHE_FAIL;
+ 	}
+-	query[ql] = '\0';
+ 
+ 	/* Initialize the LDAP context. */
+ 	ldap = do_reconnect(ap->logopt, ctxt);
+--- autofs-5.0.4.orig/modules/mount_autofs.c
++++ autofs-5.0.4/modules/mount_autofs.c
+@@ -45,7 +45,8 @@ int mount_mount(struct autofs_point *ap,
+ {
+ 	struct startup_cond suc;
+ 	pthread_t thid;
+-	char *realpath, *mountpoint;
++	char realpath[PATH_MAX];
++	char mountpoint[PATH_MAX];
+ 	const char **argv;
+ 	int argc, status, ghost = ap->flags & MOUNT_FLAG_GHOST;
+ 	time_t timeout = ap->exp_timeout;
+@@ -62,8 +63,6 @@ int mount_mount(struct autofs_point *ap,
+ 	/* Root offset of multi-mount */
+ 	len = strlen(root);
+ 	if (root[len - 1] == '/') {
+-		realpath = alloca(strlen(ap->path) + name_len + 2);
+-		mountpoint = alloca(len + 1);
+ 		strcpy(realpath, ap->path);
+ 		strcat(realpath, "/");
+ 		strcat(realpath, name);
+@@ -71,8 +70,6 @@ int mount_mount(struct autofs_point *ap,
+ 		strncpy(mountpoint, root, len);
+ 		mountpoint[len] = '\0';
+ 	} else if (*name == '/') {
+-		realpath = alloca(name_len + 1);
+-		mountpoint = alloca(len + 1);
+ 		if (ap->flags & MOUNT_FLAG_REMOUNT) {
+ 			strcpy(mountpoint, name);
+ 			strcpy(realpath, name);
+@@ -81,8 +78,6 @@ int mount_mount(struct autofs_point *ap,
+ 			strcpy(realpath, name);
+ 		}
+ 	} else {
+-		realpath = alloca(len + name_len + 2);
+-		mountpoint = alloca(len + name_len + 2);
+ 		strcpy(mountpoint, root);
+ 		strcat(mountpoint, "/");
+ 		strcpy(realpath, mountpoint);
+--- autofs-5.0.4.orig/modules/mount_bind.c
++++ autofs-5.0.4/modules/mount_bind.c
+@@ -81,8 +81,12 @@ int mount_mount(struct autofs_point *ap,
+ 	len = strlen(root);
+ 	if (root[len - 1] == '/') {
+ 		len = snprintf(fullpath, len, "%s", root);
+-	/* Direct mount name is absolute path so don't use root */
+ 	} else if (*name == '/') {
++		/*
++		 * Direct or offset mount, name is absolute path so
++		 * don't use root (but with move mount changes root
++		 * is now the same as name).
++		 */
+ 		len = sprintf(fullpath, "%s", root);
+ 	} else {
+ 		len = sprintf(fullpath, "%s/%s", root, name);
+--- autofs-5.0.4.orig/modules/mount_changer.c
++++ autofs-5.0.4/modules/mount_changer.c
+@@ -58,8 +58,12 @@ int mount_mount(struct autofs_point *ap,
+ 	len = strlen(root);
+ 	if (root[len - 1] == '/') {
+ 		len = snprintf(fullpath, len, "%s", root);
+-	/* Direct mount name is absolute path so don't use root */
+ 	} else if (*name == '/') {
++		/*
++		 * Direct or offset mount, name is absolute path so
++		 * don't use root (but with move mount changes root
++		 * is now the same as name).
++		 */
+ 		len = sprintf(fullpath, "%s", root);
+ 	} else {
+ 		len = sprintf(fullpath, "%s/%s", root, name);
+--- autofs-5.0.4.orig/modules/mount_ext2.c
++++ autofs-5.0.4/modules/mount_ext2.c
+@@ -50,8 +50,12 @@ int mount_mount(struct autofs_point *ap,
+ 	len = strlen(root);
+ 	if (root[len - 1] == '/') {
+ 		len = snprintf(fullpath, len, "%s", root);
+-	/* Direct mount name is absolute path so don't use root */
+ 	} else if (*name == '/') {
++		/*
++		 * Direct or offset mount, name is absolute path so
++		 * don't use root (but with move mount changes root
++		 * is now the same as name).
++		 */
+ 		len = sprintf(fullpath, "%s", root);
+ 	} else {
+ 		len = sprintf(fullpath, "%s/%s", root, name);
+--- autofs-5.0.4.orig/modules/mount_generic.c
++++ autofs-5.0.4/modules/mount_generic.c
+@@ -49,8 +49,12 @@ int mount_mount(struct autofs_point *ap,
+ 	len = strlen(root);
+ 	if (root[len - 1] == '/') {
+ 		len = snprintf(fullpath, len, "%s", root);
+-	/* Direct mount name is absolute path so don't use root */
+ 	} else if (*name == '/') {
++		/*
++		 * Direct or offset mount, name is absolute path so
++		 * don't use root (but with move mount changes root
++		 * is now the same as name).
++		 */
+ 		len = sprintf(fullpath, "%s", root);
+ 	} else {
+ 		len = sprintf(fullpath, "%s/%s", root, name);
+--- autofs-5.0.4.orig/modules/mount_nfs.c
++++ autofs-5.0.4/modules/mount_nfs.c
+@@ -58,7 +58,8 @@ int mount_mount(struct autofs_point *ap,
+ 		const char *what, const char *fstype, const char *options,
+ 		void *context)
+ {
+-	char *fullpath, buf[MAX_ERR_BUF];
++	char fullpath[PATH_MAX];
++	char buf[MAX_ERR_BUF];
+ 	struct host *this, *hosts = NULL;
+ 	unsigned int vers;
+ 	char *nfsoptions = NULL;
+@@ -150,14 +151,15 @@ int mount_mount(struct autofs_point *ap,
+ 	/* Root offset of multi-mount */
+ 	len = strlen(root);
+ 	if (root[len - 1] == '/') {
+-		fullpath = alloca(len);
+ 		len = snprintf(fullpath, len, "%s", root);
+-	/* Direct mount name is absolute path so don't use root */
+ 	} else if (*name == '/') {
+-		fullpath = alloca(len + 1);
++		/*
++		 * Direct or offset mount, name is absolute path so
++		 * don't use root (but with move mount changes root
++		 * is now the same as name).
++		 */
+ 		len = sprintf(fullpath, "%s", root);
+ 	} else {
+-		fullpath = alloca(len + name_len + 2);
+ 		len = sprintf(fullpath, "%s/%s", root, name);
+ 	}
+ 	fullpath[len] = '\0';

autofs-5.0.4-libxml2-workaround-fix.patch:

Index: autofs-5.0.4-libxml2-workaround-fix.patch
===================================================================
RCS file: autofs-5.0.4-libxml2-workaround-fix.patch
diff -N autofs-5.0.4-libxml2-workaround-fix.patch
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ autofs-5.0.4-libxml2-workaround-fix.patch	24 Feb 2009 04:16:36 -0000	1.2
@@ -0,0 +1,38 @@
+autofs-5.0.4 - libxml2 workaround fix
+
+From: Ian Kent <raven at themaw.net>
+
+Add a check for libxml2.so.2 for the libxml2 workaround in case libxml2.so
+is not present.
+---
+
+ CHANGELOG          |    1 +
+ daemon/automount.c |    2 ++
+ 2 files changed, 3 insertions(+), 0 deletions(-)
+
+
+diff --git a/CHANGELOG b/CHANGELOG
+index 1cb56fe..b8ad22e 100644
+--- a/CHANGELOG
++++ b/CHANGELOG
+@@ -21,6 +21,7 @@
+ - update to provide ipv6 name and address support.
+ - update to provide ipv6 address parsing.
+ - easy alloca replacements fix.
++- add check for alternate libxml2 library for libxml2 tsd workaround.
+ 
+ 4/11/2008 autofs-5.0.4
+ -----------------------
+diff --git a/daemon/automount.c b/daemon/automount.c
+index 1ec686b..a664277 100644
+--- a/daemon/automount.c
++++ b/daemon/automount.c
+@@ -2058,6 +2058,8 @@ int main(int argc, char *argv[])
+ 
+ #ifdef LIBXML2_WORKAROUND
+ 	void *dh_xml2 = dlopen("libxml2.so", RTLD_NOW);
++	if (!dh_xml2)
++		dh_xml2 = dlopen("libxml2.so.2", RTLD_NOW);
+ #endif
+ #ifdef TIRPC_WORKAROUND
+ 	void *dh_tirpc = dlopen("libitirpc.so", RTLD_NOW);


Index: autofs.spec
===================================================================
RCS file: /cvs/pkgs/rpms/autofs/devel/autofs.spec,v
retrieving revision 1.268
retrieving revision 1.269
diff -u -r1.268 -r1.269
--- autofs.spec	24 Feb 2009 03:22:16 -0000	1.268
+++ autofs.spec	24 Feb 2009 04:16:36 -0000	1.269
@@ -4,7 +4,7 @@
 Summary: A tool for automatically mounting and unmounting filesystems
 Name: autofs
 Version: 5.0.4
-Release: 11
+Release: 15
 Epoch: 1
 License: GPLv2+
 Group: System Environment/Daemons
@@ -32,8 +32,12 @@
 Patch20: autofs-5.0.4-ipv6-name-and-address-support.patch
 Patch21: autofs-5.0.4-ipv6-parse.patch
 Patch22: autofs-5.0.4-use-CLOEXEC-flag-setmntent-include-fix.patch
+Patch23: autofs-5.0.4-easy-alloca-replacements-fix.patch
+Patch24: autofs-5.0.4-libxml2-workaround-fix.patch
+Patch25: autofs-5.0.4-configure-libtirpc-fix.patch
+Patch26: autofs-5.0.4-add-nfs-mount-proto-default-conf-option.patch
 Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-BuildRequires: autoconf, hesiod-devel, openldap-devel, bison, flex, libxml2-devel, cyrus-sasl-devel, openssl-devel module-init-tools util-linux nfs-utils e2fsprogs
+BuildRequires: autoconf, hesiod-devel, openldap-devel, bison, flex, libxml2-devel, cyrus-sasl-devel, openssl-devel module-init-tools util-linux nfs-utils e2fsprogs libtirpc-devel
 Requires: kernel >= 2.6.17
 Requires: bash mktemp sed gawk textutils sh-utils grep module-init-tools /bin/ps
 Requires(post): /sbin/chkconfig
@@ -95,6 +99,10 @@
 %patch20 -p1
 %patch21 -p1
 %patch22 -p1
+%patch23 -p1
+%patch24 -p1
+%patch25 -p1
+%patch26 -p1
 
 %build
 #CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=/usr --libdir=%{_libdir}
@@ -147,6 +155,16 @@
 %{_libdir}/autofs/
 
 %changelog
+* Tue Feb 24 2009 Ian Kent <ikent at redhat.com> - 1:5.0.4-15
+- fix array out of bounds accesses and cleanup couple of other alloca() calls.
+- Undo mistake in copy order for submount path introduced by rev 11 patch.
+- add check for alternate libxml2 library for libxml2 tsd workaround.
+- add check for alternate libtirpc library for libtirpc tsd workaround.
+- cleanup configure defines for libtirpc.
+- add WITH_LIBTIRPC to -V status report.
+- add libtirpc-devel to BuildRequires.
+- add nfs mount protocol default configuration option.
+
 * Mon Feb 23 2009 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1:5.0.4-11
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
 




More information about the scm-commits mailing list