summaryrefslogtreecommitdiffstats
path: root/web/attachments/345604-check_mount_opts.patch
blob: c2b517cd78e812531f957696bb8f9701546fa517 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
diff -rupN nagios-plugins-1.4.14.orig/gl/mountlist.c nagios-plugins-1.4.14/gl/mountlist.c
--- nagios-plugins-1.4.14.orig/gl/mountlist.c	2009-05-21 23:11:51.000000000 +0200
+++ nagios-plugins-1.4.14/gl/mountlist.c	2009-10-07 10:57:16.000000000 +0200
@@ -156,6 +156,11 @@
      || strcmp (Fs_type, "ignore") == 0)
 #endif
 
+#ifndef ME_DUMMY_OPTS
+# define ME_DUMMY_OPTS(mount_options) \
+(strstr(mount_options, ",bind"))
+#endif
+
 #ifndef ME_REMOTE
 /* A file system is `remote' if its Fs_name contains a `:'
    or if (it is of type (smbfs or cifs) and its Fs_name starts with `//').  */
@@ -388,7 +393,11 @@ read_file_system_list (bool need_fs_type
 	me->me_mountdir = xstrdup (mnt->mnt_dir);
 	me->me_type = xstrdup (mnt->mnt_type);
 	me->me_type_malloced = 1;
+        #ifndef __linux__
 	me->me_dummy = ME_DUMMY (me->me_devname, me->me_type);
+        #else
+	me->me_dummy = ME_DUMMY (me->me_devname, me->me_type) || ME_DUMMY_OPTS(mnt->mnt_opts);
+        #endif
 	me->me_remote = ME_REMOTE (me->me_devname, me->me_type);
 	me->me_dev = dev_from_mount_options (mnt->mnt_opts);