From f1616f8b49c78fcc40f195451219200120ddecb4 Mon Sep 17 00:00:00 2001 From: "John C. Frickson" Date: Thu, 23 Feb 2017 13:23:02 -0600 Subject: [PATCH] Revert "Replaced basic authentication with form authentication" This reverts commit fc00b01895d234428ff64d877fac0a751478dc2a. --- .gitignore | 1 - UPGRADING | 7 -- configure | 27 +------ configure.ac | 15 +--- html/Makefile.in | 3 +- html/histogram.html | 1 - html/images/corelogo.gif | Bin 5657 -> 0 bytes html/index.php.in | 2 +- html/js/config.js.in | 2 - html/js/histogram.js | 2 +- html/js/jsonquery.js | 10 +-- html/js/map.js | 2 +- html/js/trends.js | 2 +- html/jsonquery.html | 1 - html/login.html | 39 ---------- html/map-form.html | 2 +- html/map-links.html | 6 +- html/map.php | 4 +- html/side.php | 1 - html/trends.html | 1 - sample-config/httpd.conf.in | 144 ++++++++++++++---------------------- subst.in | 2 - update-version | 3 +- 23 files changed, 76 insertions(+), 201 deletions(-) delete mode 100644 html/images/corelogo.gif delete mode 100644 html/js/config.js.in delete mode 100644 html/login.html diff --git a/.gitignore b/.gitignore index 685efb6ef..4bb5c7ac5 100644 --- a/.gitignore +++ b/.gitignore @@ -40,4 +40,3 @@ html/angularjs/ui-utils-0.2.1 html/bootstrap-3.3.0 html/d3 html/index.php -html/js/config.js diff --git a/UPGRADING b/UPGRADING index 5ff92d9e3..4ca573c97 100644 --- a/UPGRADING +++ b/UPGRADING @@ -10,13 +10,6 @@ note that this functionality has been disabled by default in this release. If you still want to use it, run ./configure with the parameter --enable-corewindow -The Nagios core web pages now have a login page and a "Logout" button -in the "General" section of the side menu bar. To enable these new -features, you must update the apache configuration file for Nagios -(nagios.conf) either by running `make install-webconf` or copying the -appropriate sections from `sample-config/nagios.cfg` and include the -session, session_cookie, and session_crypto apache modules. - nagios-3.0 ---------- diff --git a/configure b/configure index b78556249..add520cc9 100755 --- a/configure +++ b/configure @@ -624,7 +624,6 @@ enable_option_checking=no ac_subst_vars='LTLIBOBJS LIBOBJS PERL -apachepw USE_EVENTBROKER INITDIR BASEEXTRALIBS @@ -645,7 +644,6 @@ MOD_LDFLAGS MOD_CFLAGS BROKERLIBS BROKER_LDFLAGS -cgi2url cgiurl htmurl COREWINDOW @@ -749,7 +747,6 @@ with_gd_inc enable_corewindow enable_statusmap enable_statuswrl -with_cgi2url with_cgiurl with_htmurl enable_nanosleep @@ -1413,12 +1410,9 @@ Optional Packages: poll, or select --with-gd-lib=DIR sets location of the gd library --with-gd-inc=DIR sets location of the gd include files - --with-cgi2url= - sets URL for scripts calling cgi programs - defaults - to /nagios/cgi-bin (do not use a trailing slash) --with-cgiurl= - sets URL for cgi programs - defaults to - /nagios/cgibin (do not use a trailing slash) + sets URL for cgi programs (do not use a trailing + slash) --with-htmurl= sets URL for public html @@ -5466,20 +5460,11 @@ _ACEOF fi -# Check whether --with-cgi2url was given. -if test "${with_cgi2url+set}" = set; then : - withval=$with_cgi2url; cgi2url=$withval -else - cgi2url=/nagios/cgi-bin - -fi - - # Check whether --with-cgiurl was given. if test "${with_cgiurl+set}" = set; then : withval=$with_cgiurl; cgiurl=$withval else - cgiurl=/nagios/cgibin + cgiurl=/nagios/cgi-bin fi @@ -5495,7 +5480,6 @@ fi - USE_NANOSLEEP=yes # Check whether --enable-nanosleep was given. if test "${enable_nanosleep+set}" = set; then : @@ -5905,9 +5889,6 @@ fi -apachepw=`echo "$$ \`date\`" | md5sum | cut -d' ' -f1` - - # Extract the first word of "perl", so it can be a program name with args. set dummy perl; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 @@ -7389,8 +7370,6 @@ echo " ------------------------" { $as_echo "$as_me:${as_lineno-$LINENO}: result: HTML URL: http://localhost$htmurl/" >&5 $as_echo " HTML URL: http://localhost$htmurl/" >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: CGI URL for Scripts: http://localhost$cgi2url/" >&5 -$as_echo " CGI URL for Scripts: http://localhost$cgi2url/" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: CGI URL: http://localhost$cgiurl/" >&5 $as_echo " CGI URL: http://localhost$cgiurl/" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: Traceroute (used by WAP): $PATH_TO_TRACEROUTE" >&5 diff --git a/configure.ac b/configure.ac index 41f39ccd6..b46e62db1 100644 --- a/configure.ac +++ b/configure.ac @@ -550,17 +550,11 @@ if test x$TRYGD = xyep; then fi fi -AC_ARG_WITH(cgi2url, - AC_HELP_STRING([--with-cgi2url=], - [sets URL for scripts calling cgi programs - defaults to /nagios/cgi-bin (do not use a trailing slash)]), - cgi2url=$withval, - cgi2url=/nagios/cgi-bin -) AC_ARG_WITH(cgiurl, AC_HELP_STRING([--with-cgiurl=], - [sets URL for cgi programs - defaults to /nagios/cgibin (do not use a trailing slash)]), + [sets URL for cgi programs (do not use a trailing slash)]), cgiurl=$withval, - cgiurl=/nagios/cgibin + cgiurl=/nagios/cgi-bin ) AC_ARG_WITH(htmurl, AC_HELP_STRING([--with-htmurl=], @@ -570,7 +564,6 @@ AC_ARG_WITH(htmurl, ) AC_SUBST(htmurl) AC_SUBST(cgiurl) -AC_SUBST(cgi2url) USE_NANOSLEEP=yes AC_ARG_ENABLE(nanosleep, @@ -791,9 +784,6 @@ AC_SUBST(BASEEXTRALIBS) AC_SUBST(INITDIR) AC_SUBST(USE_EVENTBROKER) -apachepw=`echo "$$ \`date\`" | md5sum | cut -d' ' -f1` -AC_SUBST(apachepw) - AC_PATH_PROG(PERL,perl) if test -z "$PERL"; then AC_MSG_ERROR([Cannot continue without perl!]) @@ -863,7 +853,6 @@ echo " Web Interface Options:" echo " ------------------------" AC_MSG_RESULT([ HTML URL: http://localhost$htmurl/]) -AC_MSG_RESULT([ CGI URL for Scripts: http://localhost$cgi2url/]) AC_MSG_RESULT([ CGI URL: http://localhost$cgiurl/]) AC_MSG_RESULT([ Traceroute (used by WAP): $PATH_TO_TRACEROUTE]) diff --git a/html/Makefile.in b/html/Makefile.in index cee9536f0..60b7ef3a9 100644 --- a/html/Makefile.in +++ b/html/Makefile.in @@ -39,7 +39,7 @@ clean: rm -rf d3 distclean: clean - rm -f Makefile config.inc.php index.php + rm -f Makefile config.inc.php devclean: distclean @@ -74,7 +74,6 @@ install: rm -f $(DESTDIR)$(HTMLDIR)/rss-* rm -rf $(DESTDIR)$(HTMLDIR)/include/rss $(INSTALL) -m 664 $(INSTALL_OPTS) jsonquery.html $(DESTDIR)$(HTMLDIR) - $(INSTALL) -m 664 $(INSTALL_OPTS) login.html $(DESTDIR)$(HTMLDIR) # New graphical CGI pages $(INSTALL) -m 664 $(INSTALL_OPTS) graph-header.html $(DESTDIR)$(HTMLDIR) $(INSTALL) -m 664 $(INSTALL_OPTS) histogram.html $(DESTDIR)$(HTMLDIR) diff --git a/html/histogram.html b/html/histogram.html index df8162560..2ebb3bd56 100644 --- a/html/histogram.html +++ b/html/histogram.html @@ -21,7 +21,6 @@ src="angularjs/ui-utils-0.2.1/ui-utils.js"> - diff --git a/html/images/corelogo.gif b/html/images/corelogo.gif deleted file mode 100644 index 70f7839ebad943d13915627de7c267143d1945bf..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5657 zcmbW3iCa_Wy2ZaeW@qF}K*j(GBoYB7GNY(F3<8Q61RQA%h!rOciVA9V6T+aN21J}t z1ELj04LIRY4TB2e5OAnk)PN)EIgMU>YI|F}o`2!4f8c$dcdhk%R$Rj5@Q93lkOIQ79CnMve0I_4V`f^Y`~3J$m$*F=GM(0+dSS*s)^+0|SGCf`WsCLqbAALqo&D z!otJDBO)TkjT<+9{P@Vo$O#iBOq@7z(xgc=O{-L@sHmvu=;)Z3nAq6Z$&)9?#l^+P z$0sBtOqnue>eQ);iHXyuO-o8jnm&EHTCGk_PM$GiMoLObYHDg)TH4H+GiS}3HGB5# zIdkUBojZ5lym{&A>EC_#-S^*rKY#vwjYgA^k&&61xnRM9tgNhs3m5+I!w-uVEy~W$ zUc7kmk|j%)E?v58*|O!!m*?cty{N#{rU|XHvIVGj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B>dEm%8v7|=h z6V!q{hQfA;R_7tp74WIGYj5aWl%ddO4*WZi4}aWOD=${x048+gKKRnQczaxiSTUt> zL+D5-e`0P=LXj+nolm1_fk^F)9%a>x@gsy)*6s-}u?~~Kq9xX_)g9^bwOm#TDETU( z?lpp^-3#Svxu5JdC+c=mASSGwpELu>`rGa{n3g2M*iLtnM1;8Q;%l`gX$Dq9ZA$ut z?&aM*ncI_A-_vycZcxiNYLaOy5kJf#YXPBA@IF(L)Q4_VQX?l&Ks7PPg4xsaUEtc?oz2<6^Mjf)$9et6d#KHZ zT6Kye)3HNB?Xq&N8Tix7pPXo;3>R)TM}e|oDZC4(CPe{13m$B&ak3U(`4P4=nMs3a zy=`>55uny$k^!f?`cKsfvXuK51%YVhB083{#U((XUUgLbu34S`&SJ3^!N;@g9gMZsl_5Cg-75`QpNsJ z`6^}OS+b62V90nA7G}U=&4eCud-lI*s}#JH2ws_bI2nQ$YC+RHhj(hhAT4O0`g+aA YH~9zNth@4tz2VuLjl*xUg%FJYKd}@$+5i9m diff --git a/html/index.php.in b/html/index.php.in index e74bee1a5..ffe368d22 100644 --- a/html/index.php.in +++ b/html/index.php.in @@ -35,7 +35,7 @@ $this_year = '2017'; diff --git a/html/js/config.js.in b/html/js/config.js.in deleted file mode 100644 index 5a7523406..000000000 --- a/html/js/config.js.in +++ /dev/null @@ -1,2 +0,0 @@ -var nagcfg = {}; -nagcfg.cgidir = "@cgiurl@/"; diff --git a/html/js/histogram.js b/html/js/histogram.js index 44938b2a7..91464c085 100644 --- a/html/js/histogram.js +++ b/html/js/histogram.js @@ -24,7 +24,7 @@ angular.module("histogramApp", ["ui.bootstrap", "ui.utils", // URL parameters $scope.params = { cgiurl: $scope.search.cgiurl ? $scope.search.cgiurl : - $location.absUrl().replace(/histogram\.html.*$/, nagcfg.cgidir), + $location.absUrl().replace(/histogram\.html.*$/, "cgi-bin/"), reporttype: $scope.search.reporttype ? $scope.search.reporttype : "", host: $scope.search.host ? $scope.search.host : "", diff --git a/html/js/jsonquery.js b/html/js/jsonquery.js index e6840ab33..925e84f09 100644 --- a/html/js/jsonquery.js +++ b/html/js/jsonquery.js @@ -1,6 +1,6 @@ $( document).ready( function() { var parts = $(location).attr( 'href').split( '/'); - parts.pop(); + parts.pop() var baseurl = parts.join( '/'); $('#query button').attr('disabled','disabled'); @@ -257,7 +257,7 @@ $( document).ready( function() { } } $.ajax({ - url: baseurl + '/' + nagcfg.cgidir + cgi + '.cgi', + url: baseurl + '/cgi-bin/' + cgi + '.cgi', data: parameters, success: success, async: false @@ -431,7 +431,7 @@ $( document).ready( function() { $('#query button').attr('disabled','disabled'); } else { - $.get( baseurl + '/' + nagcfg.cgidir + cginame, + $.get( baseurl + '/cgi-bin/' + cginame, { query: "help" }, function(data, results) { help = data; buildForm(data); @@ -541,7 +541,7 @@ $( document).ready( function() { } } var p = jQuery.param( parameters); - var url = baseurl + '/' + nagcfg.cgidir + cginame + '?' + p + var url = baseurl + '/cgi-bin/' + cginame + '?' + p $('#results').append( $('

