[packages/nagios] Rel 5; more privacy (do-not-fetch-rss.patch merged into remove-information-leak.patch)
arekm
arekm at pld-linux.org
Thu Aug 1 13:19:59 CEST 2024
commit 56a5580f04dfa03f2c3ea7a14751b48af73ac7d9
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date: Thu Aug 1 12:25:31 2024 +0200
Rel 5; more privacy (do-not-fetch-rss.patch merged into remove-information-leak.patch)
do-not-fetch-rss.patch | 37 ---------------------------
nagios.spec | 5 ++--
remove-information-leak.patch | 58 ++++++++++++++++++++++++++++++++-----------
3 files changed, 46 insertions(+), 54 deletions(-)
---
diff --git a/nagios.spec b/nagios.spec
index 574726f..75aebe0 100644
--- a/nagios.spec
+++ b/nagios.spec
@@ -13,7 +13,7 @@ Summary(pl.UTF-8): Program do monitorowania serwerów/usług/sieci
Summary(pt_BR.UTF-8): Programa para monitoração de máquinas e serviços
Name: nagios
Version: 4.5.3
-Release: 4
+Release: 5
License: GPL v2+
Group: Networking
# https://www.nagios.org/downloads/nagios-core/thanks/?product_download=nagioscore-source
@@ -43,11 +43,11 @@ Patch4: %{name}-cmd-typo.patch
Patch5: config.patch
Patch6: %{name}-googlemap.patch
# rediffed and fixed contrib/epel-patches/nagios-0010-remove-information-leak.patch
+# + disabling checks related to update_checks_enabled
Patch7: remove-information-leak.patch
Patch8: archivelog-timeformat.patch
Patch10: system-jquery.patch
-Patch11: do-not-fetch-rss.patch
URL: https://www.nagios.org/projects/nagios-core/
BuildRequires: autoconf
BuildRequires: automake
@@ -265,7 +265,6 @@ mv %{name}-%{version}/* .
%patch8 -p1
%patch10 -p1
-%patch11 -p1
find -name .cvsignore -o -name .gitignore | xargs rm
diff --git a/do-not-fetch-rss.patch b/do-not-fetch-rss.patch
deleted file mode 100644
index 361570b..0000000
--- a/do-not-fetch-rss.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-do not fetch rss automatically, respect some privacy!
-
-use update_checks_enabled option to tune the default (altho new option would be
-more reasonable)
-
-diff -urNp -x '*.orig' nagios-4.4.6.org/html/main.php nagios-4.4.6/html/main.php
---- nagios-4.4.6.org/html/main.php 2021-04-19 12:04:15.360473328 +0200
-+++ nagios-4.4.6/html/main.php 2021-04-19 12:04:15.620481061 +0200
-@@ -19,6 +19,10 @@ $this_year = '2022';
-
- <script type='text/javascript'>
- var cookie;
-+<?php
-+ $updateinfo=get_update_information();
-+ if ($updateinfo['update_checks_enabled']!==false):
-+?>
- $(document).ready(function() {
- loadRemoteFeed( // Our top banner splash.
- '#splashbox0-contents', 'corebanner', 1,
-@@ -37,6 +41,7 @@ $this_year = '2022';
-
- getCoreStatus();
- });
-+<?php endif ?>
-
- // Fetch an RSS feed and format HTML for the first n items.
- function loadRemoteFeed(id, name, n, prefix, formatter, suffix) {
-@@ -125,7 +130,8 @@ $this_year = '2022';
-
- <div id="updateversioninfo">
- <?php
-- $updateinfo = get_update_information();
-+ // $updateinfo = get_update_information();
-+ $updateinfo['update_checks_enabled'] = false;
- if (!$updateinfo['update_checks_enabled']) {
- ?>
- <div class="updatechecksdisabled">
diff --git a/remove-information-leak.patch b/remove-information-leak.patch
index b1a1f49..d9b9633 100644
--- a/remove-information-leak.patch
+++ b/remove-information-leak.patch
@@ -1,6 +1,6 @@
-diff -urN nagios-4.5.3.org/cgi/extinfo.c nagios-4.5.3/cgi/extinfo.c
+diff -ur nagios-4.5.3.org/cgi/extinfo.c nagios-4.5.3/cgi/extinfo.c
--- nagios-4.5.3.org/cgi/extinfo.c 2024-06-11 16:50:20.000000000 +0200
-+++ nagios-4.5.3/cgi/extinfo.c 2024-08-01 10:36:50.536637843 +0200
++++ nagios-4.5.3/cgi/extinfo.c 2024-08-01 12:11:08.706637661 +0200
@@ -557,27 +557,6 @@
printf("<LINK REL='stylesheet' TYPE='text/css' HREF='%s%s'>\n", url_stylesheets_path, NAGFUNCS_CSS);
}
@@ -29,9 +29,9 @@ diff -urN nagios-4.5.3.org/cgi/extinfo.c nagios-4.5.3/cgi/extinfo.c
printf("</head>\n");
printf("<body CLASS='extinfo'>\n");
-diff -urN nagios-4.5.3.org/cgi/status.c nagios-4.5.3/cgi/status.c
+diff -ur nagios-4.5.3.org/cgi/status.c nagios-4.5.3/cgi/status.c
--- nagios-4.5.3.org/cgi/status.c 2024-06-11 16:50:20.000000000 +0200
-+++ nagios-4.5.3/cgi/status.c 2024-08-01 10:36:50.539971176 +0200
++++ nagios-4.5.3/cgi/status.c 2024-08-01 12:11:08.709970995 +0200
@@ -556,31 +556,8 @@
/* JS function to append content to elements on page */
printf("<script type='text/javascript'>\n");
@@ -64,9 +64,9 @@ diff -urN nagios-4.5.3.org/cgi/status.c nagios-4.5.3/cgi/status.c
printf("});\n");
}
printf("function set_limit(url) { \nthis.location = url+'&limit='+$('#limit').val();\n }\n");
-diff -urN nagios-4.5.3.org/cgi/tac.c nagios-4.5.3/cgi/tac.c
+diff -ur nagios-4.5.3.org/cgi/tac.c nagios-4.5.3/cgi/tac.c
--- nagios-4.5.3.org/cgi/tac.c 2024-06-11 16:50:20.000000000 +0200
-+++ nagios-4.5.3/cgi/tac.c 2024-08-01 10:36:50.539971176 +0200
++++ nagios-4.5.3/cgi/tac.c 2024-08-01 12:11:08.709970995 +0200
@@ -308,17 +308,7 @@
if (enable_page_tour == TRUE) {
@@ -86,10 +86,10 @@ diff -urN nagios-4.5.3.org/cgi/tac.c nagios-4.5.3/cgi/tac.c
-diff -urN nagios-4.5.3.org/html/main.php nagios-4.5.3/html/main.php
+diff -ur nagios-4.5.3.org/html/main.php nagios-4.5.3/html/main.php
--- nagios-4.5.3.org/html/main.php 2024-06-11 16:50:20.000000000 +0200
-+++ nagios-4.5.3/html/main.php 2024-08-01 10:36:50.539971176 +0200
-@@ -19,20 +19,7 @@
++++ nagios-4.5.3/html/main.php 2024-08-01 12:21:25.903304305 +0200
+@@ -19,35 +19,7 @@
<script type='text/javascript'>
var cookie;
@@ -107,10 +107,25 @@ diff -urN nagios-4.5.3.org/html/main.php nagios-4.5.3/html/main.php
- vbox = new vidbox({pos:'lr',vidurl:'https://www.youtube.com/embed/2hVBAet-XpY',
- text:vboxText,vidid:vBoxId});
- <?php } ?>
- loadRemoteFeed( // Our top banner splash.
- '#splashbox0-contents', 'corebanner', 1,
- '', processBannerItem, ''
-@@ -59,7 +46,6 @@
+- loadRemoteFeed( // Our top banner splash.
+- '#splashbox0-contents', 'corebanner', 1,
+- '', processBannerItem, ''
+- );
+-
+- loadRemoteFeed( // "Latest News"
+- '#splashbox4-contents', 'frontpage', 3,
+- '<ul>', processNewsItem, '<li><a href="https://www.nagios.org/news" target="_blank">More news...</a></li></ul>'
+- );
+-
+- loadRemoteFeed( // "Don't Miss..."
+- '#splashbox5-contents', 'corepromo', 3,
+- '<ul>', processPromoItem, '</ul>'
+- );
+-
+ getCoreStatus();
+ });
+
+@@ -59,7 +31,6 @@
crossDomain: true,
success: function(d, status, jqXHR) {
// We should have Internet access, set the playlist HTML.
@@ -118,7 +133,7 @@ diff -urN nagios-4.5.3.org/html/main.php nagios-4.5.3/html/main.php
var text = ''; // Start with empty text by default.
-@@ -94,19 +80,6 @@
+@@ -94,19 +65,6 @@
: '';
}
@@ -138,3 +153,18 @@ diff -urN nagios-4.5.3.org/html/main.php nagios-4.5.3/html/main.php
// Get the daemon status JSON.
function getCoreStatus() {
setCoreStatusHTML('passiveonly', 'Checking process status...');
+@@ -152,12 +110,11 @@
+
+ <div id="updateversioninfo">
+ <?php
+- $updateinfo = get_update_information();
+- if (!$updateinfo['update_checks_enabled']) {
++ if (1 || !$updateinfo['update_checks_enabled']) {
+ ?>
+ <div class="updatechecksdisabled">
+ <div class="warningmessage">Warning: Automatic Update Checks are Disabled!</div>
+- <div class="submessage">Disabling update checks presents a possible security risk. Visit <a href="https://www.nagios.org/" target="_blank">nagios.org</a> to check for updates manually or enable update checks in your Nagios config file.</a></div>
++ <div class="submessage">Disabling update checks presents a possible security risk. Visit <a href="https://www.nagios.org/" target="_blank">nagios.org</a> to check for updates manually.</a></div>
+ </div>
+ <?php
+ } else if (
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/nagios.git/commitdiff/56a5580f04dfa03f2c3ea7a14751b48af73ac7d9
More information about the pld-cvs-commit
mailing list