dovecot-1.0: Removed special autofs check. Instead check ignore ...
dovecot at dovecot.org
dovecot at dovecot.org
Thu Jul 19 00:28:43 EEST 2007
details: http://hg.dovecot.org/dovecot-1.0/rev/89184bad9d10
changeset: 5353:89184bad9d10
user: Timo Sirainen <tss at iki.fi>
date: Thu Jul 19 00:22:56 2007 +0300
description:
Removed special autofs check. Instead check ignore mount option correctly.
Also check swap correctly.
diffstat:
1 file changed, 6 insertions(+), 8 deletions(-)
src/lib/mountpoint.c | 14 ++++++--------
diffs (38 lines):
diff -r 0630d47a2c1d -r 89184bad9d10 src/lib/mountpoint.c
--- a/src/lib/mountpoint.c Wed Jul 18 06:26:55 2007 +0300
+++ b/src/lib/mountpoint.c Thu Jul 19 00:22:56 2007 +0300
@@ -19,6 +19,7 @@
#elif defined(HAVE_SYS_MNTTAB_H)
# include <stdio.h>
# include <sys/mnttab.h> /* Solaris */
+# include <sys/mntent.h>
#else
# define MOUNTPOINT_UNKNOWN
#endif
@@ -37,11 +38,6 @@
# 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)
{
@@ -101,9 +97,11 @@ int mountpoint_get(const char *path, poo
return -1;
}
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)
+ if (hasmntopt(&ent, MNTOPT_IGNORE) != NULL)
+ continue;
+
+ /* mnt_type contains tmpfs with swap */
+ if (strcmp(ent.mnt_special, MNTTYPE_SWAP) == 0)
continue;
if (stat(ent.mnt_mountp, &st2) == 0 &&
More information about the dovecot-cvs
mailing list