').text( 'URL: ').append( $('').attr({ @@ -550,7 +550,7 @@ $( document).ready( function() { }).text( url) ) ); - $.get( baseurl + '/' + nagcfg.cgidir + cginame, + $.get( baseurl + '/cgi-bin/' + cginame, parameters, function(data, results) { $('#results').append( diff --git a/html/js/map.js b/html/js/map.js index 1b7032435..00cfea394 100644 --- a/html/js/map.js +++ b/html/js/map.js @@ -98,7 +98,7 @@ angular.module("mapApp", ["ui.bootstrap", "ui.utils", "nagiosDecorations", // URL parameters $scope.params = { cgiurl: $scope.search.cgiurl ? $scope.search.cgiurl : - $location.absUrl().replace(/map\.php.*$/, nagcfg.cgidir), + $location.absUrl().replace(/map\.php.*$/, "cgi-bin/"), layout: map_layout, dimensions: $scope.search.dimensions ? $scope.search.dimensions : "", diff --git a/html/js/trends.js b/html/js/trends.js index a5bcac9a2..eca764911 100644 --- a/html/js/trends.js +++ b/html/js/trends.js @@ -35,7 +35,7 @@ angular.module("trendsApp", ["ui.bootstrap", "ui.utils", // URL parameters $scope.params = { cgiurl: $scope.search.cgiurl ? $scope.search.cgiurl : - $location.absUrl().replace(/trends\.html.*$/, nagcfg.cgidir), + $location.absUrl().replace(/trends\.html.*$/, "cgi-bin/"), reporttype: $scope.search.reporttype ? $scope.search.reporttype : "", host: $scope.search.host ? $scope.search.host : "", diff --git a/html/jsonquery.html b/html/jsonquery.html index e8a67ec79..3f2cfabdf 100644 --- a/html/jsonquery.html +++ b/html/jsonquery.html @@ -5,7 +5,6 @@ JSON Query Generator - diff --git a/html/login.html b/html/login.html deleted file mode 100644 index 5a590e4f1..000000000 --- a/html/login.html +++ /dev/null @@ -1,39 +0,0 @@ -Nagios® Login - - - -
- - - - - - - -
- Nagios Core -
Username: -
Password: -
- -
-
- - - - diff --git a/html/map-form.html b/html/map-form.html index 359165b47..aa8473c76 100644 --- a/html/map-form.html +++ b/html/map-form.html @@ -13,7 +13,7 @@