Sophie

Sophie

distrib > Scientific%20Linux > 5x > x86_64 > by-pkgid > 130701790bf2d95e902edf16031ff596 > files > 40

autofs-5.0.1-0.rc2.164.el5_8.src.rpm

diff -Nurp autofs-5.0.1.orig/gentoo/net-fs/autofs/files/autofs.conf autofs-5.0.1/gentoo/net-fs/autofs/files/autofs.conf
--- autofs-5.0.1.orig/gentoo/net-fs/autofs/files/autofs.conf	2006-09-01 13:29:50.000000000 +0800
+++ autofs-5.0.1/gentoo/net-fs/autofs/files/autofs.conf	2007-10-18 19:06:45.000000000 +0800
@@ -1,50 +1,50 @@
 #
 # Define default options for autofs.
 #
-# DEFAULT_MASTER_MAP_NAME - default map name for the master map.
+# MASTER_MAP_NAME - default map name for the master map.
 #
-#DEFAULT_MASTER_MAP_NAME="/etc/auto.master"
+#MASTER_MAP_NAME="/etc/auto.master"
 #
-# DEFAULT_TIMEOUT - set the default mount timeout (default 600).
+# TIMEOUT - set the default mount timeout (default 600).
 #
-DEFAULT_TIMEOUT=300
+TIMEOUT=300
 #
-# DEFAULT_BROWSE_MODE - maps are browsable by default.
+# BROWSE_MODE - maps are browsable by default.
 #
-DEFAULT_BROWSE_MODE="no"
+BROWSE_MODE="no"
 #
-# DEFAULT_LOGGING - set default log level "none", "verbode" or "debug"
+# LOGGING - set default log level "none", "verbode" or "debug"
 #
-#DEFAULT_LOGGING="none"
+#LOGGING="none"
 #
 # Define the default LDAP schema to use for lookups
 #
 # System default
 #
-#DEFAULT_MAP_OBJECT_CLASS="nisMap"
-#DEFAULT_ENTRY_OBJECT_CLASS="nisObject"
-#DEFAULT_MAP_ATTRIBUTE="nisMapName"
-#DEFAULT_ENTRY_ATTRIBUTE="cn"
-#DEFAULT_VALUE_ATTRIBUTE="nisMapEntry"
+#MAP_OBJECT_CLASS="nisMap"
+#ENTRY_OBJECT_CLASS="nisObject"
+#MAP_ATTRIBUTE="nisMapName"
+#ENTRY_ATTRIBUTE="cn"
+#VALUE_ATTRIBUTE="nisMapEntry"
 #
 # Other common LDAP nameing
 #
-#DEFAULT_MAP_OBJECT_CLASS="automountMap"
-#DEFAULT_ENTRY_OBJECT_CLASS="automount"
-#DEFAULT_MAP_ATTRIBUTE="ou"
-#DEFAULT_ENTRY_ATTRIBUTE="cn"
-#DEFAULT_VALUE_ATTRIBUTE="automountInformation"
-#
-#DEFAULT_MAP_OBJECT_CLASS="automountMap"
-#DEFAULT_ENTRY_OBJECT_CLASS="automount"
-#DEFAULT_MAP_ATTRIBUTE="automountMapName"
-#DEFAULT_ENTRY_ATTRIBUTE="automountKey"
-#DEFAULT_VALUE_ATTRIBUTE="automountInformation"
+#MAP_OBJECT_CLASS="automountMap"
+#ENTRY_OBJECT_CLASS="automount"
+#MAP_ATTRIBUTE="ou"
+#ENTRY_ATTRIBUTE="cn"
+#VALUE_ATTRIBUTE="automountInformation"
+#
+#MAP_OBJECT_CLASS="automountMap"
+#ENTRY_OBJECT_CLASS="automount"
+#MAP_ATTRIBUTE="automountMapName"
+#ENTRY_ATTRIBUTE="automountKey"
+#VALUE_ATTRIBUTE="automountInformation"
 #
