diff --git a/.vagrant-puppet/files/etc/httpd/conf.d/icingaweb.conf b/.vagrant-puppet/files/etc/httpd/conf.d/icingaweb.conf index 462689ce9..0b45bea1f 100644 --- a/.vagrant-puppet/files/etc/httpd/conf.d/icingaweb.conf +++ b/.vagrant-puppet/files/etc/httpd/conf.d/icingaweb.conf @@ -1,4 +1,6 @@ - +Alias /icingaweb /vagrant/public + + Options FollowSymLinks AllowOverride None Order allow,deny diff --git a/.vagrant-puppet/manifests/default.pp b/.vagrant-puppet/manifests/default.pp index 040e5574b..4358b2898 100644 --- a/.vagrant-puppet/manifests/default.pp +++ b/.vagrant-puppet/manifests/default.pp @@ -479,36 +479,6 @@ service { 'icinga2': ] } -# cmmi { 'icinga2': -# url => "https://github.com/Icinga/icinga2/releases/download/v${icinga2Version}/icinga2-${icinga2Version}.tar.gz", -# output => "icinga2-${icinga2Version}.tar.gz", -# configure_command => 'mkdir build &> /dev/null || true && cd build && sudo cmake ..', -# creates => '/usr/local/sbin/icinga2', -# make => 'true && cd build/ && make && make install', -# require => Package[ ['cmake', 'boost-devel', 'bison', 'flex'] ], -# make_timeout => 900 -# } - -#configure { 'icingaweb': -# path => '/vagrant', -# flags => '--prefix=/vagrant \ -# --with-icinga-commandpipe="/usr/local/icinga-mysql/var/rw/icinga.cmd" \ -# --with-statusdat-file="/usr/local/icinga-mysql/var/status.dat" \ -# --with-objects-cache-file=/usr/local/icinga-mysql/var/objects.cache \ -# --with-icinga-backend=ido \ -# --with-httpd-config-path="/etc/httpd/conf.d" \ -# --with-ldap-authentication \ -# --with-internal-authentication \ -# --with-livestatus-socket="/usr/local/icinga-mysql/var/rw/live"', -# require => Exec['install php-ZendFramework'] -#} - -#file { 'icingaweb-public': -# ensure => '/vagrant/public', -# path => '/var/www/html/icingaweb', -# require => Class['apache'] -#} - exec { 'install php-ZendFramework-Db-Adapter-Pdo-Mysql': command => 'yum -d 0 -e 0 -y --enablerepo=epel install php-ZendFramework-Db-Adapter-Pdo-Mysql', unless => 'rpm -qa | grep php-ZendFramework-Db-Adapter-Pdo-Mysql', @@ -716,54 +686,7 @@ exec { 'populate-icinga_web-mysql-db': require => [ Exec['create-mysql-icinga_web-db'], Cmmi['icinga-web'] ] } -# -# Development environment (Feature #5554) -# file { '/var/www/html/icingaweb': - ensure => 'directory', - owner => 'apache', - group => 'apache' -} - -file { '/var/www/html/icingaweb/css': - ensure => 'link', - target => '/vagrant/public/css', - owner => 'apache', - group => 'apache', -} - -file { '/var/www/html/icingaweb/svg': - ensure => 'link', - target => '/vagrant/public/svg', - owner => 'apache', - group => 'apache', -} - -file { '/var/www/html/icingaweb/img': - ensure => 'link', - target => '/vagrant/public/img', - owner => 'apache', - group => 'apache', -} - -file { '/var/www/html/icingaweb/js': - ensure => 'link', - target => '/vagrant/public/js', - owner => 'apache', - group => 'apache', -} - -file { '/var/www/html/icingaweb/index.php': - source => 'puppet:////vagrant/.vagrant-puppet/files/var/www/html/icingaweb/index.php', - owner => 'apache', - group => 'apache', -} - -file { '/var/www/html/icingaweb/js.php': - ensure => absent, -} - -file { '/var/www/html/icingaweb/css.php': ensure => absent, } diff --git a/.vagrant-puppet/manifests/finalize.sh b/.vagrant-puppet/manifests/finalize.sh index 02bee09a0..3b1418575 100644 --- a/.vagrant-puppet/manifests/finalize.sh +++ b/.vagrant-puppet/manifests/finalize.sh @@ -17,8 +17,13 @@ startServicesWithNonLSBCompliantExitStatusCodes () { } mountIcinga2webVarLog () { - # Remount /vagrant/var/log/ with appropriate permissions since the group apache is missing initially - mount -t vboxsf -o uid=`id -u vagrant`,gid=`id -g apache`,dmode=775,fmode=664 /vagrant/var/log/ /vagrant/var/log/ + if ! $(/bin/mount | /bin/grep -q "/vagrant/var/log"); then + # Remount /vagrant/var/log/ with appropriate permissions since the group apache is missing initially + /bin/mount -t vboxsf -o \ + uid=`id -u vagrant`,gid=`id -g apache`,dmode=775,fmode=664 \ + /vagrant/var/log/ \ + /vagrant/var/log/ + fi } installJquery diff --git a/Makefile.in b/Makefile.in index 78a97cf74..a8fc908cc 100644 --- a/Makefile.in +++ b/Makefile.in @@ -51,7 +51,6 @@ clean: # Installs/copies all static files (executables, scripts, html, etc) # install-static-files: install-application copy-web-files-public copy-web-files-modules - $(INSTALL) -m 644 $(INSTALL_OPTS) "./public/.htaccess" $(DESTDIR)$(prefix)/public/.htaccess; # # Installs all configuration files diff --git a/application/controllers/AuthenticationController.php b/application/controllers/AuthenticationController.php index b2e5294e3..4476ecebd 100644 --- a/application/controllers/AuthenticationController.php +++ b/application/controllers/AuthenticationController.php @@ -63,8 +63,6 @@ class AuthenticationController extends ActionController $this->view->form = new LoginForm(); $this->view->form->setRequest($this->_request); $this->view->title = $this->translate('Icingaweb Login'); - $user = new User(''); - $password = ''; try { $redirectUrl = Url::fromPath($this->_request->getParam('redirect', 'dashboard')); @@ -95,9 +93,10 @@ class AuthenticationController extends ActionController if ($this->getRequest()->isGet()) { + $user = new User(''); foreach ($chain as $backend) { if ($backend instanceof AutoLoginBackend) { - $authenticated = $backend->authenticate($user, $password); + $authenticated = $backend->authenticate($user); if ($authenticated === true) { $auth->setAuthenticated($user); $this->redirectNow($redirectUrl); @@ -111,12 +110,10 @@ class AuthenticationController extends ActionController $backendsWithError = 0; foreach ($chain as $backend) { - ++$backendsTried; - if ($backend instanceof AutoLoginBackend) { continue; } - + ++$backendsTried; try { $authenticated = $backend->authenticate($user, $password); } catch (AuthenticationException $e) { diff --git a/application/forms/Config/Authentication/LdapBackendForm.php b/application/forms/Config/Authentication/LdapBackendForm.php index 966cea1cc..051b3c0c0 100644 --- a/application/forms/Config/Authentication/LdapBackendForm.php +++ b/application/forms/Config/Authentication/LdapBackendForm.php @@ -179,9 +179,12 @@ class LdapBackendForm extends BaseBackendForm $backendConfig->user_class, $backendConfig->user_name_attribute ); + $testConn->assertAuthenticationPossible(); + /* if ($testConn->count() === 0) { throw new Exception('No Users Found On Directory Server'); } + */ } catch (Exception $exc) { $this->addErrorMessage( t('Connection Validation Failed: ' . $exc->getMessage()) diff --git a/application/layouts/scripts/body.phtml b/application/layouts/scripts/body.phtml index fbc266944..222762bb5 100644 --- a/application/layouts/scripts/body.phtml +++ b/application/layouts/scripts/body.phtml @@ -26,21 +26,6 @@ if ($notifications->hasMessages()) { -