[Nagiosplug-devel] Fwd: Coreutils bug? (was: [Nagiosplug-checkins] SF.net SVN: nagiosplug: [1848] nagiosplug/trunk)
Ton Voon
ton.voon at altinity.com
Mon Dec 10 16:04:59 CET 2007
Thomas,
Saw this commit. I find it hard to believe that gnulib is wrong. Is
this how df.c works in coreutils? Maybe I missed something when I was
duplicating the df code.
Alternatively, maybe we should do a sync with gnulib? Any volunteers?
I'm happy to go through it with someone and we can put an entry in
nagiosplugins.org while we do it.
Ton
Begin forwarded message:
> From: dermoth at users.sourceforge.net
> Date: 8 December 2007 16:34:20 GMT
> To: nagiosplug-checkins at lists.sourceforge.net
> Subject: [Nagiosplug-checkins] SF.net SVN: nagiosplug: [1848]
> nagiosplug/trunk
> Reply-To: nagiosplug-devel at lists.sourceforge.net
>
> Revision: 1848
> http://nagiosplug.svn.sourceforge.net/nagiosplug/?rev=1848&view=rev
> Author: dermoth
> Date: 2007-12-08 08:34:05 -0800 (Sat, 08 Dec 2007)
>
> Log Message:
> -----------
> Fix check_disk reporting OK if disk usage grows over 100% (bug
> #1348746).
>
> Modified Paths:
> --------------
> nagiosplug/trunk/NEWS
> nagiosplug/trunk/plugins/check_disk.c
>
> Modified: nagiosplug/trunk/NEWS
> ===================================================================
> --- nagiosplug/trunk/NEWS 2007-12-04 12:57:35 UTC (rev 1847)
> +++ nagiosplug/trunk/NEWS 2007-12-08 16:34:05 UTC (rev 1848)
> @@ -13,6 +13,8 @@
> Merge two new checks that deprecates check_ntp: check_ntp_peer and
> check_ntp_time.
> You should read the --help output so see which one is suitable
> for you. check_ntp_peer
> implement stratum thresholds support (feature request #1703823).
> + Fix check_disk reporting OK if disk usage grows over 100% (bug
> #1348746).
> + The problem happens to be in Gnulib but a workaround have been
> implemented in check_disk.c
>
> 1.4.10 28th September 2007
> Fix check_http buffer overflow vulnerability when following HTTP
> redirects
>
> Modified: nagiosplug/trunk/plugins/check_disk.c
> ===================================================================
> --- nagiosplug/trunk/plugins/check_disk.c 2007-12-04 12:57:35 UTC
> (rev 1847)
> +++ nagiosplug/trunk/plugins/check_disk.c 2007-12-08 16:34:05 UTC
> (rev 1848)
> @@ -307,10 +307,17 @@
>
> if (fsp.fsu_blocks && strcmp ("none", me->me_mountdir)) {
> total = fsp.fsu_blocks;
> - available = fsp.fsu_bavail;
> + /* 2007-12-08 - Workaround for Gnulib reporting insanely high
> available
> + * space on BSD (the actual value should be negative but
> fsp.fsu_bavail
> + * is unsigned) */
> + available = fsp.fsu_bavail > fsp.fsu_bfree ? 0 :
> fsp.fsu_bavail;
> available_to_root = fsp.fsu_bfree;
> used = total - available_to_root;
>
> + if (verbose >= 3)
> + printf ("For %s, total=%llu, available=%llu,
> available_to_root=%llu, used=%llu, fsp.fsu_files=%llu, fsp.fsu_ffree=
> %llu\n",
> + me->me_mountdir, total, available, available_to_root, used,
> fsp.fsu_files, fsp.fsu_ffree);
> +
> dused_pct = calculate_percent( used, used + available ); /*
> used + available can never be > uintmax */
>
> dfree_pct = 100 - dused_pct;
>
>
> This was sent by the SourceForge.net collaborative development
> platform, the world's largest Open Source development site.
>
> -------------------------------------------------------------------------
> SF.Net email is sponsored by:
> Check out the new SourceForge.net Marketplace.
> It's the best place to buy or sell services for
> just about anything Open Source.
> http://sourceforge.net/services/buy/index.php
> _______________________________________________
> Nagiosplug-checkins mailing list
> Nagiosplug-checkins at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nagiosplug-checkins
http://www.altinity.com
UK: +44 (0)870 787 9243
US: +1 866 879 9184
Fax: +44 (0)845 280 1725
Skype: tonvoon
More information about the Devel
mailing list