-# DEFAULT_AUTH_CONF_FILE - set the default location for the SASL
-#			   authentication configuration file.
+# AUTH_CONF_FILE - set the default location for the SASL
+#		   authentication configuration file.
 #
-#DEFAULT_AUTH_CONF_FILE="/etc/autofs/autofs-auth.conf"
+#AUTH_CONF_FILE="/etc/autofs/autofs-auth.conf"
 #
 # General global options
 #
--- autofs-5.0.1.orig/lib/defaults.c	2007-10-18 19:05:30.000000000 +0800
+++ autofs-5.0.1/lib/defaults.c	2007-10-18 19:17:55.000000000 +0800
@@ -24,22 +24,22 @@
 #define DEFAULTS_CONFIG_FILE		AUTOFS_CONF_DIR "/autofs"
 #define MAX_LINE_LEN			256
 
-#define ENV_NAME_MASTER_MAP		"DEFAULT_MASTER_MAP_NAME"
+#define ENV_NAME_MASTER_MAP		"MASTER_MAP_NAME"
 
-#define ENV_NAME_TIMEOUT		"DEFAULT_TIMEOUT"
-#define ENV_NAME_BROWSE_MODE		"DEFAULT_BROWSE_MODE"
-#define ENV_NAME_LOGGING		"DEFAULT_LOGGING"
-
-#define ENV_LDAP_SERVER			"DEFAULT_LDAP_SERVER"
-
-#define ENV_NAME_MAP_OBJ_CLASS		"DEFAULT_MAP_OBJECT_CLASS"
-#define ENV_NAME_ENTRY_OBJ_CLASS	"DEFAULT_ENTRY_OBJECT_CLASS"
-#define ENV_NAME_MAP_ATTR		"DEFAULT_MAP_ATTRIBUTE"
-#define ENV_NAME_ENTRY_ATTR		"DEFAULT_ENTRY_ATTRIBUTE"
-#define ENV_NAME_VALUE_ATTR		"DEFAULT_VALUE_ATTRIBUTE"
+#define ENV_NAME_TIMEOUT		"TIMEOUT"
+#define ENV_NAME_BROWSE_MODE		"BROWSE_MODE"
+#define ENV_NAME_LOGGING		"LOGGING"
+
+#define ENV_LDAP_SERVER			"LDAP_SERVER"
+
+#define ENV_NAME_MAP_OBJ_CLASS		"MAP_OBJECT_CLASS"
+#define ENV_NAME_ENTRY_OBJ_CLASS	"ENTRY_OBJECT_CLASS"
+#define ENV_NAME_MAP_ATTR		"MAP_ATTRIBUTE"
+#define ENV_NAME_ENTRY_ATTR		"ENTRY_ATTRIBUTE"
+#define ENV_NAME_VALUE_ATTR		"VALUE_ATTRIBUTE"
 
-#define ENV_APPEND_OPTIONS		"DEFAULT_APPEND_OPTIONS"
-#define ENV_AUTH_CONF_FILE		"DEFAULT_AUTH_CONF_FILE"
+#define ENV_APPEND_OPTIONS		"APPEND_OPTIONS"
+#define ENV_AUTH_CONF_FILE		"AUTH_CONF_FILE"
 
 static const char *default_master_map_name = DEFAULT_MASTER_MAP_NAME;
 static const char *default_ldap_server	   = DEFAULT_LDAP_SERVER;
