On Mon, 12 Jul 2004, Jeff Moyer wrote: > ==> Regarding Re: [autofs] csh/cd not getting the right cwd at the mount point; > [EMAIL PROTECTED] adds: > > raven> On Fri, 9 Jul 2004 [EMAIL PROTECTED] wrote: I'm having > raven> difficulty understanding the problem you describe. > > >> We have a problem. Here are the conditions: > >> > >> 1. Shell is (t)csh (does not happen under (ba)sh) 2. cd to an autofs > >> fa�ade (e.g. /tools in our case) 3. cd relatively to the subdirectory > >> that is the mount point. > NOTE> The mount must not yet be made. (e.g. perl5.8.3) > >> 4. cd relatively to a subdirectory in the mounted files system (e.g. bin > >> or lib) > > [snip] > > raven> I recommend you try autofs4 release 20040508. Unfortuneately this > raven> release requires a kernel rebuild as there is a small mandatory > raven> change outside of the autofs4 module needed for correct > raven> operation. This release is the one that should be used as it > raven> addresses all known problems and works best with the latest autofs > raven> release. > > raven> You should be using autofs-4.1.3. There is an additional patch that > raven> I have recommened a couple of times now, without adverse feedback, > raven> that my fix your problem. I've uploaded it to kernel.org and it can > raven> be found at: > > [snip] > > NOTE: I was not able to reproduce the problem in my environment, which > included our next update kernel that is fully patched with Ian's latest > kernel patch kit. I'm using autofs-4.1.3-10, which will appear on my > people page soon.
I had some trouble understanding the problem dscription but thought it sounded like below. The easiest way to demonstrate the problem that this fixes is to cd to an autofs directory and attempt to touch a file. It failed, a cd away and back sees the touch work OK. I was able to made this badness happen fairly easily. > > raven> As a RHEL user visiting Jeff Moyers autofs page is a must as there > raven> are patches included their that have not yet been included in an > raven> autofs release > > > raven> http://people.redhat.com/~jmoyer > > raven> Jeff, would it be possible to include the two patches mentioned > raven> above in your rpms please. > > Sure thing. I'm doing builds for this now. I'm currently tracking the > following patches that I _think_ are queued for the next release. Please > correct me if I'm wrong, or if you want me to resend anything. Thanks for that. Since we're talking 4.1.4 let me go the whole hog! And a bit of a roadmap for the nearish future. > > > Patch12: autofs-4.1.2-option-parsing.patch > - Make regular expressiosn for options parsing a bit more strict. Fixes > bugs I have filed on the package for false matches of either mount points > or other fs options. Have looked at the patch before the additional work with rpc came up. Will merge and test as part of next release. > > Patch14: autofs-4.1.3-underlinei18n.patch > - This is a patch which makes translation prettier (AFAIUI). Note, I > didn't write this, and didn't send it to you. I've attached it to this > mail. Saw this yesterday. Looks straight forward. Will merge also. > > Patch15: autofs-4.1.3-rpc-ping.patch > - Ian, you know very well what this is. ;) Yep. I have been working on the first cut of the map update changes. I'm testing atm. It's going a little slowly as I've been way busy this last few weeks, but you know about that. It will be another patch for testing and possible inclusion (if it is ready in time) in 4.1.4. There were some fairly significant changes for this but not really much added functionality and I'm having some difficulty with it atm. So we'll have to see how it goes. > > And, the two you just had me put in: > > Patch16: autofs-4.1.3-bad_chdir.patch > Patch17: autofs-4.1.3-mtab_lock.patch Yep. These will also be in 4.1.4. There are three other patches I have been working on that I want to include in 4.1.4. Two other patches will be posponed, one contributed by Ian McCleod. It had a hard coded path in it so I need to do some more work on it before merging it (if at all, see below). Second a patch by Andrew Stribblehill that merges the function of the file and yp maps into one. The patch is a bit old and has some flaws so it needs a fair amount of work. It also covers some of the functionality of Ians' patch which makes it quite a difficult job. WARNING: I'm not sure that all three patches will apply cleanly as I have been choping and changing as issues have come up. Since the work for 4.1.4 is not complete I haven't returned to check and test these since there initial creation and test. So these are very much fyi so you know what to expect. I'd be interested in feedback if you have time to check them out. First a patch to cull white space from map entries which resulted from a problem logged some time ago. This patch should be OK to include if you wish, it seems to work OK. Call it. autofs-4.1.3-white_space.patch diff -Nur autofs-4.1.3.orig/modules/mount_nfs.c autofs-4.1.3/modules/mount_nfs.c --- autofs-4.1.3.orig/modules/mount_nfs.c 2004-06-05 13:49:33.000000000 +0800 +++ autofs-4.1.3/modules/mount_nfs.c 2004-06-05 14:17:59.000000000 +0800 @@ -347,7 +347,7 @@ int local, err; int nosymlink = 0; - debug(MODPREFIX " root=%s name=%s what=%s, fstype=%s, options=%s", + debug(MODPREFIX "root=%s name=%s what=%s, fstype=%s, options=%s", root, name, what, fstype, options); whatstr = alloca(strlen(what) + 1); diff -Nur autofs-4.1.3.orig/modules/parse_sun.c autofs-4.1.3/modules/parse_sun.c --- autofs-4.1.3.orig/modules/parse_sun.c 2004-06-05 13:49:33.000000000 +0800 +++ autofs-4.1.3/modules/parse_sun.c 2004-06-05 14:17:59.000000000 +0800 @@ -618,7 +618,7 @@ { struct parse_context *ctxt = (struct parse_context *) context; char *pmapent, *options; - const char *p, *q; + const char *p; int mapent_len, rv; int optlen; @@ -688,6 +688,12 @@ } path = dequote(p, l = chunklen(p, 0)); + if (!path) { + error(MODPREFIX "out of memory"); + free(myoptions); + free(options); + return 1; + } pathlen = strlen(path); p += l; @@ -712,21 +718,11 @@ } while (*p == '-'); } - q = p; - while (*q && *q != '/') { - l = chunklen(q, 1); - q += l; - q = skipspace(q); - } - l = q - p; - - loc = dequote(p, l); - loclen = strlen(loc); - - if (loc == NULL || path == NULL) { + loc = dequote(p, l = chunklen(p, 1)); + if (!loc) { error(MODPREFIX "out of memory"); - free(loc); free(path); + free(myoptions); free(options); return 1; } @@ -734,6 +730,39 @@ p += l; p = skipspace(p); + while (*p && *p != '/') { + char *ent; + + ent = dequote(p, l = chunklen(p, 1)); + if (!ent) { + error(MODPREFIX "out of memory"); + free(path); + free(myoptions); + free(options); + return 1; + } + + loc = realloc(loc, strlen(loc) + l + 2); + if (!loc) { + error(MODPREFIX "out of memory"); + free(ent); + free(path); + free(myoptions); + free(options); + return 1; + } + + strcat(loc, " "); + strcat(loc, ent); + + free(ent); + + p += l; + p = skipspace(p); + } + + loclen = strlen(loc); + debug(MODPREFIX "multimount: %.*s on %.*s with options %s", loclen, loc, pathlen, path, myoptions); @@ -763,15 +792,7 @@ if (*p == ':') p++; /* Sun escape for entries starting with / */ - q = p; - while (*q) { - l = chunklen(q, 1); - q += l; - q = skipspace(q); - } - l = q - p; - - loc = dequote(p, l); + loc = dequote(p, chunklen(p, 1)); loclen = strlen(loc); if (loc == NULL) { and after complains about fsck not working properly I made this patch also. It is very much untested at this stage so handle with care. Call it autofs-4.1.3-fsck_check.patch: diff -Nur autofs-4.1.3.orig/modules/mount_ext2.c autofs-4.1.3/modules/mount_ext2.c --- autofs-4.1.3.orig/modules/mount_ext2.c 2004-05-10 20:44:30.000000000 +0800 +++ autofs-4.1.3/modules/mount_ext2.c 2004-05-30 11:52:51.000000000 +0800 @@ -96,12 +96,22 @@ debug(MODPREFIX "calling %s -p %s", fsck_prog, what); err = spawnl(LOG_DEBUG, MOUNTED_LOCK, fsck_prog, fsck_prog, "-p", what, NULL); } - - if (err & ~6) { - error(MODPREFIX "%s: filesystem needs repair, won't mount", + + if (err & 8) { + warn(MODPREFIX "%s: filesystem is mounted or operational error", + what); + } else if (err & 4) { + warn(MODPREFIX "%s: filesystem errors left uncorrected", what); return 1; - } + } else if (err & 2) { + error(MODPREFIX "%s: filesystem errors left uncorrected, " + "system should be rebooted", + what); + return 1; + } else if (err & ~15) + warn(MODPREFIX "%s: undetermined fsck error.", + what); wait_for_lock(); if (options) { Finally, I lifted this from some initial (now abandoned) work on 4.2.0. It is a module to manage lists of mounts. I'm using it clean up some of the mount handling. I think (???) it's not quite complete yet so it may change a little before 4.1.4. The functions will remain but a couple more may be added and testing it would be good anyway. And for those who have read this far and are wondering about my reluctance to implement automatic map updates. 4.2.0 will eliminate the the non-standard direct mount map handling and allow lazy mounting of multi-mounts maps. LIKE IT OR NOT the method I have finally decided upon will not lend itself to doing dynamic map updates for direct mount maps, save for a periodic map re-read. So it's a cron job for those that need it. This work has waited way to long and MUST be done as a priority. Call it autofs-4.1.3-mounts.patch diff -Nur autofs-4.1.3.orig/daemon/automount.c autofs-4.1.3.mounts/daemon/automount.c --- autofs-4.1.3.orig/daemon/automount.c 2004-04-05 21:14:10.000000000 +0800 +++ autofs-4.1.3.mounts/daemon/automount.c 2004-05-23 14:11:02.000000000 +0800 @@ -243,59 +243,19 @@ int left; struct mntent *mnt; FILE *mtab; - struct mntlist { - const char *path; - const char *fs_type; - struct mntlist *next; - } *mntlist = NULL, *mptr; + struct mnt_list *mntlist = NULL; + struct mnt_list *mptr; size_t pathlen = strlen(path); debug("umount_multi: path=%s incl=%d\n", path, incl); - wait_for_lock(); - mtab = setmntent(_PATH_MOUNTED, "r"); - if (!mtab) { - unlink(AUTOFS_LOCK); - error("umount_multi: setmntent: %m"); - return -1; - } - - /* Construct a list of eligible dirs ordered longest->shortest - so that umount will work */ - while ((mnt = getmntent(mtab)) != NULL) { - size_t len = strlen(mnt->mnt_dir); - struct mntlist *m, **prev; - char *p; - - if ((!incl && len <= pathlen) || - strncmp(mnt->mnt_dir, path, pathlen) != 0) - continue; - - if (len > pathlen && mnt->mnt_dir[pathlen] != '/') - continue; - - prev = &mntlist; - for (mptr = mntlist; mptr != NULL; prev = &mptr->next, mptr = mptr->next) - if (len > strlen(mptr->path)) - break; - - m = alloca(sizeof(*m)); + mntlist = get_mnt_list(path, incl); - p = alloca(len + 1); - strcpy(p, mnt->mnt_dir); - m->path = p; - - p = alloca(strlen(mnt->mnt_type) + 1); - strcpy(p, mnt->mnt_type); - m->fs_type = p; - - m->next = *prev; - *prev = m; + if (!mntlist) { + error("umount_multi: failed to get list of mounts"); + return -1; } - endmntent(mtab); - unlink(AUTOFS_LOCK); - left = 0; for (mptr = mntlist; mptr != NULL; mptr = mptr->next) { debug("umount_multi: unmounting dir=%s\n", mptr->path); @@ -406,7 +366,7 @@ struct stat st; int len; - if ((ap.state != ST_INIT) || is_mounted(path)) { + if ((ap.state != ST_INIT) || is_mounted(MOUNTED, path)) { /* This can happen if an autofs process is already running*/ error("mount_autofs: already mounted"); return -1; diff -Nur autofs-4.1.3.orig/include/automount.h autofs-4.1.3.mounts/include/automount.h --- autofs-4.1.3.orig/include/automount.h 2004-05-18 20:20:08.000000000 +0800 +++ autofs-4.1.3.mounts/include/automount.h 2004-05-23 13:50:22.000000000 +0800 @@ -36,7 +36,7 @@ #define DEFAULT_TIMEOUT (5*60) /* 5 minutes */ #define AUTOFS_LOCK "/var/lock/autofs" /* To serialize access to mount */ -#define MOUNTED_LOCK "_PATH_MOUNTED~" /* mounts' lock file */ +#define MOUNTED_LOCK "MOUNTED~" /* mounts' lock file */ #define MTAB_NOTUPDATED 0x1000 /* mtab succeded but not updated */ #define NOT_MOUNTED 0x0100 /* path notmounted */ @@ -125,7 +125,6 @@ const char *what, const char *fstype, const char *options); int mkdir_path(const char *path, mode_t mode); int rmdir_path(const char *path); -int is_mounted(const char *path); /* Prototype for module functions */ @@ -252,6 +251,22 @@ unsigned int ping_vers, unsigned int ping_proto, long seconds, long micros, double *result); +/* mount table utilities */ +struct mnt_list { + char *path; + char *fs_type; + time_t last_access; + struct mnt_list *next; +}; + +struct mnt_list *get_mnt_list(const char *path, int include); +struct mnt_list *reverse_mnt_list(struct mnt_list *list); +struct mnt_list *get_base_mnt_list(struct mnt_list *list); +void free_mnt_list(struct mnt_list *list); +int is_mounted(const char *table, const char *path); +int has_fstab_option(const char *path, const char *opt); +int allow_owner_mount(const char *); + /* log notification */ extern int do_verbose; extern int do_debug; @@ -273,3 +288,4 @@ syslog(LOG_DEBUG, msg, ##args); #endif + diff -Nur autofs-4.1.3.orig/lib/Makefile autofs-4.1.3.mounts/lib/Makefile --- autofs-4.1.3.orig/lib/Makefile 2004-03-07 20:17:54.000000000 +0800 +++ autofs-4.1.3.mounts/lib/Makefile 2004-05-23 13:19:09.000000000 +0800 @@ -9,13 +9,14 @@ RPCGEN = /usr/bin/rpcgen RANLIB = /usr/bin/ranlib -SRCS = cache.c listmount.c cat_path.c rpc_subs.c +SRCS = cache.c listmount.c cat_path.c rpc_subs.c mounts.c RPCS = mount.h mount_clnt.c mount_xdr.c -OBJS = cache.o mount_clnt.o mount_xdr.o listmount.o cat_path.o rpc_subs.o +OBJS = cache.o mount_clnt.o mount_xdr.o listmount.o \ + cat_path.o rpc_subs.o mounts.o LIB = autofs.a -CFLAGS += -I../include -fpic -D_GNU_SOURCE -DHAVE_TCP_WRAPPER -DNFS3_SUPPORTED +CFLAGS += -I../include -fPIC -D_GNU_SOURCE -DHAVE_TCP_WRAPPER -DNFS3_SUPPORTED .PHONY: all install clean diff -Nur autofs-4.1.3.orig/lib/cache.c autofs-4.1.3.mounts/lib/cache.c --- autofs-4.1.3.orig/lib/cache.c 2004-03-07 20:17:54.000000000 +0800 +++ autofs-4.1.3.mounts/lib/cache.c 2004-05-23 13:45:45.000000000 +0800 @@ -206,7 +206,7 @@ return 0; if (strcmp(key, me->key) == 0) { - if (is_mounted(path)) + if (is_mounted(MOUNTED, path)) return 0; mapent_hash[hashval] = me->next; goto found; @@ -216,7 +216,7 @@ pred = me; me = me->next; if (strcmp(key, me->key) == 0) { - if (is_mounted(path)) + if (is_mounted(MOUNTED, path)) return 0; pred->next = me->next; @@ -253,7 +253,7 @@ sprintf(path, "%s/%s", root, me->key); } - if (is_mounted(path)) + if (is_mounted(MOUNTED, path)) continue; if (me->age < age) { @@ -273,7 +273,7 @@ sprintf(path, "%s/%s", root, me->key); } - if (is_mounted(path)) + if (is_mounted(MOUNTED, path)) continue; if (me->age < age) { @@ -376,7 +376,7 @@ break; case LKP_MOUNT: - if (!is_mounted(gc.direct_base)) { + if (!is_mounted(MOUNTED, gc.direct_base)) { debug("cache_ghost: attempting to mount map, " "key %s", gc.direct_base); @@ -398,39 +398,6 @@ return map; } -int is_mounted(const char *path) -{ - struct mntent *mnt; - FILE *mtab; - int pathlen = strlen(path); - int ret = 0; - - if (!path || !pathlen) - return ret; - - wait_for_lock(); - mtab = setmntent(_PATH_MOUNTED, "r"); - if (!mtab) { - unlink(AUTOFS_LOCK); - error("is_mounted: setmntent: %m"); - return -1; - } - - while ((mnt = getmntent(mtab)) != NULL) { - int len = strlen(mnt->mnt_dir); - - if (pathlen == len && !strncmp(path, mnt->mnt_dir, pathlen)) { - ret = 1; - break; - } - } - - endmntent(mtab); - unlink(AUTOFS_LOCK); - - return ret; -} - static unsigned long ent_check(struct ghost_context *gc, char **pkey, int ghosted) { char *proot = (char *) gc->root; diff -Nur autofs-4.1.3.orig/lib/mounts.c autofs-4.1.3.mounts/lib/mounts.c --- autofs-4.1.3.orig/lib/mounts.c 1970-01-01 08:00:00.000000000 +0800 +++ autofs-4.1.3.mounts/lib/mounts.c 2004-05-23 13:14:04.000000000 +0800 @@ -0,0 +1,323 @@ +#ident "$Id" +/* ----------------------------------------------------------------------- * + * + * mounts.c - module for Linux automount mount table lookup functions + * + * Copyright 2002-2004 Ian Kent <[EMAIL PROTECTED]> - All Rights Reserved + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, Inc., 675 Mass Ave, Cambridge MA 02139, + * USA; either version 2 of the License, or (at your option) any later + * version; incorporated herein by reference. + * + * ----------------------------------------------------------------------- */ + +#include <stdlib.h> +#include <string.h> +#include <unistd.h> +#include <syslog.h> +#include <mntent.h> +#include <limits.h> +#include <sys/types.h> +#include <sys/stat.h> + +#include "automount.h" + +/* + * Get list of mounts under path in longest->shortest order + */ +struct mnt_list *get_mnt_list(const char *path, int include) +{ + FILE *tab; + int pathlen = strlen(path); + struct mntent *mnt; + struct mnt_list *ent, *mptr; + struct mnt_list *list = NULL; + struct stat st; + int len; + + if (!path || !pathlen || pathlen > PATH_MAX) + return NULL; + + tab = setmntent(MOUNTED, "r"); + if (!tab) { + error("get_mntlist: setmntent: %m"); + return NULL; + } + + while ((mnt = getmntent(tab)) != NULL) { + len = strlen(mnt->mnt_dir); + + if ((!include && len <= pathlen) || + strncmp(mnt->mnt_dir, path, pathlen) != 0) + continue; + + /* Not a subdirectory of requested path ? */ + if (len > pathlen && mnt->mnt_dir[pathlen] != '/') + continue; + + mptr = list; + while (mptr) { + if (len > strlen(mptr->path)) + break; + mptr = mptr->next; + } + + ent = malloc(sizeof(*ent)); + if (!ent) { + endmntent(tab); + free_mnt_list(list); + return NULL; + } + + ent->path = malloc(len + 1); + if (!ent->path) { + endmntent(tab); + free_mnt_list(list); + return NULL; + } + strcpy(ent->path, mnt->mnt_dir); + + ent->fs_type = malloc(strlen(mnt->mnt_type) + 1); + if (!ent->fs_type) { + endmntent(tab); + free_mnt_list(list); + return NULL; + } + strcpy(ent->fs_type, mnt->mnt_type); + + if (mptr == list) + list = ent; + + ent->next = mptr; + } + endmntent(tab); + + mptr = list; + while (mptr) { + mptr->last_access = time(NULL); + + if (stat(mptr->path, &st) != -1) + mptr->last_access = st.st_atime; + + mptr = mptr->next; + } + + return list; +} + +/* + * Reverse a list of mounts + */ +struct mnt_list *reverse_mnt_list(struct mnt_list *list) +{ + struct mnt_list *next, *last; + + if (!list) + return NULL; + + next = list; + last = NULL; + while (next) { + struct mnt_list *this = next; + + next = this->next; + this->next = last; + last = this; + } + + return last; +} + +static struct mnt_list *copy_mnt_list_ent(struct mnt_list *ent) +{ + struct mnt_list *new; + int len; + + if (!ent) + return NULL; + + new = malloc(sizeof(*new)); + if (!new) { + return NULL; + } + + if (!ent->path || !ent->fs_type) + return NULL; + + new->path = malloc(strlen(ent->path) + 1); + if (!new->path) { + free(new); + return NULL; + } + strcpy(new->path, ent->path); + + new->fs_type = malloc(strlen(ent->fs_type) + 1); + if (!new->fs_type) { + free(new->path); + free(new); + return NULL; + } + strcpy(new->fs_type, ent->fs_type); + + new->next = NULL; + + return new; +} + +/* + * Get list of mount points that are the base of a mount + * tree (ie. get highest point at which we cross file + * system boundary). Assumes mount list with + * shortest -> longest paths. + */ +struct mnt_list *get_base_mnt_list(struct mnt_list *list) +{ + struct mnt_list *next, *ret = NULL; + char *base; + + if (!list) + return NULL; + + next = list; + base = next->path; + ret = copy_mnt_list_ent(next); + while (next) { + struct mnt_list *this = next; + struct mnt_list *new; + int blen = strlen(base); + int nlen, eq; + + next = this->next; + if (!next) + break; + nlen = strlen(next->path); + + + eq = strncmp(this->path, base, blen); + if (!eq) + continue; + + if (strncmp(this->path, base, blen)) { + if (nlen > blen && next->path[blen + 1] == '/') + continue; + } + + base = this->path; + + new = copy_mnt_list_ent(this); + new->next = ret; + ret = new; + } + + return ret; +} + +void free_mnt_list(struct mnt_list *list) +{ + struct mnt_list *next; + + if (!list) + return; + + next = list; + while (next) { + struct mnt_list *this = next; + + next = this->next; + + if (this->path) + free(this->path); + + if (this->fs_type) + free(this->fs_type); + + free(this); + } +} + +static int find_mntent(const char *table, const char *path, struct mntent *ent) +{ + struct mntent *mnt; + FILE *tab; + int pathlen = strlen(path); + int ret = 0; + + if (!path || !pathlen || pathlen > PATH_MAX) + return 0; + + tab = setmntent(table, "r"); + if (!tab) { + error("find_mntent: setmntent: %m"); + return 0; + } + + while ((mnt = getmntent(tab)) != NULL) { + int len = strlen(mnt->mnt_dir); + + if (pathlen == len && !strncmp(path, mnt->mnt_dir, pathlen)) { + int szent = sizeof(struct mntent); + + if (ent) + memcpy(ent, mnt, szent); + ret = 1; + + break; + } + } + endmntent(tab); + + return ret; +} + +int is_mounted(const char *table, const char *path) +{ + int ret = 0; + + if (find_mntent(table, path, NULL)) + ret = 1; + + return ret; +} + +int has_fstab_option(const char *path, const char *opt) +{ + struct mntent ent; + char *res = NULL; + + if (find_mntent(MNTTAB, path, &ent)) { + if ((res = hasmntopt(&ent, opt))) + return 1; + } + + return 0; +} + +/* + * Check id owner option is present in fstab of requested + * mount. If it is return iowner uid of requested dev. + */ +int allow_owner_mount(const char *path) +{ + struct mntent ent; + int ret = 0; + + if (getuid() || is_mounted(MOUNTED, path)) + return 0; + + if (find_mntent(MNTTAB, path, &ent)) { + struct stat st; + + if (!hasmntopt(&ent, "owner")) + return 0; + + if (stat(ent.mnt_fsname, &st) == -1) + return 0; + + ret = st.st_uid; + } + + return ret; +} + diff -Nur autofs-4.1.3.orig/modules/mount_autofs.c autofs-4.1.3.mounts/modules/mount_autofs.c --- autofs-4.1.3.orig/modules/mount_autofs.c 2004-03-07 20:17:54.000000000 +0800 +++ autofs-4.1.3.mounts/modules/mount_autofs.c 2004-05-23 13:46:47.000000000 +0800 @@ -73,7 +73,7 @@ debug(MODPREFIX "fullpath=%s what=%s options=%s", fullpath, what, options); - if (is_mounted(fullpath)) { + if (is_mounted(MOUNTED, fullpath)) { warn("BUG: about to mount over %s, continuing", fullpath); return 0; } diff -Nur autofs-4.1.3.orig/modules/mount_bind.c autofs-4.1.3.mounts/modules/mount_bind.c --- autofs-4.1.3.orig/modules/mount_bind.c 2004-05-10 20:44:30.000000000 +0800 +++ autofs-4.1.3.mounts/modules/mount_bind.c 2004-05-23 13:47:11.000000000 +0800 @@ -116,7 +116,7 @@ return 1; } - if (is_mounted(fullpath)) { + if (is_mounted(MOUNTED, fullpath)) { warn("BUG: %s already mounted", fullpath); return 0; } diff -Nur autofs-4.1.3.orig/modules/mount_ext2.c autofs-4.1.3.mounts/modules/mount_ext2.c --- autofs-4.1.3.orig/modules/mount_ext2.c 2004-05-10 20:44:30.000000000 +0800 +++ autofs-4.1.3.mounts/modules/mount_ext2.c 2004-05-23 13:48:04.000000000 +0800 @@ -68,7 +68,7 @@ return 1; } - if (is_mounted(fullpath)) { + if (is_mounted(MOUNTED, fullpath)) { error("BUG: %s already mounted", fullpath); return 0; } diff -Nur autofs-4.1.3.orig/modules/mount_generic.c autofs-4.1.3.mounts/modules/mount_generic.c --- autofs-4.1.3.orig/modules/mount_generic.c 2004-05-10 20:44:30.000000000 +0800 +++ autofs-4.1.3.mounts/modules/mount_generic.c 2004-05-23 13:48:28.000000000 +0800 @@ -66,7 +66,7 @@ return 1; } - if (is_mounted(fullpath)) { + if (is_mounted(MOUNTED, fullpath)) { error("BUG: %s already mounted", fullpath); return 0; } diff -Nur autofs-4.1.3.orig/modules/mount_nfs.c autofs-4.1.3.mounts/modules/mount_nfs.c --- autofs-4.1.3.orig/modules/mount_nfs.c 2004-05-18 20:20:08.000000000 +0800 +++ autofs-4.1.3.mounts/modules/mount_nfs.c 2004-05-23 13:48:48.000000000 +0800 @@ -440,7 +440,7 @@ return 1; } - if (is_mounted(fullpath)) { + if (is_mounted(MOUNTED, fullpath)) { error("BUG: %s already mounted", fullpath); return 0; } _______________________________________________ autofs mailing list [EMAIL PROTECTED] http://linux.kernel.org/mailman/listinfo/autofs
