Enable SASL (GSSAPI)
This commit is contained in:
parent
96bad27d64
commit
259179a1b3
@ -194,7 +194,7 @@ class ldap extends DS {
|
|||||||
|
|
||||||
# If SASL has been configured for binding, then start it now.
|
# If SASL has been configured for binding, then start it now.
|
||||||
if ($this->isSASLEnabled())
|
if ($this->isSASLEnabled())
|
||||||
$this->startSASL($resource,$method);
|
$bind['result'] = $this->startSASL($resource,$method);
|
||||||
|
|
||||||
# Normal bind...
|
# Normal bind...
|
||||||
else
|
else
|
||||||
@ -603,10 +603,20 @@ class ldap extends DS {
|
|||||||
if (DEBUG_ENABLED && (($fargs=func_get_args())||$fargs='NOARGS'))
|
if (DEBUG_ENABLED && (($fargs=func_get_args())||$fargs='NOARGS'))
|
||||||
debug_log('Entered (%%)',17,0,__FILE__,__LINE__,__METHOD__,$fargs);
|
debug_log('Entered (%%)',17,0,__FILE__,__LINE__,__METHOD__,$fargs);
|
||||||
|
|
||||||
error(__METHOD__.' has NOT been tested, please let us know if it works and which version of PHP you are using.','info');
|
|
||||||
static $CACHE = array();
|
static $CACHE = array();
|
||||||
|
|
||||||
if (! $this->getValue('server','sasl') || ! function_exists('ldap_start_tls'));
|
switch (strtolower($this->getValue('sasl','mech'))) {
|
||||||
|
case 'gssapi':
|
||||||
|
if (isset($_ENV['REDIRECT_KRB5CCNAME']))
|
||||||
|
putenv(sprintf('KRB5CCNAME={%s}',$_ENV['REDIRECT_KRB5CCNAME']));
|
||||||
|
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
error(sprintf('%s (%s) has NOT been tested, please let us know if it works and which version of PHP you are using.',__METHOD__,$this->getValue('sasl','mech')),'info');
|
||||||
|
}
|
||||||
|
|
||||||
|
if (! $this->getValue('server','sasl') || ! function_exists('ldap_start_tls'))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (! isset($CACHE['login_dn'])) {
|
if (! isset($CACHE['login_dn'])) {
|
||||||
|
Loading…
Reference in New Issue
Block a user