rpms/autofs/FC-6 autofs-5.0.1-cmd-global-options-fix.patch, NONE, 1.1 autofs-5.0.1-disable-exports-check.patch, NONE, 1.1 autofs-5.0.1-localfs-label-check.patch, NONE, 1.1 autofs.spec, 1.178, 1.179
fedora-cvs-commits at redhat.com
fedora-cvs-commits at redhat.com
Tue Apr 17 13:04:12 UTC 2007
Author: ikent
Update of /cvs/dist/rpms/autofs/FC-6
In directory cvs.devel.redhat.com:/tmp/cvs-serv14413
Modified Files:
autofs.spec
Added Files:
autofs-5.0.1-cmd-global-options-fix.patch
autofs-5.0.1-disable-exports-check.patch
autofs-5.0.1-localfs-label-check.patch
Log Message:
* Tue Apr 17 2007 Ian Kent <ikent at redhat.com> - 5.0.1-0.rc3.29
- upstream fix for filesystem is local check.
- disable exports access control check (bz 203277).
- fix patch to add command option for set a global mount options (bz 214684).
autofs-5.0.1-cmd-global-options-fix.patch:
parse_sun.c | 101 ++++++++++++++++++++++++++++++++++++------------------------
1 files changed, 61 insertions(+), 40 deletions(-)
--- NEW FILE autofs-5.0.1-cmd-global-options-fix.patch ---
diff --git a/modules/parse_sun.c b/modules/parse_sun.c
index 0494e76..99961c3 100644
--- a/modules/parse_sun.c
+++ b/modules/parse_sun.c
@@ -264,7 +264,7 @@ int parse_init(int argc, const char *const *argv, void **context)
{
struct parse_context *ctxt;
char buf[MAX_ERR_BUF];
- char *noptstr, *def, *val, *macros;
+ char *noptstr, *def, *val, *macros, *gbl_options;
const char *xopt;
int optlen, len, offset;
int i, bval;
@@ -397,25 +397,31 @@ int parse_init(int argc, const char *const *argv, void **context)
}
}
+ gbl_options = NULL;
if (global_options) {
+ if (ctxt->optstr && strstr(ctxt->optstr, global_options))
+ goto options_done;
+ gbl_options = strdup(global_options);
+ }
+
+ if (gbl_options) {
append_options = defaults_get_append_options();
if (append_options) {
- char *tmp = concat_options(global_options, ctxt->optstr);
+ char *tmp = concat_options(gbl_options, ctxt->optstr);
if (!tmp) {
char *estr = strerror_r(errno, buf, MAX_ERR_BUF);
error(LOGOPT_ANY, MODPREFIX "concat_options: %s", estr);
+ free(gbl_options);
} else
ctxt->optstr = tmp;
} else {
if (!ctxt->optstr)
- ctxt->optstr = strdup(global_options);
- if (!ctxt->optstr) {
- char *estr = strerror_r(errno, buf, MAX_ERR_BUF);
- warn(LOGOPT_ANY, MODPREFIX "%s", estr);
- }
+ ctxt->optstr = gbl_options;
+ else
+ free(gbl_options);
}
}
-
+options_done:
debug(LOGOPT_NONE,
MODPREFIX "init gathered global options: %s", ctxt->optstr);
@@ -799,18 +805,23 @@ static int parse_mapent(const char *ent, char *g_options, char **options, char *
char *tmp, *newopt = NULL;
p = parse_options(p, &newopt, logopt);
- tmp = concat_options(myoptions, newopt);
- if (!tmp) {
- char *estr;
- estr = strerror_r(errno, buf, MAX_ERR_BUF);
- error(logopt, MODPREFIX
- "concat_options: %s", estr);
- if (newopt)
- free(newopt);
+ if (newopt && strstr(newopt, myoptions)) {
free(myoptions);
- return 0;
+ myoptions = newopt;
+ } else {
+ tmp = concat_options(myoptions, newopt);
+ if (!tmp) {
+ char *estr;
+ estr = strerror_r(errno, buf, MAX_ERR_BUF);
+ error(logopt, MODPREFIX
+ "concat_options: %s", estr);
+ if (newopt)
+ free(newopt);
+ free(myoptions);
+ return 0;
+ }
+ myoptions = tmp;
}
- myoptions = tmp;
p = skipspace(p);
} while (*p == '-');
@@ -1042,19 +1053,24 @@ int parse_mount(struct autofs_point *ap, const char *name,
char *noptions = NULL;
p = parse_options(p, &noptions, ap->logopt);
- tmp = concat_options(mnt_options, noptions);
- if (!tmp) {
- char *estr = strerror_r(errno, buf, MAX_ERR_BUF);
- error(ap->logopt,
- MODPREFIX "concat_options: %s", estr);
- if (noptions)
- free(noptions);
- if (mnt_options)
- free(mnt_options);
- free(options);
- return 1;
+ if (mnt_options && noptions && strstr(noptions, mnt_options)) {
+ free(mnt_options);
+ mnt_options = noptions;
+ } else {
+ tmp = concat_options(mnt_options, noptions);
+ if (!tmp) {
+ char *estr = strerror_r(errno, buf, MAX_ERR_BUF);
+ error(ap->logopt,
+ MODPREFIX "concat_options: %s", estr);
+ if (noptions)
+ free(noptions);
+ if (mnt_options)
+ free(mnt_options);
+ free(options);
+ return 1;
+ }
+ mnt_options = tmp;
}
- mnt_options = tmp;
p = skipspace(p);
} while (*p == '-');
@@ -1065,17 +1081,22 @@ int parse_mount(struct autofs_point *ap, const char *name,
}
if (append_options) {
- tmp = concat_options(options, mnt_options);
- if (!tmp) {
- char *estr = strerror_r(errno, buf, MAX_ERR_BUF);
- error(ap->logopt, MODPREFIX "concat_options: %s", estr);
- if (options)
- free(options);
- if (mnt_options)
- free(mnt_options);
- return 1;
+ if (options && mnt_options && strstr(mnt_options, options)) {
+ free(options);
+ options = mnt_options;
+ } else {
+ tmp = concat_options(options, mnt_options);
+ if (!tmp) {
+ char *estr = strerror_r(errno, buf, MAX_ERR_BUF);
+ error(ap->logopt, MODPREFIX "concat_options: %s", estr);
+ if (options)
+ free(options);
+ if (mnt_options)
+ free(mnt_options);
+ return 1;
+ }
+ options = tmp;
}
- options = tmp;
} else
options = mnt_options;
}
autofs-5.0.1-disable-exports-check.patch:
lookup_hosts.c | 2 +-
1 files changed, 1 insertion(+), 1 deletion(-)
--- NEW FILE autofs-5.0.1-disable-exports-check.patch ---
diff --git a/modules/lookup_hosts.c b/modules/lookup_hosts.c
index f6a65ae..a9a4c75 100644
--- a/modules/lookup_hosts.c
+++ b/modules/lookup_hosts.c
@@ -208,7 +208,7 @@ done:
exp = rpc_get_exports(name, 10, 0, RPC_CLOSE_NOLINGER);
/* Check exports for obvious ones we don't have access to */
- exp = rpc_exports_prune(exp);
+ /*exp = rpc_exports_prune(exp);*/
mapent = NULL;
while (exp) {
autofs-5.0.1-localfs-label-check.patch:
mounts.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletion(-)
--- NEW FILE autofs-5.0.1-localfs-label-check.patch ---
diff --git a/lib/mounts.c b/lib/mounts.c
index 524f0ee..0e428e8 100644
--- a/lib/mounts.c
+++ b/lib/mounts.c
@@ -371,7 +371,9 @@ int contained_in_local_fs(const char *path)
ret = 1;
} else
ret = 1;
- }
+ } else if (!strncmp("LABEL=", this->fs_name, 6) ||
+ !strncmp("UUID=", this->fs_name, 5))
+ ret = 1;
break;
}
}
Index: autofs.spec
===================================================================
RCS file: /cvs/dist/rpms/autofs/FC-6/autofs.spec,v
retrieving revision 1.178
retrieving revision 1.179
diff -u -r1.178 -r1.179
--- autofs.spec 16 Apr 2007 10:35:52 -0000 1.178
+++ autofs.spec 17 Apr 2007 13:04:10 -0000 1.179
@@ -4,7 +4,7 @@
Summary: A tool for automatically mounting and unmounting filesystems
Name: autofs
%define version 5.0.1
-%define release 0.rc3.28
+%define release 0.rc3.29
Version: %{version}
Release: %{release}
Epoch: 1
@@ -31,6 +31,9 @@
Patch18: autofs-5.0.1-rc3-network_match-fix.patch
Patch19: autofs-5.0.1-conf-append-global.patch
Patch20: autofs-5.0.1-cmd-global-options.patch
+Patch21: autofs-5.0.1-localfs-label-check.patch
+Patch22: autofs-5.0.1-disable-exports-check.patch
+Patch23: autofs-5.0.1-cmd-global-options-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
@@ -93,6 +96,9 @@
%patch18 -p1
%patch19 -p1
%patch20 -p1
+%patch21 -p1
+%patch22 -p1
+%patch23 -p1
%build
#CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=/usr --libdir=%{_libdir}
@@ -149,6 +155,11 @@
%{_libdir}/autofs/*
%changelog
+* Tue Apr 17 2007 Ian Kent <ikent at redhat.com> - 5.0.1-0.rc3.29
+- upstream fix for filesystem is local check.
+- disable exports access control check (bz 203277).
+- fix patch to add command option for set a global mount options (bz 214684).
+
* Mon Apr 16 2007 Ian Kent <ikent at redhat.com> - 5.0.1-0.rc3.28
- fix command option patch.
More information about the fedora-cvs-commits
mailing list