dovecot: Skip over autofs entries. Patch by Mike Brudenell

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


details:   http://hg.dovecot.org/dovecot/rev/3887591e7a54
changeset: 6039:3887591e7a54
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 cadb5b7cd919 -r 3887591e7a54 src/lib/mountpoint.c
--- a/src/lib/mountpoint.c	Mon Jul 16 10:21:56 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