rpms/autofs/devel autofs-5.0.1-rc2-handle-autofs-options.patch, NONE, 1.1 autofs.spec, 1.144, 1.145
fedora-cvs-commits at redhat.com
fedora-cvs-commits at redhat.com
Wed Sep 13 08:25:48 UTC 2006
- Previous message (by thread): rpms/net-snmp/devel net-snmp-5.3.1-local-addr.patch, NONE, 1.1 net-snmp.spec, 1.87, 1.88
- Next message (by thread): rpms/tar/devel tar-1.15.91-makeCheck.patch, NONE, 1.1 .cvsignore, 1.9, 1.10 sources, 1.10, 1.11 tar.spec, 1.43, 1.44 tar-1.14-nolibrt.patch, 1.3, NONE tar-1.15.90-makeCheck.patch, 1.1, NONE tar-1.15.90-permissions.patch, 1.1, NONE
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: ikent
Update of /cvs/dist/rpms/autofs/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv19969
Modified Files:
autofs.spec
Added Files:
autofs-5.0.1-rc2-handle-autofs-options.patch
Log Message:
* Wed Sep 13 2006 Ian Kent <ikent at redhat.com> - 5.0.1-0.rc2.2
- fix handling of autofs specific mount options (bz 199777).
autofs-5.0.1-rc2-handle-autofs-options.patch:
CHANGELOG | 4 +++
lib/master.c | 5 ----
lib/master_parse.y | 2 -
modules/mount_autofs.c | 54 ++++++++++++++++++++++++++++++++++++-------------
modules/parse_sun.c | 8 +++++++
5 files changed, 54 insertions(+), 19 deletions(-)
--- NEW FILE autofs-5.0.1-rc2-handle-autofs-options.patch ---
diff --git a/CHANGELOG b/CHANGELOG
index bd0bbf0..56b3dd6 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,7 @@
+?/?/2006 autofs-5.0.1 rc3
+-------------------------
+- fix handling of autofs specific mount options.
+
1/9/2006 autofs-5.0.1 rc2
-------------------------
- code cleanup.
diff --git a/lib/master.c b/lib/master.c
index a411459..0ee7d38 100644
--- a/lib/master.c
+++ b/lib/master.c
@@ -70,10 +70,7 @@ int master_add_autofs_point(struct maste
ap->readmap_thread = 0;
ap->exp_timeout = timeout;
ap->exp_runfreq = (timeout + CHECK_RATIO - 1) / CHECK_RATIO;
- if (ghost)
- ap->ghost = ghost;
- else
- ap->ghost = defaults_get_browse_mode();
+ ap->ghost = ghost;
if (ap->path[1] == '-')
ap->type = LKP_DIRECT;
diff --git a/lib/master_parse.y b/lib/master_parse.y
index 2f350f7..1a6a3a2 100644
--- a/lib/master_parse.y
+++ b/lib/master_parse.y
@@ -421,7 +421,7 @@ static void local_init_vars(void)
verbose = 0;
debug = 0;
timeout = -1;
- ghost = 0;
+ ghost = defaults_get_browse_mode();
local_argv = NULL;
local_argc = 0;
}
diff --git a/modules/mount_autofs.c b/modules/mount_autofs.c
index c9baf57..e901f20 100644
--- a/modules/mount_autofs.c
+++ b/modules/mount_autofs.c
@@ -86,31 +86,57 @@ int mount_mount(struct autofs_point *ap,
return 0;
}
+ options = NULL;
if (c_options) {
- options = alloca(strlen(c_options) + 1);
- if (!options) {
+ char *noptions;
+ const char *comma;
+ char *np;
+ int len = strlen(c_options) + 1;
+
+ noptions = np = alloca(len);
+ if (!np) {
char *estr = strerror_r(errno, buf, MAX_ERR_BUF);
error(ap->logopt, MODPREFIX "alloca: %s", estr);
return 1;
}
- strcpy(options, c_options);
- } else {
- options = NULL;
+ memset(np, 0, len);
+
+ /* Grab the autofs specific options */
+ for (comma = c_options; *comma != '\0';) {
+ const char *cp;
+
+ while (*comma == ',')
+ comma++;
+
+ cp = comma;
+
+ while (*comma != '\0' && *comma != ',')
+ comma++;
+
+ if (strncmp(cp, "nobrowse", 8) == 0)
+ ghost = 0;
+ else if (strncmp(cp, "browse", 6) == 0)
+ ghost = 1;
+ else if (strncmp(cp, "timeout=", 8) == 0) {
+ char *val = strchr(cp, '=');
+ unsigned tout;
+ if (val++) {
+ int ret = sscanf(cp, "timeout=%u", &tout);
+ if (ret)
+ timeout = tout;
+ }
+ } else {
+ memcpy(np, cp, comma - cp + 1);
+ np += comma - cp + 1;
+ }
+ }
+ options = noptions;
}
debug(ap->logopt,
MODPREFIX "fullpath=%s what=%s options=%s",
fullpath, what, options);
- /* TODO: options processing needs more work */
-
- if (strstr(options, "browse")) {
- if (strstr(options, "nobrowse"))
- ghost = 0;
- else
- ghost = 1;
- }
-
entry = master_new_mapent(fullpath, ap->entry->age);
if (!entry) {
error(ap->logopt,
diff --git a/modules/parse_sun.c b/modules/parse_sun.c
index 190499c..4606577 100644
--- a/modules/parse_sun.c
+++ b/modules/parse_sun.c
@@ -461,6 +461,14 @@ static int sun_mount(struct autofs_point
nonstrict = 0;
} else if (strncmp("nonstrict", cp, 9) == 0) {
nonstrict = 1;
+ } else if (strncmp("nobrowse", cp, 8) == 0 ||
+ strncmp("browse", cp, 6) == 0 ||
+ strncmp("timeout=", cp, 8) == 0) {
+ if (strcmp(fstype, "autofs") == 0 ||
+ strstr(cp, "fstype=autofs")) {
+ memcpy(np, cp, comma - cp + 1);
+ np += comma - cp + 1;
+ }
} else if (strncmp("bg", cp, 2) == 0 ||
strncmp("nofg", cp, 4) == 0) {
continue;
Index: autofs.spec
===================================================================
RCS file: /cvs/dist/rpms/autofs/devel/autofs.spec,v
retrieving revision 1.144
retrieving revision 1.145
diff -u -r1.144 -r1.145
--- autofs.spec 1 Sep 2006 06:12:06 -0000 1.144
+++ autofs.spec 13 Sep 2006 08:25:46 -0000 1.145
@@ -4,13 +4,14 @@
Summary: A tool for automatically mounting and unmounting filesystems.
Name: autofs
%define version 5.0.1
-%define release 0.rc2.1
+%define release 0.rc2.2
Version: %{version}
Release: %{release}
Epoch: 1
License: GPL
Group: System Environment/Daemons
Source: ftp://ftp.kernel.org/pub/linux/daemons/autofs/v5/autofs-%{version}-rc2.tar.bz2
+Patch0: autofs-5.0.1-rc2-handle-autofs-options.patch
Buildroot: /var/tmp/autofs-tmp
BuildRequires: autoconf, hesiod-devel, openldap-devel, bison, flex, libxml2-devel, cyrus-sasl-devel, openssl-devel
Prereq: chkconfig
@@ -50,6 +51,7 @@
%prep
%setup -q
echo %{version}-%{release} > .version
+%patch0 -p1
%build
#CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=/usr --libdir=%{_libdir}
@@ -106,6 +108,9 @@
%{_libdir}/autofs/*
%changelog
+* Wed Sep 13 2006 Ian Kent <ikent at redhat.com> - 5.0.1-0.rc2.2
+- fix handling of autofs specific mount options (bz 199777).
+
* Fri Sep 1 2006 Ian Kent <ikent at redhat.com> - 5.0.1-0.rc2.1
- consolidate to rc2.
- fix colon escape handling.
- Previous message (by thread): rpms/net-snmp/devel net-snmp-5.3.1-local-addr.patch, NONE, 1.1 net-snmp.spec, 1.87, 1.88
- Next message (by thread): rpms/tar/devel tar-1.15.91-makeCheck.patch, NONE, 1.1 .cvsignore, 1.9, 1.10 sources, 1.10, 1.11 tar.spec, 1.43, 1.44 tar-1.14-nolibrt.patch, 1.3, NONE tar-1.15.90-makeCheck.patch, 1.1, NONE tar-1.15.90-permissions.patch, 1.1, NONE
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-cvs-commits
mailing list