diff --git a/SOURCES/autofs-5.0.7-fix-portmap-lookup.patch b/SOURCES/autofs-5.0.7-fix-portmap-lookup.patch index a84b4b1..cac651f 100644 --- a/SOURCES/autofs-5.0.7-fix-portmap-lookup.patch +++ b/SOURCES/autofs-5.0.7-fix-portmap-lookup.patch @@ -17,10 +17,10 @@ This incompatibility only shows up when using IPv6 only. --- CHANGELOG | 1 aclocal.m4 | 2 + - configure | 13 +++++++ + configure | 80 +++++++++++++++++++++++++++++++++++++++++++++ include/config.h.in | 6 +++ lib/rpc_subs.c | 92 ++++++++++++++++++++++++++++++++++++++++++++++++---- - 5 files changed, 108 insertions(+), 6 deletions(-) + 5 files changed, 175 insertions(+), 6 deletions(-) --- autofs-5.0.7.orig/CHANGELOG +++ autofs-5.0.7/CHANGELOG @@ -45,7 +45,81 @@ This incompatibility only shows up when using IPv6 only. LDFLAGS="$af_check_libtirpc_save_ldflags" --- autofs-5.0.7.orig/configure +++ autofs-5.0.7/configure -@@ -3161,6 +3161,19 @@ $as_echo "#define TIRPC_WORKAROUND 1" >> +@@ -1559,6 +1559,73 @@ fi + + } # ac_fn_c_try_link + ++# ac_fn_c_check_func LINENO FUNC VAR ++# ---------------------------------- ++# Tests whether FUNC exists, setting the cache variable VAR accordingly ++ac_fn_c_check_func () ++{ ++ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 ++$as_echo_n "checking for $2... " >&6; } ++if eval \${$3+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++/* Define $2 to an innocuous variant, in case declares $2. ++ For example, HP-UX 11i declares gettimeofday. */ ++#define $2 innocuous_$2 ++ ++/* System header to define __stub macros and hopefully few prototypes, ++ which can conflict with char $2 (); below. ++ Prefer to if __STDC__ is defined, since ++ exists even on freestanding compilers. */ ++ ++#ifdef __STDC__ ++# include ++#else ++# include ++#endif ++ ++#undef $2 ++ ++/* Override any GCC internal prototype to avoid an error. ++ Use char because int might match the return type of a GCC ++ builtin and then its argument prototype would still apply. */ ++#ifdef __cplusplus ++extern "C" ++#endif ++char $2 (); ++/* The GNU C library defines this for functions which it implements ++ to always fail with ENOSYS. Some functions are actually named ++ something starting with __ and the normal name is an alias. */ ++#if defined __stub_$2 || defined __stub___$2 ++choke me ++#endif ++ ++int ++main () ++{ ++return $2 (); ++ ; ++ return 0; ++} ++_ACEOF ++if ac_fn_c_try_link "$LINENO"; then : ++ eval "$3=yes" ++else ++ eval "$3=no" ++fi ++rm -f core conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext conftest.$ac_ext ++fi ++eval ac_res=\$$3 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 ++$as_echo "$ac_res" >&6; } ++ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno ++ ++} # ac_fn_c_check_func ++ + # ac_fn_c_try_cpp LINENO + # ---------------------- + # Try to preprocess conftest.$ac_ext, and return whether this succeeded. +@@ -3161,6 +3228,19 @@ $as_echo "#define TIRPC_WORKAROUND 1" >> TIRPCLIB="-ltirpc" fi diff --git a/SOURCES/autofs-5.0.7-improve-timeout-option-description.patch b/SOURCES/autofs-5.0.7-improve-timeout-option-description.patch new file mode 100644 index 0000000..cb4cb4e --- /dev/null +++ b/SOURCES/autofs-5.0.7-improve-timeout-option-description.patch @@ -0,0 +1,84 @@ +autofs-5.0.7 - improve timeout option description + +From: Ian Kent + +The description of the configuration option is a little misleading. +So add some explaination about the internal default and the reason +the default installed configuration overrides it. +--- + CHANGELOG | 1 + + man/auto.master.5.in | 5 ++++- + man/automount.8 | 5 ++++- + redhat/autofs.sysconfig.in | 5 ++++- + samples/autofs.conf.default.in | 5 ++++- + 5 files changed, 17 insertions(+), 4 deletions(-) + +--- autofs-5.0.7.orig/CHANGELOG ++++ autofs-5.0.7/CHANGELOG +@@ -65,6 +65,7 @@ + - fix portmap lookup. + - only probe specific nfs version if requested. + - fix ipv6 libtirpc getport. ++- improve timeout option description. + + 25/07/2012 autofs-5.0.7 + ======================= +--- autofs-5.0.7.orig/man/auto.master.5.in ++++ autofs-5.0.7/man/auto.master.5.in +@@ -212,7 +212,10 @@ configuration file + They are: + .TP + .B TIMEOUT +-sets the default mount timeout (program default 600). ++Sets the default mount timeout in seconds. The internal program ++default is 10 minutes, but the default installed configuration ++overrides this and sets the timeout to 5 minutes to be consistent ++with earlier autofs releases. + .TP + .B NEGATIVE_TIMEOUT + Set the default timeout for caching failed key lookups (program default +--- autofs-5.0.7.orig/man/automount.8 ++++ autofs-5.0.7/man/automount.8 +@@ -29,10 +29,13 @@ Print brief help on program usage. + .I "\-p, \-\-pid-file" + Write the pid of the daemon to the specified file. + .TP +-.I "\-t, \-\-timeout" ++.I "\-t , \-\-timeout " + Set the global minimum timeout, in seconds, until directories + are unmounted. The default is 10 minutes. Setting the timeout + to zero disables umounts completely. ++The internal program default is 10 minutes, but the default ++installed configuration overrides this and sets the timeout ++to 5 minutes to be consistent with earlier autofs releases. + .TP + .I "\-n , \-\-negative\-timeout " + Set the default timeout for caching failed key lookups. The default is 60 seconds. +--- autofs-5.0.7.orig/redhat/autofs.sysconfig.in ++++ autofs-5.0.7/redhat/autofs.sysconfig.in +@@ -5,7 +5,10 @@ + # + #MASTER_MAP_NAME="auto.master" + # +-# TIMEOUT - set the default mount timeout (default 600). ++# TIMEOUT - set the default mount timeout in secons. The internal ++# program default is 10 minutes, but the default installed ++# configuration overrides this and sets the timeout to 5 ++# minutes to be consistent with earlier autofs releases. + # + TIMEOUT=300 + # +--- autofs-5.0.7.orig/samples/autofs.conf.default.in ++++ autofs-5.0.7/samples/autofs.conf.default.in +@@ -5,7 +5,10 @@ + # + #MASTER_MAP_NAME="auto.master" + # +-# TIMEOUT - set the default mount timeout (default 600). ++# TIMEOUT - set the default mount timeout in secons. The internal ++# program default is 10 minutes, but the default installed ++# configuration overrides this and sets the timeout to 5 ++# minutes to be consistent with earlier autofs releases. + # + TIMEOUT=300 + # diff --git a/SOURCES/autofs-5.0.8-fix-fix-ipv6-libtirpc-getport.patch b/SOURCES/autofs-5.0.8-fix-fix-ipv6-libtirpc-getport.patch new file mode 100644 index 0000000..da17cd8 --- /dev/null +++ b/SOURCES/autofs-5.0.8-fix-fix-ipv6-libtirpc-getport.patch @@ -0,0 +1,43 @@ +autofs-5.0.8 - fix fix ipv6 libtirpc getport + +From: Ian Kent + +Remove a duplicated case entry and remove redundant check, since it +can never be reached, in rpc_rpcb_getport(). +--- + CHANGELOG | 1 + + lib/rpc_subs.c | 6 +----- + 2 files changed, 2 insertions(+), 5 deletions(-) + +--- autofs-5.0.7.orig/CHANGELOG ++++ autofs-5.0.7/CHANGELOG +@@ -66,6 +66,7 @@ + - only probe specific nfs version if requested. + - fix ipv6 libtirpc getport. + - improve timeout option description. ++- fix fix ipv6 libtirpc getport. + + 25/07/2012 autofs-5.0.7 + ======================= +--- autofs-5.0.7.orig/lib/rpc_subs.c ++++ autofs-5.0.7/lib/rpc_subs.c +@@ -524,7 +524,6 @@ static enum clnt_stat rpc_rpcb_getport(C + if (rpcerr.re_vers.low > RPCBVERS4) + return status; + continue; +- case RPC_PROCUNAVAIL: + case RPC_PROGUNAVAIL: + continue; + default: +@@ -533,10 +532,7 @@ static enum clnt_stat rpc_rpcb_getport(C + } + } + +- if (s_port == 0) +- return RPC_PROGNOTREGISTERED; +- +- return RPC_PROCUNAVAIL; ++ return RPC_PROGNOTREGISTERED; + } + + static enum clnt_stat rpc_getport(struct conn_info *info, diff --git a/SOURCES/autofs-5.0.8-fix-ipv6-libtirpc-getport-proto-not-set.patch b/SOURCES/autofs-5.0.8-fix-ipv6-libtirpc-getport-proto-not-set.patch new file mode 100644 index 0000000..0b79b44 --- /dev/null +++ b/SOURCES/autofs-5.0.8-fix-ipv6-libtirpc-getport-proto-not-set.patch @@ -0,0 +1,41 @@ +autofs-5.0.8 - fix rpc_portmap_getport() proto not set + +From: Ian Kent + +Recent changes to fix libtirpc usage problems when getting a server +exports list cause later server probing to fail. + +When getting an exports list a new rpc client is always created for +the query, which includes setting the protocol in the parameters +structure. But when probing availability the client is reused where +possible and the protocol is not set in the parameters structure in +this case. + +The rpc_portmap_getport() changes require that the protocol is set +in oder to function. +--- + CHANGELOG | 1 + + lib/rpc_subs.c | 2 ++ + 2 files changed, 3 insertions(+) + +--- autofs-5.0.7.orig/CHANGELOG ++++ autofs-5.0.7/CHANGELOG +@@ -68,6 +68,7 @@ + - improve timeout option description. + - fix fix ipv6 libtirpc getport. + - get_nfs_info() should query portmapper if port is not given. ++- fix rpc_portmap_getport() proto not set. + + 25/07/2012 autofs-5.0.7 + ======================= +--- autofs-5.0.7.orig/lib/rpc_subs.c ++++ autofs-5.0.7/lib/rpc_subs.c +@@ -877,6 +877,8 @@ int rpc_portmap_getport(struct conn_info + + memset(&pmap_info, 0, sizeof(struct conn_info)); + ++ pmap_info.proto = proto; ++ + if (proto == IPPROTO_TCP) + pmap_info.timeout.tv_sec = PMAP_TOUT_TCP; + else diff --git a/SOURCES/autofs-5.0.8-fix-ipv6-libtirpc-getport.patch b/SOURCES/autofs-5.0.8-fix-ipv6-libtirpc-getport.patch new file mode 100644 index 0000000..96c5634 --- /dev/null +++ b/SOURCES/autofs-5.0.8-fix-ipv6-libtirpc-getport.patch @@ -0,0 +1,341 @@ +autofs-5.0.8 - fix ipv6 libtirpc getport + +From: Ian Kent + +The method that was being used to obtain a service port number +when using libtirpc was wrong. +--- + CHANGELOG | 1 + lib/rpc_subs.c | 283 +++++++++++++++++++++++++++++++++++++++++++++++++++++---- + 2 files changed, 267 insertions(+), 17 deletions(-) + +--- autofs-5.0.7.orig/CHANGELOG ++++ autofs-5.0.7/CHANGELOG +@@ -64,6 +64,7 @@ + - fix get_nfs_info() probe. + - fix portmap lookup. + - only probe specific nfs version if requested. ++- fix ipv6 libtirpc getport. + + 25/07/2012 autofs-5.0.7 + ======================= +--- autofs-5.0.7.orig/lib/rpc_subs.c ++++ autofs-5.0.7/lib/rpc_subs.c +@@ -234,6 +234,28 @@ static int rpc_do_create_client(struct s + + return 0; + } ++static int rpc_getport(struct conn_info *info, ++ struct pmap *parms, CLIENT *client) ++{ ++ enum clnt_stat status; ++ ++ /* ++ * Check to see if server is up otherwise a getport will take ++ * forever to timeout. ++ */ ++ status = clnt_call(client, PMAPPROC_NULL, ++ (xdrproc_t) xdr_void, 0, (xdrproc_t) xdr_void, 0, ++ info->timeout); ++ ++ if (status == RPC_SUCCESS) { ++ status = clnt_call(client, PMAPPROC_GETPORT, ++ (xdrproc_t) xdr_pmap, (caddr_t) parms, ++ (xdrproc_t) xdr_u_short, (caddr_t) port, ++ info->timeout); ++ } ++ ++ return status; ++} + #else + static int rpc_do_create_client(struct sockaddr *addr, struct conn_info *info, int *fd, CLIENT **client) + { +@@ -267,9 +289,6 @@ static int rpc_do_create_client(struct s + laddr = (struct sockaddr *) &in4_laddr; + in4_raddr->sin_port = htons(info->port); + slen = sizeof(struct sockaddr_in); +- /* Use rpcbind v2 for AF_INET */ +- if (info->program == rpcb_prog) +- info->version = PMAPVERS; + } else if (addr->sa_family == AF_INET6) { + struct sockaddr_in6 *in6_raddr = (struct sockaddr_in6 *) addr; + in6_laddr.sin6_family = AF_INET6; +@@ -324,6 +343,244 @@ static int rpc_do_create_client(struct s + + return 0; + } ++ ++/* ++ * Thankfully nfs-utils had already dealt with this. ++ * Thanks to Chuck Lever for his nfs-utils patch series, much of ++ * which is used here. ++ */ ++static pthread_mutex_t proto_mutex = PTHREAD_MUTEX_INITIALIZER; ++ ++static enum clnt_stat rpc_get_netid(const sa_family_t family, ++ const int protocol, char **netid) ++{ ++ char *nc_protofmly, *nc_proto, *nc_netid; ++ struct netconfig *nconf; ++ struct protoent *proto; ++ void *handle; ++ ++ switch (family) { ++ case AF_LOCAL: ++ case AF_INET: ++ nc_protofmly = NC_INET; ++ break; ++ case AF_INET6: ++ nc_protofmly = NC_INET6; ++ break; ++ default: ++ return RPC_UNKNOWNPROTO; ++ } ++ ++ pthread_mutex_lock(&proto_mutex); ++ proto = getprotobynumber(protocol); ++ if (!proto) { ++ pthread_mutex_unlock(&proto_mutex); ++ return RPC_UNKNOWNPROTO; ++ } ++ nc_proto = strdup(proto->p_name); ++ pthread_mutex_unlock(&proto_mutex); ++ if (!nc_proto) ++ return RPC_SYSTEMERROR; ++ ++ handle = setnetconfig(); ++ while ((nconf = getnetconfig(handle)) != NULL) { ++ if (nconf->nc_protofmly != NULL && ++ strcmp(nconf->nc_protofmly, nc_protofmly) != 0) ++ continue; ++ if (nconf->nc_proto != NULL && ++ strcmp(nconf->nc_proto, nc_proto) != 0) ++ continue; ++ ++ nc_netid = strdup(nconf->nc_netid); ++ if (!nc_netid) { ++ free(nc_proto); ++ return RPC_SYSTEMERROR; ++ } ++ ++ *netid = nc_netid; ++ } ++ endnetconfig(handle); ++ free(nc_proto); ++ ++ return RPC_SUCCESS; ++} ++ ++static char *rpc_sockaddr2universal(const struct sockaddr *addr) ++{ ++ const struct sockaddr_in6 *sin6 = (const struct sockaddr_in6 *) addr; ++ const struct sockaddr_un *sun = (const struct sockaddr_un *) addr; ++ const struct sockaddr_in *sin = (const struct sockaddr_in *) addr; ++ char buf[INET6_ADDRSTRLEN + 8 /* for port information */]; ++ uint16_t port; ++ size_t count; ++ char *result; ++ int len; ++ ++ switch (addr->sa_family) { ++ case AF_LOCAL: ++ return strndup(sun->sun_path, sizeof(sun->sun_path)); ++ case AF_INET: ++ if (inet_ntop(AF_INET, (const void *)&sin->sin_addr.s_addr, ++ buf, (socklen_t)sizeof(buf)) == NULL) ++ goto out_err; ++ port = ntohs(sin->sin_port); ++ break; ++ case AF_INET6: ++ if (inet_ntop(AF_INET6, (const void *)&sin6->sin6_addr, ++ buf, (socklen_t)sizeof(buf)) == NULL) ++ goto out_err; ++ port = ntohs(sin6->sin6_port); ++ break; ++ default: ++ goto out_err; ++ } ++ ++ count = sizeof(buf) - strlen(buf); ++ len = snprintf(buf + strlen(buf), count, ".%u.%u", ++ (unsigned)(port >> 8), (unsigned)(port & 0xff)); ++ /* before glibc 2.0.6, snprintf(3) could return -1 */ ++ if (len < 0 || (size_t)len > count) ++ goto out_err; ++ ++ result = strdup(buf); ++ return result; ++ ++out_err: ++ return NULL; ++} ++ ++static int rpc_universal2port(const char *uaddr) ++{ ++ char *addrstr; ++ char *p, *endptr; ++ unsigned long portlo, porthi; ++ int port = -1; ++ ++ addrstr = strdup(uaddr); ++ if (!addrstr) ++ return -1; ++ ++ p = strrchr(addrstr, '.'); ++ if (!p) ++ goto out; ++ ++ portlo = strtoul(p + 1, &endptr, 10); ++ if (*endptr != '\0' || portlo > 255) ++ goto out; ++ *p = '\0'; ++ ++ p = strrchr(addrstr, '.'); ++ if (!p) ++ goto out; ++ ++ porthi = strtoul(p + 1, &endptr, 10); ++ if (*endptr != '\0' || porthi > 255) ++ goto out; ++ *p = '\0'; ++ ++ port = (porthi << 8) | portlo; ++ ++out: ++ free(addrstr); ++ return port; ++} ++ ++static enum clnt_stat rpc_rpcb_getport(CLIENT *client, ++ struct rpcb *parms, ++ struct timeval timeout, ++ unsigned short *port) ++{ ++ rpcvers_t rpcb_version; ++ struct rpc_err rpcerr; ++ int s_port = 0; ++ ++ for (rpcb_version = RPCBVERS_4; ++ rpcb_version >= RPCBVERS_3; ++ rpcb_version--) { ++ enum clnt_stat status; ++ char *uaddr = NULL; ++ ++ CLNT_CONTROL(client, CLSET_VERS, (void *) &rpcb_version); ++ status = CLNT_CALL(client, (rpcproc_t) RPCBPROC_GETADDR, ++ (xdrproc_t) xdr_rpcb, (void *) parms, ++ (xdrproc_t) xdr_wrapstring, (void *) &uaddr, ++ timeout); ++ ++ switch (status) { ++ case RPC_SUCCESS: ++ if ((uaddr == NULL) || (uaddr[0] == '\0')) ++ return RPC_PROGNOTREGISTERED; ++ ++ s_port = rpc_universal2port(uaddr); ++ xdr_free((xdrproc_t) xdr_wrapstring, (char *) &uaddr); ++ if (s_port == -1) { ++ return RPC_N2AXLATEFAILURE; ++ } ++ *port = s_port; ++ return RPC_SUCCESS; ++ ++ case RPC_PROGVERSMISMATCH: ++ clnt_geterr(client, &rpcerr); ++ if (rpcerr.re_vers.low > RPCBVERS4) ++ return status; ++ continue; ++ case RPC_PROCUNAVAIL: ++ case RPC_PROGUNAVAIL: ++ continue; ++ default: ++ /* Most likely RPC_TIMEDOUT or RPC_CANTRECV */ ++ return status; ++ } ++ } ++ ++ if (s_port == 0) ++ return RPC_PROGNOTREGISTERED; ++ ++ return RPC_PROCUNAVAIL; ++} ++ ++static enum clnt_stat rpc_getport(struct conn_info *info, ++ struct pmap *parms, CLIENT *client, ++ unsigned short *port) ++{ ++ enum clnt_stat status; ++ struct sockaddr *paddr, addr; ++ struct rpcb rpcb_parms; ++ char *netid, *raddr; ++ ++ if (info->addr) ++ paddr = info->addr; ++ else { ++ if (!clnt_control(client, CLGET_SERVER_ADDR, (char *) &addr)) ++ return RPC_UNKNOWNADDR; ++ paddr = &addr; ++ } ++ ++ netid = NULL; ++ status = rpc_get_netid(paddr->sa_family, info->proto, &netid); ++ if (status != RPC_SUCCESS) ++ return status; ++ ++ raddr = rpc_sockaddr2universal(paddr); ++ if (!raddr) { ++ free(netid); ++ return RPC_UNKNOWNADDR; ++ } ++ ++ memset(&rpcb_parms, 0, sizeof(rpcb_parms)); ++ rpcb_parms.r_prog = parms->pm_prog; ++ rpcb_parms.r_vers = parms->pm_vers; ++ rpcb_parms.r_netid = netid; ++ rpcb_parms.r_addr = raddr; ++ rpcb_parms.r_owner = ""; ++ ++ status = rpc_rpcb_getport(client, &rpcb_parms, info->timeout, port); ++ ++ free(netid); ++ free(raddr); ++ ++ return status; ++} + #endif + + #if defined(HAVE_GETRPCBYNAME) || defined(HAVE_GETSERVBYNAME) +@@ -647,20 +904,7 @@ int rpc_portmap_getport(struct conn_info + return ret; + } + +- /* +- * Check to see if server is up otherwise a getport will take +- * forever to timeout. +- */ +- status = clnt_call(client, PMAPPROC_NULL, +- (xdrproc_t) xdr_void, 0, (xdrproc_t) xdr_void, 0, +- pmap_info.timeout); +- +- if (status == RPC_SUCCESS) { +- status = clnt_call(client, PMAPPROC_GETPORT, +- (xdrproc_t) xdr_pmap, (caddr_t) parms, +- (xdrproc_t) xdr_u_short, (caddr_t) port, +- pmap_info.timeout); +- } ++ status = rpc_getport(&pmap_info, parms, client, port); + + if (!info->client) { + /* +@@ -867,6 +1111,11 @@ static int rpc_get_exports_proto(struct + clnt_control(client, CLSET_RETRY_TIMEOUT, (char *) &info->timeout); + + client->cl_auth = authunix_create_default(); ++ if (client->cl_auth == NULL) { ++ error(LOGOPT_ANY, "auth create failed"); ++ clnt_destroy(client); ++ return 0; ++ } + + vers_entry = 0; + while (1) { diff --git a/SOURCES/autofs-5.0.8-fix-ipv6-link-local-address-handling.patch b/SOURCES/autofs-5.0.8-fix-ipv6-link-local-address-handling.patch new file mode 100644 index 0000000..3ca8439 --- /dev/null +++ b/SOURCES/autofs-5.0.8-fix-ipv6-link-local-address-handling.patch @@ -0,0 +1,37 @@ +autofs-5.0.8 - fix ipv6 link local address handling + +From: Ian Kent + +Stop the validate_location() function from choking on link local +ipv6 addresses. +--- + lib/rpc_subs.c | 6 ++++++ + modules/parse_sun.c | 2 +- + 2 files changed, 7 insertions(+), 1 deletion(-) + +--- autofs-5.0.7.orig/lib/rpc_subs.c ++++ autofs-5.0.7/lib/rpc_subs.c +@@ -669,6 +669,12 @@ static int create_client(struct conn_inf + goto done; + if (ret == -EHOSTUNREACH) + goto out_close; ++ if (ret == -EINVAL) { ++ char buf[MAX_ERR_BUF]; ++ char *estr = strerror_r(-ret, buf, MAX_ERR_BUF); ++ error(LOGOPT_ANY, "connect() failed: %s", estr); ++ goto out_close; ++ } + + if (!info->client && fd != RPC_ANYSOCK) { + close(fd); +--- autofs-5.0.7.orig/modules/parse_sun.c ++++ autofs-5.0.7/modules/parse_sun.c +@@ -893,7 +893,7 @@ static int validate_location(unsigned in + *ptr == '-' || *ptr == '.' || *ptr == '_' || + *ptr == ',' || *ptr == '(' || *ptr == ')' || + *ptr == '#' || *ptr == '@' || *ptr == ':' || +- *ptr == '[' || *ptr == ']')) { ++ *ptr == '[' || *ptr == ']' || *ptr == '%')) { + error(logopt, "invalid character \"%c\" " + "found in location %s", *ptr, loc); + return 0; diff --git a/SOURCES/autofs-5.0.8-fix-portmap-not-trying-proto-v2.patch b/SOURCES/autofs-5.0.8-fix-portmap-not-trying-proto-v2.patch new file mode 100644 index 0000000..c493391 --- /dev/null +++ b/SOURCES/autofs-5.0.8-fix-portmap-not-trying-proto-v2.patch @@ -0,0 +1,59 @@ +autofs-5.0.8 - fix portmap not trying proto v2 + +From: Ian Kent + +The latest change to fix a problem with getting an exports list +from a server doesn't try portmap version 2 when trying to get +a service port number. This causes servers that offer only +version 2 to not be able to provide a service port number. +--- + CHANGELOG | 1 + + lib/rpc_subs.c | 17 ++++++++++++++++- + 2 files changed, 17 insertions(+), 1 deletion(-) + +--- autofs-5.0.7.orig/CHANGELOG ++++ autofs-5.0.7/CHANGELOG +@@ -69,6 +69,7 @@ + - fix fix ipv6 libtirpc getport. + - get_nfs_info() should query portmapper if port is not given. + - fix rpc_portmap_getport() proto not set. ++- fix protmap not trying proto v2. + + 25/07/2012 autofs-5.0.7 + ======================= +--- autofs-5.0.7.orig/lib/rpc_subs.c ++++ autofs-5.0.7/lib/rpc_subs.c +@@ -524,10 +524,15 @@ static enum clnt_stat rpc_rpcb_getport(C + if (rpcerr.re_vers.low > RPCBVERS4) + return status; + continue; ++ + case RPC_PROGUNAVAIL: + continue; ++ ++ case RPC_PROGNOTREGISTERED: ++ continue; ++ + default: +- /* Most likely RPC_TIMEDOUT or RPC_CANTRECV */ ++ /* Most likely RPC_TIMEDOUT or RPC_CANTRECV */ + return status; + } + } +@@ -575,6 +580,16 @@ static enum clnt_stat rpc_getport(struct + free(netid); + free(raddr); + ++ if (status == RPC_PROGNOTREGISTERED) { ++ /* Last chance, version 2 uses a different procedure */ ++ rpcvers_t rpcb_version = PMAPVERS; ++ CLNT_CONTROL(client, CLSET_VERS, (void *) &rpcb_version); ++ status = clnt_call(client, PMAPPROC_GETPORT, ++ (xdrproc_t) xdr_pmap, (caddr_t) parms, ++ (xdrproc_t) xdr_u_short, (caddr_t) port, ++ info->timeout); ++ } ++ + return status; + } + #endif diff --git a/SOURCES/autofs-5.0.8-get_nfs_info-should-query-portmapper-if-port-is-not-given.patch b/SOURCES/autofs-5.0.8-get_nfs_info-should-query-portmapper-if-port-is-not-given.patch new file mode 100644 index 0000000..de50c4c --- /dev/null +++ b/SOURCES/autofs-5.0.8-get_nfs_info-should-query-portmapper-if-port-is-not-given.patch @@ -0,0 +1,40 @@ +autofs-5.0.8 - get_nfs_info() should query portmapper if port is not given + +From: Scott Mayhew + +It shouldn't just assume it can use port 2049. + +Signed-off-by: Scott Mayhew +--- + CHANGELOG | 1 + + modules/replicated.c | 9 ++++++--- + 2 files changed, 7 insertions(+), 3 deletions(-) + +--- autofs-5.0.7.orig/CHANGELOG ++++ autofs-5.0.7/CHANGELOG +@@ -67,6 +67,7 @@ + - fix ipv6 libtirpc getport. + - improve timeout option description. + - fix fix ipv6 libtirpc getport. ++- get_nfs_info() should query portmapper if port is not given. + + 25/07/2012 autofs-5.0.7 + ======================= +--- autofs-5.0.7.orig/modules/replicated.c ++++ autofs-5.0.7/modules/replicated.c +@@ -444,9 +444,12 @@ static unsigned int get_nfs_info(unsigne + host->name, proto, version); + + rpc_info->proto = proto; +- if (port < 0) +- rpc_info->port = NFS_PORT; +- else if (port > 0) ++ if (port < 0) { ++ if (version & NFS4_REQUESTED) ++ rpc_info->port = NFS_PORT; ++ else ++ port = 0; ++ } else if (port > 0) + rpc_info->port = port; + + memset(&parms, 0, sizeof(struct pmap)); diff --git a/SPECS/autofs.spec b/SPECS/autofs.spec index 3e216e1..d2a7180 100644 --- a/SPECS/autofs.spec +++ b/SPECS/autofs.spec @@ -8,7 +8,7 @@ Summary: A tool for automatically mounting and unmounting filesystems Name: autofs Version: 5.0.7 -Release: 32%{?dist} +Release: 40%{?dist} Epoch: 1 License: GPLv2+ Group: System Environment/Daemons @@ -107,6 +107,13 @@ Patch91: autofs-5.0.7-teach-dumpmaps-to-output-simple-key-value-pairs.patch Patch92: autofs-5.0.7-fix-get_nfs_info-probe.patch Patch93: autofs-5.0.7-fix-portmap-lookup.patch Patch94: autofs-5.0.7-only-probe-specific-nfs-version-when-requested.patch +Patch95: autofs-5.0.8-fix-ipv6-libtirpc-getport.patch +Patch96: autofs-5.0.7-improve-timeout-option-description.patch +Patch97: autofs-5.0.8-fix-ipv6-link-local-address-handling.patch +Patch98: autofs-5.0.8-fix-fix-ipv6-libtirpc-getport.patch +Patch99: autofs-5.0.8-get_nfs_info-should-query-portmapper-if-port-is-not-given.patch +Patch100: autofs-5.0.8-fix-ipv6-libtirpc-getport-proto-not-set.patch +Patch101: autofs-5.0.8-fix-portmap-not-trying-proto-v2.patch Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) %if %{with_systemd} BuildRequires: systemd-units @@ -258,6 +265,13 @@ echo %{version}-%{release} > .version %patch92 -p1 %patch93 -p1 %patch94 -p1 +%patch95 -p1 +%patch96 -p1 +%patch97 -p1 +%patch98 -p1 +%patch99 -p1 +%patch100 -p1 +%patch101 -p1 %build LDFLAGS=-Wl,-z,now @@ -349,6 +363,45 @@ fi %dir /etc/auto.master.d %changelog +* Wed Feb 19 2014 Ian Kent - 1:5.0.7-40 +- bz1063139 - autofs regression test failure. + - fix fix ipv6 libtirpc getport. + - get_nfs_info() should query portmapper if port is not given. + - fix rpc_portmap_getport() proto not set. + - fix portmap not trying proto v2. +- Resolves: rhbz#1063139 + +* Fri Jan 24 2014 Daniel Mach - 1:5.0.7-39 +- Mass rebuild 2014-01-24 + +* Fri Dec 27 2013 Daniel Mach - 1:5.0.7-38 +- Mass rebuild 2013-12-27 + +* Sat Nov 30 2013 Ian Kent - 1:5.0.7-37 +- bz1035977 - with IPv6 address automount fail with "hostname lookup failed" + - fix ipv6 link local address handling. +- Resolves: rhbz#1035977 + +* Tue Nov 19 2013 Ian Kent - 1:5.0.7-35 +- bz1030705 - Default unmount is in 10 seconds, man page says 10 minutes + - improve timeout option description. +- Related: rhbz#1030705 + +* Tue Nov 19 2013 Ian Kent - 1:5.0.7-35 +- bz1029611 - Fresh rhel7 install can't automount nfs exports + - fix ipv6 libtirpc getport function. +- Related: rhbz#1029611 + +* Thu Nov 14 2013 Ian Kent - 1:5.0.7-34 +- bz1029611 - Fresh rhel7 install can't automount nfs exports + - fix revision in spec file. +- Resolves: rhbz#1029611 + +* Thu Nov 14 2013 Ian Kent - 1:5.0.7-33 +- bz1029611 - Fresh rhel7 install can't automount nfs exports + - regenerate configure due to missing function. +- Resolves: rhbz#1029611 + * Thu Nov 7 2013 Ian Kent - 1:5.0.7-32 - bz1011909 - NFSv4 UDP packet sent during automounting - only probe specific nfs version if requested.