- fix "null" domain netgroup match for "-hosts" map.
This commit is contained in:
parent
f5c86b60af
commit
7cd379ec9a
46
autofs-5.0.1-null-domain-fix.patch
Normal file
46
autofs-5.0.1-null-domain-fix.patch
Normal file
@ -0,0 +1,46 @@
|
||||
diff --git a/lib/rpc_subs.c b/lib/rpc_subs.c
|
||||
index 5151a1e..831d456 100644
|
||||
--- a/lib/rpc_subs.c
|
||||
+++ b/lib/rpc_subs.c
|
||||
@@ -52,7 +52,7 @@
|
||||
/* Get numeric value of the n bits starting at position p */
|
||||
#define getbits(x, p, n) ((x >> (p + 1 - n)) & ~(~0 << n))
|
||||
|
||||
-static char *ypdomain = NULL;
|
||||
+static char *domain = NULL;
|
||||
|
||||
inline void dump_core(void);
|
||||
static pthread_mutex_t networks_mutex = PTHREAD_MUTEX_INITIALIZER;
|
||||
@@ -946,8 +946,8 @@ static int name_match(const char *name, const char *pattern)
|
||||
else {
|
||||
ret = !memcmp(name, pattern, strlen(pattern));
|
||||
/* Name could still be a netgroup (Solaris) */
|
||||
- if (!ret && ypdomain)
|
||||
- ret = innetgr(pattern, name, NULL, ypdomain);
|
||||
+ if (!ret)
|
||||
+ ret = innetgr(pattern, name, NULL, domain);
|
||||
}
|
||||
|
||||
return ret;
|
||||
@@ -1228,8 +1228,8 @@ static int host_match(char *pattern)
|
||||
if (gethostname(myname, MAXHOSTNAMELEN))
|
||||
return 0;
|
||||
|
||||
- if (yp_get_default_domain(&ypdomain))
|
||||
- ypdomain = NULL;
|
||||
+ if (yp_get_default_domain(&domain))
|
||||
+ domain = NULL;
|
||||
|
||||
if (*m_pattern == '@') {
|
||||
/*
|
||||
@@ -1237,8 +1237,8 @@ static int host_match(char *pattern)
|
||||
* spec or it's a netgroup.
|
||||
*/
|
||||
ret = match_network(m_pattern + 1);
|
||||
- if (!ret && ypdomain)
|
||||
- ret = innetgr(m_pattern + 1, myname, NULL, ypdomain);
|
||||
+ if (!ret)
|
||||
+ ret = innetgr(m_pattern + 1, myname, NULL, domain);
|
||||
} else if (*m_pattern == '.') {
|
||||
size_t m_len = strlen(m_pattern);
|
||||
char *has_dot = strchr(myname, '.');
|
@ -4,7 +4,7 @@
|
||||
Summary: A tool for automatically mounting and unmounting filesystems
|
||||
Name: autofs
|
||||
Version: 5.0.1
|
||||
Release: 6
|
||||
Release: 7
|
||||
Epoch: 1
|
||||
License: GPL
|
||||
Group: System Environment/Daemons
|
||||
@ -21,6 +21,7 @@ Patch8: autofs-5.0.1-random-selection.patch
|
||||
Patch9: autofs-5.0.1-bad-cast.patch
|
||||
Patch10: autofs-5.0.1-fix-browse-dir-create.patch
|
||||
Patch11: autofs-5.0.1-map-update-source-only.patch
|
||||
Patch12: autofs-5.0.1-null-domain-fix.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
|
||||
Conflicts: kernel < 2.6.17
|
||||
@ -73,6 +74,7 @@ echo %{version}-%{release} > .version
|
||||
%patch9 -p1
|
||||
%patch10 -p1
|
||||
%patch11 -p1
|
||||
%patch12 -p1
|
||||
|
||||
%build
|
||||
#CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=/usr --libdir=%{_libdir}
|
||||
@ -125,6 +127,9 @@ fi
|
||||
%{_libdir}/autofs/
|
||||
|
||||
%changelog
|
||||
* Tue Apr 3 2007 Ian Kent <ikent@redhat.com> - 5.0.1-7
|
||||
- fix "null" domain netgroup match for "-hosts" map.
|
||||
|
||||
* Fri Mar 29 2007 Ian Kent <ikent@redhat.com> - 5.0.1-6
|
||||
- fix directory creation for browse mounts.
|
||||
- fix wildcard map handling and improve nsswitch source map update.
|
||||
|
Loading…
Reference in New Issue
Block a user