@@ -98,6 +98,39 @@
 }
 
 /*
+ * We've changed the key names so we need to check for the
+ * config key and it's old name for backward conpatibility.
+*/
+static int check_set_config_value(const char *res, const char *name, const char *value)
+{
+	char *old_name;
+	int ret;
+
+	if (!strcasecmp(res, name)) {
+		ret = setenv(name, value, 0);
+		if (ret)
+			fprintf(stderr,
+			        "can't set config value for %s, "
+				"error %d", name, ret);
+		return 1;
+	}
+
+	old_name = alloca(strlen(name) + 9);
+	strcpy(old_name, "DEFAULT_");
+	strcat(old_name, name);
+
+	if (!strcasecmp(res, old_name)) {
+		ret = setenv(name, value, 0);
+		if (ret)
+			fprintf(stderr,
+			        "can't set config value for %s, "
+				"error %d", name, ret);
+		return 1;
+	}
+	return 0;
+}
+
+/*
  * Read config env variables and check they have been set.
  *
  * This simple minded routine assumes the config file
@@ -109,7 +142,6 @@
 	FILE *f;
 	char buf[MAX_LINE_LEN];
 	char *res, *value;
-	unsigned int ret;
 
 	f = fopen(DEFAULTS_CONFIG_FILE, "r");
 	if (!f)
@@ -152,24 +184,19 @@
 		while (*trailer && (*trailer == '"' || isblank(*trailer)))
 			*(trailer--) = '\0';;
 
-		if (!strcasecmp(res, ENV_NAME_MASTER_MAP) ||
-		    !strcasecmp(res, ENV_NAME_TIMEOUT) ||
-		    !strcasecmp(res, ENV_NAME_BROWSE_MODE) ||
-		    !strcasecmp(res, ENV_NAME_LOGGING) ||
-		    !strcasecmp(res, ENV_LDAP_SERVER) ||
-		    !strcasecmp(res, ENV_NAME_MAP_OBJ_CLASS) ||
-		    !strcasecmp(res, ENV_NAME_ENTRY_OBJ_CLASS) ||
-		    !strcasecmp(res, ENV_NAME_MAP_ATTR) ||
-		    !strcasecmp(res, ENV_NAME_ENTRY_ATTR) ||
-		    !strcasecmp(res, ENV_NAME_VALUE_ATTR) ||
-		    !strcasecmp(res, ENV_APPEND_OPTIONS) ||
-		    !strcasecmp(res, ENV_AUTH_CONF_FILE)) {
-			ret = setenv(res, value, 0);
-			if (ret)
-				fprintf(stderr,
-				        "can't set config value for %s, "
-					"error %d", res, ret);
-		}
+		if (check_set_config_value(res, ENV_NAME_MASTER_MAP, value) ||
+		    check_set_config_value(res, ENV_NAME_TIMEOUT, value) ||
+		    check_set_config_value(res, ENV_NAME_BROWSE_MODE, value) ||
+		    check_set_config_value(res, ENV_NAME_LOGGING, value) ||
+		    check_set_config_value(res, ENV_LDAP_SERVER, value) ||
+		    check_set_config_value(res, ENV_NAME_MAP_OBJ_CLASS, value) ||
+		    check_set_config_value(res, ENV_NAME_ENTRY_OBJ_CLASS, value) ||
+		    check_set_config_value(res, ENV_NAME_MAP_ATTR, value) ||
+		    check_set_config_value(res, ENV_NAME_ENTRY_ATTR, value) ||
+		    check_set_config_value(res, ENV_NAME_VALUE_ATTR, value) ||
+		    check_set_config_value(res, ENV_APPEND_OPTIONS, value) ||
+		    check_set_config_value(res, ENV_AUTH_CONF_FILE, value))
+			;
 	}
 
 	if (!feof(f)) {
diff -Nurp autofs-5.0.1.orig/man/auto.master.5.in autofs-5.0.1/man/auto.master.5.in
--- autofs-5.0.1.orig/man/auto.master.5.in	2007-10-18 19:05:30.000000000 +0800
+++ autofs-5.0.1/man/auto.master.5.in	2007-10-18 19:20:42.000000000 +0800
@@ -25,7 +25,7 @@
 but an alternate name may be given on the command line when running
 the automounter and the default master map may changed by setting the
 .nh
-.B "DEFAULT_MASTER_MAP_NAME"
+.B "MASTER_MAP_NAME"
 .hy
 configuration variable in
 .nh
@@ -162,10 +162,10 @@
 .hy
 They are:
 .TP
-.B DEFAULT_TIMEOUT
+.B TIMEOUT
 sets the default mount timeout (program default 600).
 .TP
-.B DEFAULT_BROWSE_MODE
+.B BROWSE_MODE
 Maps are browsable by default (program default "yes").
 .TP
 .B APPEND_OPTIONS
@@ -173,7 +173,7 @@
 in the master map, are appended to map entry options or if the map entry
 options replace the global options (program default "yes", append options).
 .TP
-.B DEFAULT_LOGGING
+.B LOGGING
 set default log level "none", "verbose" or "debug" (program default "none").
 .SH BUILTIN MAP -hosts
 If "-hosts" is given as the map then accessing a key under the mount point
@@ -231,28 +231,28 @@
 .P
 The configuration settings available are:
 .TP
-.B DEFAULT_MAP_OBJECT_CLASS
+.B MAP_OBJECT_CLASS
 The map object class. In the \fBnisMap\fP schema this corresponds to the class
 \fBnisMap\fP and in the \fBautomountMap\fP schema it corresponds to the class
 \fBautomountMap\fP.
 .TP
-.B DEFAULT_ENTRY_OBJECT_CLASS
+.B ENTRY_OBJECT_CLASS
 The map entry object class. In the \fBnisMap\fP schema this corresponds
 to the class \fBnisObject\fP and in the \fBautomountMap\fP schema it
 corresponds to the class \fBautomount\fP.
 .TP
-.B DEFAULT_MAP_ATTRIBUTE
+.B MAP_ATTRIBUTE
 The attribute used to identify the name of the map to which this
 entry belongs.  In the \fBnisMap\fP schema this corresponds to the attribute
 \fBnisMapName\fP and in the \fBautomountMap\fP schema it corresponds to the
 attribute \fBou\fP or \fBautomountMapName\fP.
 .TP
-.B DEFAULT_ENTRY_ATTRIBUTE
+.B ENTRY_ATTRIBUTE
 The attribute used to identify a map key. In the \fBnisMap\fP schema this
 corresponds to the attribute \fBcn\fP and in the \fBautomountMap\fP schema
 it corresponds to the attribute \fBautomountKey\fP.
 .TP
-.B DEFAULT_VALUE_ATTRIBUTE
+.B VALUE_ATTRIBUTE
 The attribute used to identify the value of the map entry. In the \fBnisMap\fP
 schema this corresponds to the attribute \fBnisMapEntry\fP and in the \fBautomountMap\fP
 schema it corresponds to the attribute \fBautomountInformation\fP.
--- autofs-5.0.1.orig/README.v5.release	2006-09-01 13:29:50.000000000 +0800
+++ autofs-5.0.1/README.v5.release	2007-10-18 19:06:45.000000000 +0800
@@ -13,8 +13,7 @@
   installed "/etc/auto.master" to ensure that those using NIS will
   still find their master map. This is in line with other industry
   automount implementations. The name of the default master map can
-  be overridden by setting the DEFAULT_MASTER_MAP_NAME configuration
-  variable.
+  be overridden by setting the MASTER_MAP_NAME configuration variable.
 
 - The `automount' daemon is now a multi-threaded application and so
   appears as a single process (unless a thread process display option
--- autofs-5.0.1.orig/redhat/autofs.sysconfig.in	2007-10-18 19:05:30.000000000 +0800
+++ autofs-5.0.1/redhat/autofs.sysconfig.in	2007-10-18 19:22:32.000000000 +0800
@@ -1,25 +1,25 @@
 #
 # Define default options for autofs.
 #
-# DEFAULT_MASTER_MAP_NAME - default map name for the master map.
+# MASTER_MAP_NAME - default map name for the master map.
 #
-#DEFAULT_MASTER_MAP_NAME="auto.master"
+#MASTER_MAP_NAME="auto.master"
 #
-# DEFAULT_TIMEOUT - set the default mount timeout (default 600).
+# TIMEOUT - set the default mount timeout (default 600).
 #
-DEFAULT_TIMEOUT=300
+TIMEOUT=300
 #
-# DEFAULT_BROWSE_MODE - maps are browsable by default.
+# BROWSE_MODE - maps are browsable by default.
 #
-DEFAULT_BROWSE_MODE="no"
+BROWSE_MODE="no"
 #
-# DEFAULT_APPEND_OPTIONS - append to global options instead of replace.
+# APPEND_OPTIONS - append to global options instead of replace.
 #
-#DEFAULT_APPEND_OPTIONS="yes"
+#APPEND_OPTIONS="yes"
 #
-# DEFAULT_LOGGING - set default log level "none", "verbose" or "debug"
+# LOGGING - set default log level "none", "verbose" or "debug"
 #
-#DEFAULT_LOGGING="none"
+#LOGGING="none"
 #
 # Define the LDAP schema to used for lookups
 #
@@ -28,30 +28,30 @@
 # basdn for lookups. If you want to minimize the number of
 # queries to the server set the values here.
 #
-#DEFAULT_MAP_OBJECT_CLASS="nisMap"
-#DEFAULT_ENTRY_OBJECT_CLASS="nisObject"
-#DEFAULT_MAP_ATTRIBUTE="nisMapName"
-#DEFAULT_ENTRY_ATTRIBUTE="cn"
-#DEFAULT_VALUE_ATTRIBUTE="nisMapEntry"
+#MAP_OBJECT_CLASS="nisMap"
+#ENTRY_OBJECT_CLASS="nisObject"
+#MAP_ATTRIBUTE="nisMapName"
+#ENTRY_ATTRIBUTE="cn"
+#VALUE_ATTRIBUTE="nisMapEntry"
 #
 # Other common LDAP nameing
 #
-#DEFAULT_MAP_OBJECT_CLASS="automountMap"
-#DEFAULT_ENTRY_OBJECT_CLASS="automount"
-#DEFAULT_MAP_ATTRIBUTE="ou"
-#DEFAULT_ENTRY_ATTRIBUTE="cn"
-#DEFAULT_VALUE_ATTRIBUTE="automountInformation"
-#
-#DEFAULT_MAP_OBJECT_CLASS="automountMap"
-#DEFAULT_ENTRY_OBJECT_CLASS="automount"
-#DEFAULT_MAP_ATTRIBUTE="automountMapName"
-#DEFAULT_ENTRY_ATTRIBUTE="automountKey"
-#DEFAULT_VALUE_ATTRIBUTE="automountInformation"
+#MAP_OBJECT_CLASS="automountMap"
+#ENTRY_OBJECT_CLASS="automount"
+#MAP_ATTRIBUTE="ou"
+#ENTRY_ATTRIBUTE="cn"
+#VALUE_ATTRIBUTE="automountInformation"
+#
+#MAP_OBJECT_CLASS="automountMap"
+#ENTRY_OBJECT_CLASS="automount"
+#MAP_ATTRIBUTE="automountMapName"
+#ENTRY_ATTRIBUTE="automountKey"
+#VALUE_ATTRIBUTE="automountInformation"
 #
-# DEFAULT_AUTH_CONF_FILE - set the default location for the SASL
+# AUTH_CONF_FILE - set the default location for the SASL
 #			   authentication configuration file.
 #
-#DEFAULT_AUTH_CONF_FILE="@@autofsmapdir@@/autofs_ldap_auth.conf"
+#AUTH_CONF_FILE="@@autofsmapdir@@/autofs_ldap_auth.conf"
 #
 # General global options
 #
--- autofs-5.0.1.orig/samples/autofs.conf.default.in	2007-10-18 19:05:30.000000000 +0800
+++ autofs-5.0.1/samples/autofs.conf.default.in	2007-10-18 19:23:45.000000000 +0800
@@ -1,25 +1,25 @@
 #
 # Define default options for autofs.
 #
-# DEFAULT_MASTER_MAP_NAME - default map name for the master map.
+# MASTER_MAP_NAME - default map name for the master map.
 #
-#DEFAULT_MASTER_MAP_NAME="auto.master"
+#MASTER_MAP_NAME="auto.master"
 #
-# DEFAULT_TIMEOUT - set the default mount timeout (default 600).
+# TIMEOUT - set the default mount timeout (default 600).
 #
-DEFAULT_TIMEOUT=300
+TIMEOUT=300
 #
-# DEFAULT_BROWSE_MODE - maps are browsable by default.
+# BROWSE_MODE - maps are browsable by default.
 #
-DEFAULT_BROWSE_MODE="no"
+BROWSE_MODE="no"
 #
-# DEFAULT_APPEND_OPTIONS - append to global options instead of replace.
+# APPEND_OPTIONS - append to global options instead of replace.
 #
-#DEFAULT_APPEND_OPTIONS="yes"
+#APPEND_OPTIONS="yes"
 #
-# DEFAULT_LOGGING - set default log level "none", "verbose" or "debug"
+# LOGGING - set default log level "none", "verbose" or "debug"
 #
-#DEFAULT_LOGGING="none"
+#LOGGING="none"
 #
 # Define the LDAP schema to used for lookups
 #
@@ -28,30 +28,30 @@
 # basdn for lookups. If you want to minimize the number of
 # queries to the server set the values here.
 #
-#DEFAULT_MAP_OBJECT_CLASS="nisMap"
-#DEFAULT_ENTRY_OBJECT_CLASS="nisObject"
-#DEFAULT_MAP_ATTRIBUTE="nisMapName"
-#DEFAULT_ENTRY_ATTRIBUTE="cn"
-#DEFAULT_VALUE_ATTRIBUTE="nisMapEntry"
+#MAP_OBJECT_CLASS="nisMap"
+#ENTRY_OBJECT_CLASS="nisObject"
+#MAP_ATTRIBUTE="nisMapName"
+#ENTRY_ATTRIBUTE="cn"
+#VALUE_ATTRIBUTE="nisMapEntry"
 #
 # Other common LDAP nameing
 #
-#DEFAULT_MAP_OBJECT_CLASS="automountMap"
-#DEFAULT_ENTRY_OBJECT_CLASS="automount"
-#DEFAULT_MAP_ATTRIBUTE="ou"
-#DEFAULT_ENTRY_ATTRIBUTE="cn"
-#DEFAULT_VALUE_ATTRIBUTE="automountInformation"
-#
-#DEFAULT_MAP_OBJECT_CLASS="automountMap"
-#DEFAULT_ENTRY_OBJECT_CLASS="automount"
-#DEFAULT_MAP_ATTRIBUTE="automountMapName"
-#DEFAULT_ENTRY_ATTRIBUTE="automountKey"
-#DEFAULT_VALUE_ATTRIBUTE="automountInformation"
+#MAP_OBJECT_CLASS="automountMap"
+#ENTRY_OBJECT_CLASS="automount"
+#MAP_ATTRIBUTE="ou"
+#ENTRY_ATTRIBUTE="cn"
+#VALUE_ATTRIBUTE="automountInformation"
+#
+#MAP_OBJECT_CLASS="automountMap"
+#ENTRY_OBJECT_CLASS="automount"
+#MAP_ATTRIBUTE="automountMapName"
+#ENTRY_ATTRIBUTE="automountKey"
+#VALUE_ATTRIBUTE="automountInformation"
 #
-# DEFAULT_AUTH_CONF_FILE - set the default location for the SASL
+# AUTH_CONF_FILE - set the default location for the SASL
 #			   authentication configuration file.
 #
-#DEFAULT_AUTH_CONF_FILE="@@autofsmapdir@@/autofs_ldap_auth.conf"
+#AUTH_CONF_FILE="@@autofsmapdir@@/autofs_ldap_auth.conf"
 #
 # General global options
 #