build fixed

This commit is contained in:
Marc Wäckerlin
2017-02-26 21:28:18 +00:00
parent f088cad616
commit 473aaa322f
7 changed files with 15 additions and 11 deletions

View File

@@ -1,9 +1,7 @@
<?php
$realm = "MY REALM HERE";
$ldaphost = "my.ldap.host";
$base = "dc=my,dc=server,dc=com";
$userbase = "ou=people,".$base;
$groupbase = "ou=group,".$base;
$ldapbase = "dc=my,dc=server,dc=com";
if (!isset($_SERVER['PHP_AUTH_USER'])) {
header('WWW-Authenticate: Basic realm="'.$REALM.'"');
header('HTTP/1.0 401 Unauthorized');
@@ -17,7 +15,7 @@ if (!isset($_SERVER['PHP_AUTH_USER'])) {
or error_die("failed to set LDAP protocol version 3");
ldap_start_tls($ldapconn)
or error_die($ldapconn, "cannot start LDAP TLS");
$ldapbind = @ldap_bind($ldapconn, 'uid='.$tstusername.','.$userbase, $password)
$ldapbind = @ldap_bind($ldapconn, 'uid='.$tstusername.','.$ldapbase, $password)
or error_die("login failed for $username", '403 Forbidden');
$username = $tstuserbname;
}

View File

@@ -8,6 +8,6 @@
## 1 2 3 4 5 6 7 8
## 45678901234567890123456789012345678901234567890123456789012345678901234567890
pkgsysconfdir = ${sysconfdir}/@PACKAGE_NAME@
pkgsysconfdir = ${PKGSYSCONFDIR}
dist_pkgsysconf_DATA = settings.php authentication.php

View File

@@ -1,5 +1,5 @@
<?php
$path='/path/to/your/files';
$thumbs='/var/tmp/sahring-gallery/thumbnails/';
$max_validity_days=30;
$path = "/path/to/your/files";
$thumbs = "/var/tmp/sharing-gallery/thumbnails/";
$max_validity_days = "30";
?>