dovecot-1.0: Skip over autofs entries. Patch by Mike Brudenell

dovecot at dovecot.org dovecot at dovecot.org
Tue Jul 17 20:39:31 EEST 2007


details:   http://hg.dovecot.org/dovecot-1.0/rev/bb7d6acd625f
changeset: 5349:bb7d6acd625f
user:      Timo Sirainen <tss at iki.fi>
date:      Tue Jul 17 20:39:27 2007 +0300
description:
Skip over autofs entries. Patch by Mike Brudenell

diffstat:

1 file changed, 7 insertions(+)
src/lib/mountpoint.c |    7 +++++++

diffs (24 lines):

diff -r ed5b09997b54 -r bb7d6acd625f src/lib/mountpoint.c
--- a/src/lib/mountpoint.c	Sun Jul 15 22:32:06 2007 +0300
+++ b/src/lib/mountpoint.c	Tue Jul 17 20:39:27 2007 +0300
@@ -35,6 +35,12 @@
 #endif
 #ifndef MNTTYPE_IGNORE
 #  define MNTTYPE_IGNORE "ignore"
+#endif
+
+/* autofs mounts will show two entries. First for autofs and second for the
+   actual filesystem type. We want the second one. */
+#ifndef MNTTYPE_AUTOFS
+#  define MNTTYPE_AUTOFS "autofs"
 #endif
 
 int mountpoint_get(const char *path, pool_t pool, struct mountpoint *point_r)
@@ -96,6 +102,7 @@ int mountpoint_get(const char *path, poo
 	}
 	while ((getmntent(f, &ent)) == 0) {
 		if (strcmp(ent.mnt_fstype, MNTTYPE_SWAP) == 0 ||
+		    strcmp(ent.mnt_fstype, MNTTYPE_AUTOFS) == 0 ||
 		    strcmp(ent.mnt_fstype, MNTTYPE_IGNORE) == 0)
 			continue;
 


More information about the dovecot-cvs mailing list