summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: e77ddaf)
raw | patch | inline | side by side (parent: e77ddaf)
author | Thomas Guyot-Sionnest <dermoth@users.sourceforge.net> | |
Wed, 19 Nov 2008 05:59:22 +0000 (05:59 +0000) | ||
committer | Thomas Guyot-Sionnest <dermoth@users.sourceforge.net> | |
Wed, 19 Nov 2008 05:59:22 +0000 (05:59 +0000) |
NB: There's a memory leak here - properly freeing the mount list would invlove
much more work - there's many other places where leaks can happen so it
should be a project on its own.
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@2085 f882894a-f735-0410-b71e-b25c423dba1c
much more work - there's many other places where leaks can happen so it
should be a project on its own.
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@2085 f882894a-f735-0410-b71e-b25c423dba1c
NEWS | patch | blob | history | |
THANKS.in | patch | blob | history | |
lib/utils_disk.c | patch | blob | history | |
plugins/check_disk.c | patch | blob | history |
index 438ab675d21780ed418393a4d4e34f62342f891d..5149f913a8a8ec5ca53554c5046edbb7c30f5511 100644 (file)
--- a/NEWS
+++ b/NEWS
Add missing long options for check_nt (for use with extra-opts)
check_icmp now reports min and max round trip time perfdata (Steve Rader)
Fixed bug where additional headers with redirection caused a segfault (Dieter Van de Walle - 2089159)
+ check_disk: make autofs mount paths specified with -p before we determing the mount list (Erik Welch)
1.4.13 25th Sept 2008
Fix Debian bug #460097: check_http --max-age broken (Hilko Bengen)
diff --git a/THANKS.in b/THANKS.in
index 072cff054750f58aa4b0fbde20f1cf00ceb23d2b..7784be9add611cc7efe300c561a98c017897b63a 100644 (file)
--- a/THANKS.in
+++ b/THANKS.in
Steve Rader
Dieter Van de Walle
Jan Lipphaus
+Erik Welch
diff --git a/lib/utils_disk.c b/lib/utils_disk.c
index e22d66807176cb7a37e11aa7f0074599ea556c74..3ce4d47d1d8797bf51da93056d8502e4c56a130d 100644 (file)
--- a/lib/utils_disk.c
+++ b/lib/utils_disk.c
struct parameter_list *
np_del_parameter(struct parameter_list *item, struct parameter_list *prev)
{
- struct parameter_list *next;
- if (item->name_next)
- next = item->name_next;
- else
- next = NULL;
+ struct parameter_list *next;
-
- free(item);
- if (prev)
- prev->name_next = next;
+ if (item->name_next)
+ next = item->name_next;
+ else
+ next = NULL;
- return next;
+ free(item);
+ if (prev)
+ prev->name_next = next;
+ return next;
}
diff --git a/plugins/check_disk.c b/plugins/check_disk.c
index 2f8afa6c90e62bc0d982330611020d620ca9112e..f0950c95762710dc33971555c050f56de7e3b673 100644 (file)
--- a/plugins/check_disk.c
+++ b/plugins/check_disk.c
#pragma alloca
#endif
-/* Linked list of mounted filesystems. */
-static struct mount_entry *mount_list;
-
int process_arguments (int, char **);
void print_path (const char *mypath);
void set_all_thresholds (struct parameter_list *path);
}
se->group = group;
set_all_thresholds(se);
- np_set_best_match(se, mount_list, exact_match);
+
+ /* With autofs, it is required to stat() the path before populating the mount_list */
stat_path(se);
+ mount_list = read_file_system_list (0);
+ np_set_best_match(se, mount_list, exact_match);
+
path_selected = TRUE;
break;
case 'x': /* exclude path or partition */
case 'C':
/* add all mount entries to path_select list if no partitions have been explicitly defined using -p */
if (path_selected == FALSE) {
- struct mount_entry *me;
struct parameter_list *path;
for (me = mount_list; me; me = me->me_next) {
if (! (path = np_find_parameter(path_select_list, me->me_mountdir)))