From f4476bd9b5badd36cd0617d76538e47d9649986b Mon Sep 17 00:00:00 2001 From: Jan Schumann Date: Mon, 20 Feb 2012 19:51:26 +0100 Subject: Refactored auth system: All auth methods are now introduced as plugins. --- lib/plugins/authldap/auth.php | 471 +++++++++++++++++++++++++++++++++++ lib/plugins/authldap/plugin.info.txt | 7 + 2 files changed, 478 insertions(+) create mode 100644 lib/plugins/authldap/auth.php create mode 100644 lib/plugins/authldap/plugin.info.txt (limited to 'lib/plugins/authldap') diff --git a/lib/plugins/authldap/auth.php b/lib/plugins/authldap/auth.php new file mode 100644 index 000000000..723685f94 --- /dev/null +++ b/lib/plugins/authldap/auth.php @@ -0,0 +1,471 @@ + + */ +// must be run within Dokuwiki +if(!defined('DOKU_INC')) die(); + +/** + * LDAP authentication backend + * + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * @author Andreas Gohr + * @author Chris Smith + * @author Jan Schumann + */ +class auth_plugin_authldap extends DokuWiki_Auth_Plugin +{ + var $cnf = null; + var $con = null; + var $bound = 0; // 0: anonymous, 1: user, 2: superuser + + /** + * Constructor + */ + function auth_plugin_authldap(){ + global $conf; + $this->cnf = $conf['auth']['ldap']; + + // ldap extension is needed + if(!function_exists('ldap_connect')) { + if ($this->cnf['debug']) + msg("LDAP err: PHP LDAP extension not found.",-1,__LINE__,__FILE__); + $this->success = false; + return; + } + + if(empty($this->cnf['groupkey'])) $this->cnf['groupkey'] = 'cn'; + if(empty($this->cnf['userscope'])) $this->cnf['userscope'] = 'sub'; + if(empty($this->cnf['groupscope'])) $this->cnf['groupscope'] = 'sub'; + + // auth_ldap currently just handles authentication, so no + // capabilities are set + } + + /** + * Check user+password + * + * Checks if the given user exists and the given + * plaintext password is correct by trying to bind + * to the LDAP server + * + * @author Andreas Gohr + * @return bool + */ + function checkPass($user,$pass){ + // reject empty password + if(empty($pass)) return false; + if(!$this->_openLDAP()) return false; + + // indirect user bind + if($this->cnf['binddn'] && $this->cnf['bindpw']){ + // use superuser credentials + if(!@ldap_bind($this->con,$this->cnf['binddn'],$this->cnf['bindpw'])){ + if($this->cnf['debug']) + msg('LDAP bind as superuser: '.htmlspecialchars(ldap_error($this->con)),0,__LINE__,__FILE__); + return false; + } + $this->bound = 2; + }else if($this->cnf['binddn'] && + $this->cnf['usertree'] && + $this->cnf['userfilter']) { + // special bind string + $dn = $this->_makeFilter($this->cnf['binddn'], + array('user'=>$user,'server'=>$this->cnf['server'])); + + }else if(strpos($this->cnf['usertree'], '%{user}')) { + // direct user bind + $dn = $this->_makeFilter($this->cnf['usertree'], + array('user'=>$user,'server'=>$this->cnf['server'])); + + }else{ + // Anonymous bind + if(!@ldap_bind($this->con)){ + msg("LDAP: can not bind anonymously",-1); + if($this->cnf['debug']) + msg('LDAP anonymous bind: '.htmlspecialchars(ldap_error($this->con)),0,__LINE__,__FILE__); + return false; + } + } + + // Try to bind to with the dn if we have one. + if(!empty($dn)) { + // User/Password bind + if(!@ldap_bind($this->con,$dn,$pass)){ + if($this->cnf['debug']){ + msg("LDAP: bind with $dn failed", -1,__LINE__,__FILE__); + msg('LDAP user dn bind: '.htmlspecialchars(ldap_error($this->con)),0); + } + return false; + } + $this->bound = 1; + return true; + }else{ + // See if we can find the user + $info = $this->getUserData($user,true); + if(empty($info['dn'])) { + return false; + } else { + $dn = $info['dn']; + } + + // Try to bind with the dn provided + if(!@ldap_bind($this->con,$dn,$pass)){ + if($this->cnf['debug']){ + msg("LDAP: bind with $dn failed", -1,__LINE__,__FILE__); + msg('LDAP user bind: '.htmlspecialchars(ldap_error($this->con)),0); + } + return false; + } + $this->bound = 1; + return true; + } + + return false; + } + + /** + * Return user info + * + * Returns info about the given user needs to contain + * at least these fields: + * + * name string full name of the user + * mail string email addres of the user + * grps array list of groups the user is in + * + * This LDAP specific function returns the following + * addional fields: + * + * dn string distinguished name (DN) + * uid string Posix User ID + * inbind bool for internal use - avoid loop in binding + * + * @author Andreas Gohr + * @author Trouble + * @author Dan Allen + * @author + * @author Stephane Chazelas + * @return array containing user data or false + */ + function getUserData($user,$inbind=false) { + global $conf; + if(!$this->_openLDAP()) return false; + + // force superuser bind if wanted and not bound as superuser yet + if($this->cnf['binddn'] && $this->cnf['bindpw'] && $this->bound < 2){ + // use superuser credentials + if(!@ldap_bind($this->con,$this->cnf['binddn'],$this->cnf['bindpw'])){ + if($this->cnf['debug']) + msg('LDAP bind as superuser: '.htmlspecialchars(ldap_error($this->con)),0,__LINE__,__FILE__); + return false; + } + $this->bound = 2; + }elseif($this->bound == 0 && !$inbind) { + // in some cases getUserData is called outside the authentication workflow + // eg. for sending email notification on subscribed pages. This data might not + // be accessible anonymously, so we try to rebind the current user here + list($loginuser,$loginsticky,$loginpass) = auth_getCookie(); + if($loginuser && $loginpass){ + $loginpass = PMA_blowfish_decrypt($loginpass, auth_cookiesalt(!$loginsticky)); + $this->checkPass($loginuser, $loginpass); + } + } + + $info['user'] = $user; + $info['server'] = $this->cnf['server']; + + //get info for given user + $base = $this->_makeFilter($this->cnf['usertree'], $info); + if(!empty($this->cnf['userfilter'])) { + $filter = $this->_makeFilter($this->cnf['userfilter'], $info); + } else { + $filter = "(ObjectClass=*)"; + } + + $sr = $this->_ldapsearch($this->con, $base, $filter, $this->cnf['userscope']); + $result = @ldap_get_entries($this->con, $sr); + if($this->cnf['debug']){ + msg('LDAP user search: '.htmlspecialchars(ldap_error($this->con)),0,__LINE__,__FILE__); + msg('LDAP search at: '.htmlspecialchars($base.' '.$filter),0,__LINE__,__FILE__); + } + + // Don't accept more or less than one response + if(!is_array($result) || $result['count'] != 1){ + return false; //user not found + } + + $user_result = $result[0]; + ldap_free_result($sr); + + // general user info + $info['dn'] = $user_result['dn']; + $info['gid'] = $user_result['gidnumber'][0]; + $info['mail'] = $user_result['mail'][0]; + $info['name'] = $user_result['cn'][0]; + $info['grps'] = array(); + + // overwrite if other attribs are specified. + if(is_array($this->cnf['mapping'])){ + foreach($this->cnf['mapping'] as $localkey => $key) { + if(is_array($key)) { + // use regexp to clean up user_result + list($key, $regexp) = each($key); + if($user_result[$key]) foreach($user_result[$key] as $grp){ + if (preg_match($regexp,$grp,$match)) { + if($localkey == 'grps') { + $info[$localkey][] = $match[1]; + } else { + $info[$localkey] = $match[1]; + } + } + } + } else { + $info[$localkey] = $user_result[$key][0]; + } + } + } + $user_result = array_merge($info,$user_result); + + //get groups for given user if grouptree is given + if ($this->cnf['grouptree'] || $this->cnf['groupfilter']) { + $base = $this->_makeFilter($this->cnf['grouptree'], $user_result); + $filter = $this->_makeFilter($this->cnf['groupfilter'], $user_result); + $sr = $this->_ldapsearch($this->con, $base, $filter, $this->cnf['groupscope'], array($this->cnf['groupkey'])); + if($this->cnf['debug']){ + msg('LDAP group search: '.htmlspecialchars(ldap_error($this->con)),0,__LINE__,__FILE__); + msg('LDAP search at: '.htmlspecialchars($base.' '.$filter),0,__LINE__,__FILE__); + } + if(!$sr){ + msg("LDAP: Reading group memberships failed",-1); + return false; + } + $result = ldap_get_entries($this->con, $sr); + ldap_free_result($sr); + + if(is_array($result)) foreach($result as $grp){ + if(!empty($grp[$this->cnf['groupkey']][0])){ + if($this->cnf['debug']) + msg('LDAP usergroup: '.htmlspecialchars($grp[$this->cnf['groupkey']][0]),0,__LINE__,__FILE__); + $info['grps'][] = $grp[$this->cnf['groupkey']][0]; + } + } + } + + // always add the default group to the list of groups + if(!in_array($conf['defaultgroup'],$info['grps'])){ + $info['grps'][] = $conf['defaultgroup']; + } + return $info; + } + + /** + * Most values in LDAP are case-insensitive + */ + function isCaseSensitive(){ + return false; + } + + /** + * Bulk retrieval of user data + * + * @author Dominik Eckelmann + * @param start index of first user to be returned + * @param limit max number of users to be returned + * @param filter array of field/pattern pairs, null for no filter + * @return array of userinfo (refer getUserData for internal userinfo details) + */ + function retrieveUsers($start=0,$limit=-1,$filter=array()) { + if(!$this->_openLDAP()) return false; + + if (!isset($this->users)) { + // Perform the search and grab all their details + if(!empty($this->cnf['userfilter'])) { + $all_filter = str_replace('%{user}', '*', $this->cnf['userfilter']); + } else { + $all_filter = "(ObjectClass=*)"; + } + $sr=ldap_search($this->con,$this->cnf['usertree'],$all_filter); + $entries = ldap_get_entries($this->con, $sr); + $users_array = array(); + for ($i=0; $i<$entries["count"]; $i++){ + array_push($users_array, $entries[$i]["uid"][0]); + } + asort($users_array); + $result = $users_array; + if (!$result) return array(); + $this->users = array_fill_keys($result, false); + } + $i = 0; + $count = 0; + $this->_constructPattern($filter); + $result = array(); + + foreach ($this->users as $user => &$info) { + if ($i++ < $start) { + continue; + } + if ($info === false) { + $info = $this->getUserData($user); + } + if ($this->_filter($user, $info)) { + $result[$user] = $info; + if (($limit >= 0) && (++$count >= $limit)) break; + } + } + return $result; + + + } + + /** + * Make LDAP filter strings. + * + * Used by auth_getUserData to make the filter + * strings for grouptree and groupfilter + * + * filter string ldap search filter with placeholders + * placeholders array array with the placeholders + * + * @author Troels Liebe Bentsen + * @return string + */ + function _makeFilter($filter, $placeholders) { + preg_match_all("/%{([^}]+)/", $filter, $matches, PREG_PATTERN_ORDER); + //replace each match + foreach ($matches[1] as $match) { + //take first element if array + if(is_array($placeholders[$match])) { + $value = $placeholders[$match][0]; + } else { + $value = $placeholders[$match]; + } + $value = $this->_filterEscape($value); + $filter = str_replace('%{'.$match.'}', $value, $filter); + } + return $filter; + } + + /** + * return 1 if $user + $info match $filter criteria, 0 otherwise + * + * @author Chris Smith + */ + function _filter($user, $info) { + foreach ($this->_pattern as $item => $pattern) { + if ($item == 'user') { + if (!preg_match($pattern, $user)) return 0; + } else if ($item == 'grps') { + if (!count(preg_grep($pattern, $info['grps']))) return 0; + } else { + if (!preg_match($pattern, $info[$item])) return 0; + } + } + return 1; + } + + function _constructPattern($filter) { + $this->_pattern = array(); + foreach ($filter as $item => $pattern) { +// $this->_pattern[$item] = '/'.preg_quote($pattern,"/").'/i'; // don't allow regex characters + $this->_pattern[$item] = '/'.str_replace('/','\/',$pattern).'/i'; // allow regex characters + } + } + + /** + * Escape a string to be used in a LDAP filter + * + * Ported from Perl's Net::LDAP::Util escape_filter_value + * + * @author Andreas Gohr + */ + function _filterEscape($string){ + return preg_replace('/([\x00-\x1F\*\(\)\\\\])/e', + '"\\\\\".join("",unpack("H2","$1"))', + $string); + } + + /** + * Opens a connection to the configured LDAP server and sets the wanted + * option on the connection + * + * @author Andreas Gohr + */ + function _openLDAP(){ + if($this->con) return true; // connection already established + + $this->bound = 0; + + $port = ($this->cnf['port']) ? $this->cnf['port'] : 389; + $this->con = @ldap_connect($this->cnf['server'],$port); + if(!$this->con){ + msg("LDAP: couldn't connect to LDAP server",-1); + return false; + } + + //set protocol version and dependend options + if($this->cnf['version']){ + if(!@ldap_set_option($this->con, LDAP_OPT_PROTOCOL_VERSION, + $this->cnf['version'])){ + msg('Setting LDAP Protocol version '.$this->cnf['version'].' failed',-1); + if($this->cnf['debug']) + msg('LDAP version set: '.htmlspecialchars(ldap_error($this->con)),0,__LINE__,__FILE__); + }else{ + //use TLS (needs version 3) + if($this->cnf['starttls']) { + if (!@ldap_start_tls($this->con)){ + msg('Starting TLS failed',-1); + if($this->cnf['debug']) + msg('LDAP TLS set: '.htmlspecialchars(ldap_error($this->con)),0,__LINE__,__FILE__); + } + } + // needs version 3 + if(isset($this->cnf['referrals'])) { + if(!@ldap_set_option($this->con, LDAP_OPT_REFERRALS, + $this->cnf['referrals'])){ + msg('Setting LDAP referrals to off failed',-1); + if($this->cnf['debug']) + msg('LDAP referal set: '.htmlspecialchars(ldap_error($this->con)),0,__LINE__,__FILE__); + } + } + } + } + + //set deref mode + if($this->cnf['deref']){ + if(!@ldap_set_option($this->con, LDAP_OPT_DEREF, $this->cnf['deref'])){ + msg('Setting LDAP Deref mode '.$this->cnf['deref'].' failed',-1); + if($this->cnf['debug']) + msg('LDAP deref set: '.htmlspecialchars(ldap_error($this->con)),0,__LINE__,__FILE__); + } + } + + $this->canDo['getUsers'] = true; + return true; + } + + /** + * Wraps around ldap_search, ldap_list or ldap_read depending on $scope + * + * @param $scope string - can be 'base', 'one' or 'sub' + * @author Andreas Gohr + */ + function _ldapsearch($link_identifier, $base_dn, $filter, $scope='sub', $attributes=null, + $attrsonly=0, $sizelimit=0, $timelimit=0, $deref=LDAP_DEREF_NEVER){ + if(is_null($attributes)) $attributes = array(); + + if($scope == 'base'){ + return @ldap_read($link_identifier, $base_dn, $filter, $attributes, + $attrsonly, $sizelimit, $timelimit, $deref); + }elseif($scope == 'one'){ + return @ldap_list($link_identifier, $base_dn, $filter, $attributes, + $attrsonly, $sizelimit, $timelimit, $deref); + }else{ + return @ldap_search($link_identifier, $base_dn, $filter, $attributes, + $attrsonly, $sizelimit, $timelimit, $deref); + } + } +} \ No newline at end of file diff --git a/lib/plugins/authldap/plugin.info.txt b/lib/plugins/authldap/plugin.info.txt new file mode 100644 index 000000000..c36385224 --- /dev/null +++ b/lib/plugins/authldap/plugin.info.txt @@ -0,0 +1,7 @@ +base authldap +author +email +date +name ldap auth plugin +desc Provides authentication against am LDAP server +url -- cgit v1.2.3 From 94c0297d119ce52ad794c18f26220311e3c0ed8c Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sat, 6 Oct 2012 11:31:26 +0200 Subject: completed plugin.info.txt files --- lib/plugins/authldap/plugin.info.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lib/plugins/authldap') diff --git a/lib/plugins/authldap/plugin.info.txt b/lib/plugins/authldap/plugin.info.txt index c36385224..2af8cf00a 100644 --- a/lib/plugins/authldap/plugin.info.txt +++ b/lib/plugins/authldap/plugin.info.txt @@ -1,7 +1,7 @@ base authldap -author -email -date +author Andreas Gohr +email andi@splitbrain.org +date 2012-10-06 name ldap auth plugin desc Provides authentication against am LDAP server -url +url http://www.dokuwiki.org/plugin:authldap -- cgit v1.2.3 From 454d868b911059adb8889a2d6afefa016d6a21f5 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Fri, 9 Nov 2012 14:04:41 +0100 Subject: make all sub auth classes call the parent constructor This does nothing currently but allows us adding certain things to the base class later. --- lib/plugins/authldap/auth.php | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/plugins/authldap') diff --git a/lib/plugins/authldap/auth.php b/lib/plugins/authldap/auth.php index 721abb48e..93683bc16 100644 --- a/lib/plugins/authldap/auth.php +++ b/lib/plugins/authldap/auth.php @@ -19,6 +19,8 @@ class auth_plugin_authldap extends DokuWiki_Auth_Plugin { * Constructor */ function __construct(){ + parent::__construct(); + global $conf; $this->cnf = $conf['auth']['ldap']; -- cgit v1.2.3 From 70e4a085e6a861a12a7b927ba9dfa10d5961f958 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Fri, 9 Nov 2012 15:36:35 +0100 Subject: fixes for authldap * makes proper use of plugin config * adds a few first defaults, but the whole config metadata is still missing * proper PHP5 use and comments --- lib/plugins/authldap/auth.php | 389 +++++++++++++++++++--------------- lib/plugins/authldap/conf/default.php | 7 + 2 files changed, 224 insertions(+), 172 deletions(-) create mode 100644 lib/plugins/authldap/conf/default.php (limited to 'lib/plugins/authldap') diff --git a/lib/plugins/authldap/auth.php b/lib/plugins/authldap/auth.php index 93683bc16..6e7bde1f0 100644 --- a/lib/plugins/authldap/auth.php +++ b/lib/plugins/authldap/auth.php @@ -11,31 +11,31 @@ if(!defined('DOKU_INC')) die(); * @author Jan Schumann */ class auth_plugin_authldap extends DokuWiki_Auth_Plugin { - var $cnf = null; - var $con = null; - var $bound = 0; // 0: anonymous, 1: user, 2: superuser + /* @var resource $con holds the LDAP connection*/ + protected $con = null; + + /* @var int $bound What type of connection does already exist? */ + protected $bound = 0; // 0: anonymous, 1: user, 2: superuser + + /* @var array $users User data cache */ + protected $users = null; + + /* @var array $_pattern User filter pattern */ + protected $_pattern = null; /** * Constructor */ - function __construct(){ + public function __construct() { parent::__construct(); - global $conf; - $this->cnf = $conf['auth']['ldap']; - // ldap extension is needed if(!function_exists('ldap_connect')) { - if ($this->cnf['debug']) - msg("LDAP err: PHP LDAP extension not found.",-1,__LINE__,__FILE__); + $this->_debug("LDAP err: PHP LDAP extension not found.", -1, __LINE__, __FILE__); $this->success = false; return; } - if(empty($this->cnf['groupkey'])) $this->cnf['groupkey'] = 'cn'; - if(empty($this->cnf['userscope'])) $this->cnf['userscope'] = 'sub'; - if(empty($this->cnf['groupscope'])) $this->cnf['groupscope'] = 'sub'; - // auth_ldap currently just handles authentication, so no // capabilities are set } @@ -48,40 +48,45 @@ class auth_plugin_authldap extends DokuWiki_Auth_Plugin { * to the LDAP server * * @author Andreas Gohr + * @param string $user + * @param string $pass * @return bool */ - function checkPass($user,$pass){ + public function checkPass($user, $pass) { // reject empty password if(empty($pass)) return false; if(!$this->_openLDAP()) return false; // indirect user bind - if($this->cnf['binddn'] && $this->cnf['bindpw']){ + if($this->getConf('binddn') && $this->getConf('bindpw')) { // use superuser credentials - if(!@ldap_bind($this->con,$this->cnf['binddn'],$this->cnf['bindpw'])){ - if($this->cnf['debug']) - msg('LDAP bind as superuser: '.htmlspecialchars(ldap_error($this->con)),0,__LINE__,__FILE__); + if(!@ldap_bind($this->con, $this->getConf('binddn'), $this->getConf('bindpw'))) { + $this->_debug('LDAP bind as superuser: '.htmlspecialchars(ldap_error($this->con)), 0, __LINE__, __FILE__); return false; } $this->bound = 2; - }else if($this->cnf['binddn'] && - $this->cnf['usertree'] && - $this->cnf['userfilter']) { + } else if($this->getConf('binddn') && + $this->getConf('usertree') && + $this->getConf('userfilter') + ) { // special bind string - $dn = $this->_makeFilter($this->cnf['binddn'], - array('user'=>$user,'server'=>$this->cnf['server'])); + $dn = $this->_makeFilter( + $this->getConf('binddn'), + array('user'=> $user, 'server'=> $this->getConf('server')) + ); - }else if(strpos($this->cnf['usertree'], '%{user}')) { + } else if(strpos($this->getConf('usertree'), '%{user}')) { // direct user bind - $dn = $this->_makeFilter($this->cnf['usertree'], - array('user'=>$user,'server'=>$this->cnf['server'])); + $dn = $this->_makeFilter( + $this->getConf('usertree'), + array('user'=> $user, 'server'=> $this->getConf('server')) + ); - }else{ + } else { // Anonymous bind - if(!@ldap_bind($this->con)){ - msg("LDAP: can not bind anonymously",-1); - if($this->cnf['debug']) - msg('LDAP anonymous bind: '.htmlspecialchars(ldap_error($this->con)),0,__LINE__,__FILE__); + if(!@ldap_bind($this->con)) { + msg("LDAP: can not bind anonymously", -1); + $this->_debug('LDAP anonymous bind: '.htmlspecialchars(ldap_error($this->con)), 0, __LINE__, __FILE__); return false; } } @@ -89,18 +94,16 @@ class auth_plugin_authldap extends DokuWiki_Auth_Plugin { // Try to bind to with the dn if we have one. if(!empty($dn)) { // User/Password bind - if(!@ldap_bind($this->con,$dn,$pass)){ - if($this->cnf['debug']){ - msg("LDAP: bind with $dn failed", -1,__LINE__,__FILE__); - msg('LDAP user dn bind: '.htmlspecialchars(ldap_error($this->con)),0); - } + if(!@ldap_bind($this->con, $dn, $pass)) { + $this->_debug("LDAP: bind with $dn failed", -1, __LINE__, __FILE__); + $this->_debug('LDAP user dn bind: '.htmlspecialchars(ldap_error($this->con)), 0, __LINE__, __FILE__); return false; } $this->bound = 1; return true; - }else{ + } else { // See if we can find the user - $info = $this->getUserData($user,true); + $info = $this->getUserData($user, true); if(empty($info['dn'])) { return false; } else { @@ -108,18 +111,14 @@ class auth_plugin_authldap extends DokuWiki_Auth_Plugin { } // Try to bind with the dn provided - if(!@ldap_bind($this->con,$dn,$pass)){ - if($this->cnf['debug']){ - msg("LDAP: bind with $dn failed", -1,__LINE__,__FILE__); - msg('LDAP user bind: '.htmlspecialchars(ldap_error($this->con)),0); - } + if(!@ldap_bind($this->con, $dn, $pass)) { + $this->_debug("LDAP: bind with $dn failed", -1, __LINE__, __FILE__); + $this->_debug('LDAP user bind: '.htmlspecialchars(ldap_error($this->con)), 0, __LINE__, __FILE__); return false; } $this->bound = 1; return true; } - - return false; } /** @@ -144,52 +143,52 @@ class auth_plugin_authldap extends DokuWiki_Auth_Plugin { * @author Dan Allen * @author * @author Stephane Chazelas + * + * @param string $user + * @param bool $inbind authldap specific, true if in bind phase * @return array containing user data or false */ - function getUserData($user,$inbind=false) { + public function getUserData($user, $inbind = false) { global $conf; if(!$this->_openLDAP()) return false; // force superuser bind if wanted and not bound as superuser yet - if($this->cnf['binddn'] && $this->cnf['bindpw'] && $this->bound < 2){ + if($this->getConf('binddn') && $this->getConf('bindpw') && $this->bound < 2) { // use superuser credentials - if(!@ldap_bind($this->con,$this->cnf['binddn'],$this->cnf['bindpw'])){ - if($this->cnf['debug']) - msg('LDAP bind as superuser: '.htmlspecialchars(ldap_error($this->con)),0,__LINE__,__FILE__); + if(!@ldap_bind($this->con, $this->getConf('binddn'), $this->getConf('bindpw'))) { + $this->_debug('LDAP bind as superuser: '.htmlspecialchars(ldap_error($this->con)), 0, __LINE__, __FILE__); return false; } $this->bound = 2; - }elseif($this->bound == 0 && !$inbind) { + } elseif($this->bound == 0 && !$inbind) { // in some cases getUserData is called outside the authentication workflow // eg. for sending email notification on subscribed pages. This data might not // be accessible anonymously, so we try to rebind the current user here - list($loginuser,$loginsticky,$loginpass) = auth_getCookie(); - if($loginuser && $loginpass){ + list($loginuser, $loginsticky, $loginpass) = auth_getCookie(); + if($loginuser && $loginpass) { $loginpass = PMA_blowfish_decrypt($loginpass, auth_cookiesalt(!$loginsticky)); $this->checkPass($loginuser, $loginpass); } } $info['user'] = $user; - $info['server'] = $this->cnf['server']; + $info['server'] = $this->getConf('server'); //get info for given user - $base = $this->_makeFilter($this->cnf['usertree'], $info); - if(!empty($this->cnf['userfilter'])) { - $filter = $this->_makeFilter($this->cnf['userfilter'], $info); + $base = $this->_makeFilter($this->getConf('usertree'), $info); + if($this->getConf('userfilter')) { + $filter = $this->_makeFilter($this->getConf('userfilter'), $info); } else { $filter = "(ObjectClass=*)"; } - $sr = $this->_ldapsearch($this->con, $base, $filter, $this->cnf['userscope']); + $sr = $this->_ldapsearch($this->con, $base, $filter, $this->getConf('userscope')); $result = @ldap_get_entries($this->con, $sr); - if($this->cnf['debug']){ - msg('LDAP user search: '.htmlspecialchars(ldap_error($this->con)),0,__LINE__,__FILE__); - msg('LDAP search at: '.htmlspecialchars($base.' '.$filter),0,__LINE__,__FILE__); - } + $this->_debug('LDAP user search: '.htmlspecialchars(ldap_error($this->con)), 0, __LINE__, __FILE__); + $this->_debug('LDAP search at: '.htmlspecialchars($base.' '.$filter), 0, __LINE__, __FILE__); // Don't accept more or less than one response - if(!is_array($result) || $result['count'] != 1){ + if(!is_array($result) || $result['count'] != 1) { return false; //user not found } @@ -204,13 +203,13 @@ class auth_plugin_authldap extends DokuWiki_Auth_Plugin { $info['grps'] = array(); // overwrite if other attribs are specified. - if(is_array($this->cnf['mapping'])){ - foreach($this->cnf['mapping'] as $localkey => $key) { + if(is_array($this->getConf('mapping'))) { + foreach($this->getConf('mapping') as $localkey => $key) { if(is_array($key)) { // use regexp to clean up user_result list($key, $regexp) = each($key); - if($user_result[$key]) foreach($user_result[$key] as $grp){ - if (preg_match($regexp,$grp,$match)) { + if($user_result[$key]) foreach($user_result[$key] as $grp) { + if(preg_match($regexp, $grp, $match)) { if($localkey == 'grps') { $info[$localkey][] = $match[1]; } else { @@ -223,35 +222,33 @@ class auth_plugin_authldap extends DokuWiki_Auth_Plugin { } } } - $user_result = array_merge($info,$user_result); + $user_result = array_merge($info, $user_result); //get groups for given user if grouptree is given - if ($this->cnf['grouptree'] || $this->cnf['groupfilter']) { - $base = $this->_makeFilter($this->cnf['grouptree'], $user_result); - $filter = $this->_makeFilter($this->cnf['groupfilter'], $user_result); - $sr = $this->_ldapsearch($this->con, $base, $filter, $this->cnf['groupscope'], array($this->cnf['groupkey'])); - if($this->cnf['debug']){ - msg('LDAP group search: '.htmlspecialchars(ldap_error($this->con)),0,__LINE__,__FILE__); - msg('LDAP search at: '.htmlspecialchars($base.' '.$filter),0,__LINE__,__FILE__); - } - if(!$sr){ - msg("LDAP: Reading group memberships failed",-1); + if($this->getConf('grouptree') || $this->getConf('groupfilter')) { + $base = $this->_makeFilter($this->getConf('grouptree'), $user_result); + $filter = $this->_makeFilter($this->getConf('groupfilter'), $user_result); + $sr = $this->_ldapsearch($this->con, $base, $filter, $this->getConf('groupscope'), array($this->getConf('groupkey'))); + $this->_debug('LDAP group search: '.htmlspecialchars(ldap_error($this->con)), 0, __LINE__, __FILE__); + $this->_debug('LDAP search at: '.htmlspecialchars($base.' '.$filter), 0, __LINE__, __FILE__); + + if(!$sr) { + msg("LDAP: Reading group memberships failed", -1); return false; } $result = ldap_get_entries($this->con, $sr); ldap_free_result($sr); - if(is_array($result)) foreach($result as $grp){ - if(!empty($grp[$this->cnf['groupkey']][0])){ - if($this->cnf['debug']) - msg('LDAP usergroup: '.htmlspecialchars($grp[$this->cnf['groupkey']][0]),0,__LINE__,__FILE__); - $info['grps'][] = $grp[$this->cnf['groupkey']][0]; + if(is_array($result)) foreach($result as $grp) { + if(!empty($grp[$this->getConf('groupkey')][0])) { + $this->_debug('LDAP usergroup: '.htmlspecialchars($grp[$this->getConf('groupkey')][0]), 0, __LINE__, __FILE__); + $info['grps'][] = $grp[$this->getConf('groupkey')][0]; } } } // always add the default group to the list of groups - if(!in_array($conf['defaultgroup'],$info['grps'])){ + if(!in_array($conf['defaultgroup'], $info['grps'])) { $info['grps'][] = $conf['defaultgroup']; } return $info; @@ -259,8 +256,10 @@ class auth_plugin_authldap extends DokuWiki_Auth_Plugin { /** * Most values in LDAP are case-insensitive + * + * @return bool */ - function isCaseSensitive(){ + public function isCaseSensitive() { return false; } @@ -268,47 +267,47 @@ class auth_plugin_authldap extends DokuWiki_Auth_Plugin { * Bulk retrieval of user data * * @author Dominik Eckelmann - * @param start index of first user to be returned - * @param limit max number of users to be returned - * @param filter array of field/pattern pairs, null for no filter + * @param int $start index of first user to be returned + * @param int $limit max number of users to be returned + * @param array $filter array of field/pattern pairs, null for no filter * @return array of userinfo (refer getUserData for internal userinfo details) */ - function retrieveUsers($start=0,$limit=-1,$filter=array()) { + function retrieveUsers($start = 0, $limit = -1, $filter = array()) { if(!$this->_openLDAP()) return false; - if (!isset($this->users)) { + if(is_null($this->users)) { // Perform the search and grab all their details - if(!empty($this->cnf['userfilter'])) { - $all_filter = str_replace('%{user}', '*', $this->cnf['userfilter']); + if($this->getConf('userfilter')) { + $all_filter = str_replace('%{user}', '*', $this->getConf('userfilter')); } else { $all_filter = "(ObjectClass=*)"; } - $sr=ldap_search($this->con,$this->cnf['usertree'],$all_filter); - $entries = ldap_get_entries($this->con, $sr); + $sr = ldap_search($this->con, $this->getConf('usertree'), $all_filter); + $entries = ldap_get_entries($this->con, $sr); $users_array = array(); - for ($i=0; $i<$entries["count"]; $i++){ + for($i = 0; $i < $entries["count"]; $i++) { array_push($users_array, $entries[$i]["uid"][0]); } asort($users_array); $result = $users_array; - if (!$result) return array(); + if(!$result) return array(); $this->users = array_fill_keys($result, false); } - $i = 0; + $i = 0; $count = 0; $this->_constructPattern($filter); $result = array(); - foreach ($this->users as $user => &$info) { - if ($i++ < $start) { + foreach($this->users as $user => &$info) { + if($i++ < $start) { continue; } - if ($info === false) { + if($info === false) { $info = $this->getUserData($user); } - if ($this->_filter($user, $info)) { + if($this->_filter($user, $info)) { $result[$user] = $info; - if (($limit >= 0) && (++$count >= $limit)) break; + if(($limit >= 0) && (++$count >= $limit)) break; } } return $result; @@ -320,50 +319,61 @@ class auth_plugin_authldap extends DokuWiki_Auth_Plugin { * Used by auth_getUserData to make the filter * strings for grouptree and groupfilter * - * filter string ldap search filter with placeholders - * placeholders array array with the placeholders - * * @author Troels Liebe Bentsen + * @param string $filter ldap search filter with placeholders + * @param array $placeholders placeholders to fill in * @return string */ - function _makeFilter($filter, $placeholders) { + protected function _makeFilter($filter, $placeholders) { preg_match_all("/%{([^}]+)/", $filter, $matches, PREG_PATTERN_ORDER); //replace each match - foreach ($matches[1] as $match) { + foreach($matches[1] as $match) { //take first element if array if(is_array($placeholders[$match])) { $value = $placeholders[$match][0]; } else { $value = $placeholders[$match]; } - $value = $this->_filterEscape($value); + $value = $this->_filterEscape($value); $filter = str_replace('%{'.$match.'}', $value, $filter); } return $filter; } /** - * return 1 if $user + $info match $filter criteria, 0 otherwise + * return true if $user + $info match $filter criteria, false otherwise + * + * @author Chris Smith * - * @author Chris Smith + * @param string $user the user's login name + * @param array $info the user's userinfo array + * @return bool */ - function _filter($user, $info) { - foreach ($this->_pattern as $item => $pattern) { - if ($item == 'user') { - if (!preg_match($pattern, $user)) return 0; - } else if ($item == 'grps') { - if (!count(preg_grep($pattern, $info['grps']))) return 0; + protected function _filter($user, $info) { + foreach($this->_pattern as $item => $pattern) { + if($item == 'user') { + if(!preg_match($pattern, $user)) return false; + } else if($item == 'grps') { + if(!count(preg_grep($pattern, $info['grps']))) return false; } else { - if (!preg_match($pattern, $info[$item])) return 0; + if(!preg_match($pattern, $info[$item])) return false; } } - return 1; + return true; } - function _constructPattern($filter) { + /** + * Set the filter pattern + * + * @author Chris Smith + * + * @param $filter + * @return void + */ + protected function _constructPattern($filter) { $this->_pattern = array(); - foreach ($filter as $item => $pattern) { - $this->_pattern[$item] = '/'.str_replace('/','\/',$pattern).'/i'; // allow regex characters + foreach($filter as $item => $pattern) { + $this->_pattern[$item] = '/'.str_replace('/', '\/', $pattern).'/i'; // allow regex characters } } @@ -373,11 +383,15 @@ class auth_plugin_authldap extends DokuWiki_Auth_Plugin { * Ported from Perl's Net::LDAP::Util escape_filter_value * * @author Andreas Gohr + * @param string $string + * @return string */ - function _filterEscape($string){ - return preg_replace('/([\x00-\x1F\*\(\)\\\\])/e', - '"\\\\\".join("",unpack("H2","$1"))', - $string); + protected function _filterEscape($string) { + return preg_replace( + '/([\x00-\x1F\*\(\)\\\\])/e', + '"\\\\\".join("",unpack("H2","$1"))', + $string + ); } /** @@ -386,18 +400,18 @@ class auth_plugin_authldap extends DokuWiki_Auth_Plugin { * * @author Andreas Gohr */ - function _openLDAP(){ + protected function _openLDAP() { if($this->con) return true; // connection already established $this->bound = 0; - $port = ($this->cnf['port']) ? $this->cnf['port'] : 389; - $bound = false; - $servers = explode(',', $this->cnf['server']); - foreach ($servers as $server) { - $server = trim($server); + $port = $this->getConf('port'); + $bound = false; + $servers = explode(',', $this->getConf('server')); + foreach($servers as $server) { + $server = trim($server); $this->con = @ldap_connect($server, $port); - if (!$this->con) { + if(!$this->con) { continue; } @@ -410,80 +424,111 @@ class auth_plugin_authldap extends DokuWiki_Auth_Plugin { */ //set protocol version and dependend options - if($this->cnf['version']){ - if(!@ldap_set_option($this->con, LDAP_OPT_PROTOCOL_VERSION, - $this->cnf['version'])){ - msg('Setting LDAP Protocol version '.$this->cnf['version'].' failed',-1); - if($this->cnf['debug']) - msg('LDAP version set: '.htmlspecialchars(ldap_error($this->con)),0,__LINE__,__FILE__); - }else{ + if($this->getConf('version')) { + if(!@ldap_set_option( + $this->con, LDAP_OPT_PROTOCOL_VERSION, + $this->getConf('version') + ) + ) { + msg('Setting LDAP Protocol version '.$this->getConf('version').' failed', -1); + $this->_debug('LDAP version set: '.htmlspecialchars(ldap_error($this->con)), 0, __LINE__, __FILE__); + } else { //use TLS (needs version 3) - if($this->cnf['starttls']) { - if (!@ldap_start_tls($this->con)){ - msg('Starting TLS failed',-1); - if($this->cnf['debug']) - msg('LDAP TLS set: '.htmlspecialchars(ldap_error($this->con)),0,__LINE__,__FILE__); + if($this->getConf('starttls')) { + if(!@ldap_start_tls($this->con)) { + msg('Starting TLS failed', -1); + $this->_debug('LDAP TLS set: '.htmlspecialchars(ldap_error($this->con)), 0, __LINE__, __FILE__); } } // needs version 3 - if(isset($this->cnf['referrals'])) { - if(!@ldap_set_option($this->con, LDAP_OPT_REFERRALS, - $this->cnf['referrals'])){ - msg('Setting LDAP referrals to off failed',-1); - if($this->cnf['debug']) - msg('LDAP referal set: '.htmlspecialchars(ldap_error($this->con)),0,__LINE__,__FILE__); + if($this->getConf('referrals')) { + if(!@ldap_set_option( + $this->con, LDAP_OPT_REFERRALS, + $this->getConf('referrals') + ) + ) { + msg('Setting LDAP referrals to off failed', -1); + $this->_debug('LDAP referal set: '.htmlspecialchars(ldap_error($this->con)), 0, __LINE__, __FILE__); } } } } //set deref mode - if($this->cnf['deref']){ - if(!@ldap_set_option($this->con, LDAP_OPT_DEREF, $this->cnf['deref'])){ - msg('Setting LDAP Deref mode '.$this->cnf['deref'].' failed',-1); - if($this->cnf['debug']) - msg('LDAP deref set: '.htmlspecialchars(ldap_error($this->con)),0,__LINE__,__FILE__); + if($this->getConf('deref')) { + if(!@ldap_set_option($this->con, LDAP_OPT_DEREF, $this->getConf('deref'))) { + msg('Setting LDAP Deref mode '.$this->getConf('deref').' failed', -1); + $this->_debug('LDAP deref set: '.htmlspecialchars(ldap_error($this->con)), 0, __LINE__, __FILE__); } } /* As of PHP 5.3.0 we can set timeout to speedup skipping of invalid servers */ - if (defined('LDAP_OPT_NETWORK_TIMEOUT')) { + if(defined('LDAP_OPT_NETWORK_TIMEOUT')) { ldap_set_option($this->con, LDAP_OPT_NETWORK_TIMEOUT, 1); } $bound = @ldap_bind($this->con); - if ($bound) { + if($bound) { break; } } if(!$bound) { - msg("LDAP: couldn't connect to LDAP server",-1); + msg("LDAP: couldn't connect to LDAP server", -1); return false; } - - $this->canDo['getUsers'] = true; + $this->cando['getUsers'] = true; return true; } /** * Wraps around ldap_search, ldap_list or ldap_read depending on $scope * - * @param $scope string - can be 'base', 'one' or 'sub' * @author Andreas Gohr + * @param resource $link_identifier + * @param string $base_dn + * @param string $filter + * @param string $scope can be 'base', 'one' or 'sub' + * @param null $attributes + * @param int $attrsonly + * @param int $sizelimit + * @param int $timelimit + * @param int $deref + * @return resource */ - function _ldapsearch($link_identifier, $base_dn, $filter, $scope='sub', $attributes=null, - $attrsonly=0, $sizelimit=0, $timelimit=0, $deref=LDAP_DEREF_NEVER){ + protected function _ldapsearch($link_identifier, $base_dn, $filter, $scope = 'sub', $attributes = null, + $attrsonly = 0, $sizelimit = 0, $timelimit = 0, $deref = LDAP_DEREF_NEVER) { if(is_null($attributes)) $attributes = array(); - if($scope == 'base'){ - return @ldap_read($link_identifier, $base_dn, $filter, $attributes, - $attrsonly, $sizelimit, $timelimit, $deref); - }elseif($scope == 'one'){ - return @ldap_list($link_identifier, $base_dn, $filter, $attributes, - $attrsonly, $sizelimit, $timelimit, $deref); - }else{ - return @ldap_search($link_identifier, $base_dn, $filter, $attributes, - $attrsonly, $sizelimit, $timelimit, $deref); + if($scope == 'base') { + return @ldap_read( + $link_identifier, $base_dn, $filter, $attributes, + $attrsonly, $sizelimit, $timelimit, $deref + ); + } elseif($scope == 'one') { + return @ldap_list( + $link_identifier, $base_dn, $filter, $attributes, + $attrsonly, $sizelimit, $timelimit, $deref + ); + } else { + return @ldap_search( + $link_identifier, $base_dn, $filter, $attributes, + $attrsonly, $sizelimit, $timelimit, $deref + ); } } + + /** + * Wrapper around msg() but outputs only when debug is enabled + * + * @param string $message + * @param int $err + * @param int $line + * @param string $file + * @return void + */ + protected function _debug($message, $err, $line, $file) { + if(!$this->getConf('debug')) return; + msg($message, $err, $line, $file); + } + } diff --git a/lib/plugins/authldap/conf/default.php b/lib/plugins/authldap/conf/default.php new file mode 100644 index 000000000..35971d41d --- /dev/null +++ b/lib/plugins/authldap/conf/default.php @@ -0,0 +1,7 @@ + Date: Sat, 2 Feb 2013 13:32:24 +0100 Subject: dded config metadata for authldap plugin --- lib/plugins/authldap/conf/metadata.php | 17 +++++++++++++++++ lib/plugins/authldap/lang/en/settings.php | 15 +++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 lib/plugins/authldap/conf/metadata.php create mode 100644 lib/plugins/authldap/lang/en/settings.php (limited to 'lib/plugins/authldap') diff --git a/lib/plugins/authldap/conf/metadata.php b/lib/plugins/authldap/conf/metadata.php new file mode 100644 index 000000000..e0815f789 --- /dev/null +++ b/lib/plugins/authldap/conf/metadata.php @@ -0,0 +1,17 @@ + array('sub','one','base')); +$meta['groupscope'] = array('multichoice','_choices' => array('sub','one','base')); +$meta['debug'] = array('onoff'); \ No newline at end of file diff --git a/lib/plugins/authldap/lang/en/settings.php b/lib/plugins/authldap/lang/en/settings.php new file mode 100644 index 000000000..e3f4bab31 --- /dev/null +++ b/lib/plugins/authldap/lang/en/settings.php @@ -0,0 +1,15 @@ +localhost) or full qualified URL (ldap://server.tld:389)'; +$lang['port'] = 'LDAP server port if no full URL was given above'; +$lang['usertree'] = 'Where to finde the user accounts. Eg. ou=People, dc=server, dc=tld'; +$lang['grouptree'] = 'Where to find the user groups. Eg. ou=Group, dc=server, dc=tld'; +$lang['userfilter'] = 'LDAP filter to search for user accounts. Eg. (&(uid=%{user})(objectClass=posixAccount))'; +$lang['groupfilter'] = 'LDAP filter to search for groups. Eg. (&(objectClass=posixGroup)(|(gidNumber=%{gid})(memberUID=%{user})))'; +$lang['version'] = 'The protocol version to use. You may need to set this to 3'; +$lang['starttls'] = 'Use TLS connections?'; +$lang['referrals'] = 'Shall referrals be followed?'; +$lang['binddn'] = 'DN of an ptional bind user if anonymous bind is not sufficient. Eg. cn=admin, dc=my, dc=home'; +$lang['bindpw'] = 'Password of above user'; +$lang['userscope'] = 'Limit search scope for user search'; +$lang['groupscope'] = 'Limit search scope for group search'; +$lang['debug'] = 'Display additional debug information on errors'; \ No newline at end of file -- cgit v1.2.3 From 45970804e69e3d087fe19ad9cefaff0ef44be795 Mon Sep 17 00:00:00 2001 From: Klap-in Date: Sat, 16 Feb 2013 22:53:38 +0100 Subject: Complete metadata and defaults of auth plugin configs --- lib/plugins/authldap/conf/default.php | 20 ++++++++++++++++---- lib/plugins/authldap/conf/metadata.php | 1 + lib/plugins/authldap/lang/en/settings.php | 5 ++++- 3 files changed, 21 insertions(+), 5 deletions(-) (limited to 'lib/plugins/authldap') diff --git a/lib/plugins/authldap/conf/default.php b/lib/plugins/authldap/conf/default.php index 35971d41d..d07f9c82e 100644 --- a/lib/plugins/authldap/conf/default.php +++ b/lib/plugins/authldap/conf/default.php @@ -1,7 +1,19 @@ array('sub','one','base')); $meta['groupscope'] = array('multichoice','_choices' => array('sub','one','base')); +$meta['groupkey'] = array('string'); $meta['debug'] = array('onoff'); \ No newline at end of file diff --git a/lib/plugins/authldap/lang/en/settings.php b/lib/plugins/authldap/lang/en/settings.php index e3f4bab31..f20b7d2a3 100644 --- a/lib/plugins/authldap/lang/en/settings.php +++ b/lib/plugins/authldap/lang/en/settings.php @@ -12,4 +12,7 @@ $lang['binddn'] = 'DN of an ptional bind user if anonymous bind is not suff $lang['bindpw'] = 'Password of above user'; $lang['userscope'] = 'Limit search scope for user search'; $lang['groupscope'] = 'Limit search scope for group search'; -$lang['debug'] = 'Display additional debug information on errors'; \ No newline at end of file +$lang['groupkey'] = 'Group member ship from any user attribute (instead of standard AD groups) e.g. group from department or telephone number'; +$lang['debug'] = 'Display additional debug information on errors'; + + -- cgit v1.2.3 From 4005b0809260fbd36cb8652c7d726a5ee417c6f6 Mon Sep 17 00:00:00 2001 From: Anika Henke Date: Sat, 16 Feb 2013 19:42:38 +0000 Subject: fixed html error in plugin lang file --- lib/plugins/authldap/lang/en/settings.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/plugins/authldap') diff --git a/lib/plugins/authldap/lang/en/settings.php b/lib/plugins/authldap/lang/en/settings.php index e3f4bab31..cc9143169 100644 --- a/lib/plugins/authldap/lang/en/settings.php +++ b/lib/plugins/authldap/lang/en/settings.php @@ -3,8 +3,8 @@ $lang['server'] = 'Your LDAP server. Either hostname (localhost Date: Sat, 16 Feb 2013 23:55:52 +0100 Subject: litte fixes --- lib/plugins/authldap/lang/en/settings.php | 2 -- 1 file changed, 2 deletions(-) (limited to 'lib/plugins/authldap') diff --git a/lib/plugins/authldap/lang/en/settings.php b/lib/plugins/authldap/lang/en/settings.php index bca666e9f..0bb397be5 100644 --- a/lib/plugins/authldap/lang/en/settings.php +++ b/lib/plugins/authldap/lang/en/settings.php @@ -14,5 +14,3 @@ $lang['userscope'] = 'Limit search scope for user search'; $lang['groupscope'] = 'Limit search scope for group search'; $lang['groupkey'] = 'Group member ship from any user attribute (instead of standard AD groups) e.g. group from department or telephone number'; $lang['debug'] = 'Display additional debug information on errors'; - - -- cgit v1.2.3 From d00152be83dd30024aa5dd89b9ad9a70eb25d80f Mon Sep 17 00:00:00 2001 From: Lorenzo Radaelli Date: Sun, 24 Feb 2013 10:36:18 +0100 Subject: Italian language update --- lib/plugins/authldap/lang/it/settings.php | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 lib/plugins/authldap/lang/it/settings.php (limited to 'lib/plugins/authldap') diff --git a/lib/plugins/authldap/lang/it/settings.php b/lib/plugins/authldap/lang/it/settings.php new file mode 100644 index 000000000..10ae72f87 --- /dev/null +++ b/lib/plugins/authldap/lang/it/settings.php @@ -0,0 +1,5 @@ + Date: Sun, 24 Feb 2013 10:37:45 +0100 Subject: Simplified Chinese language update --- lib/plugins/authldap/lang/zh/settings.php | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 lib/plugins/authldap/lang/zh/settings.php (limited to 'lib/plugins/authldap') diff --git a/lib/plugins/authldap/lang/zh/settings.php b/lib/plugins/authldap/lang/zh/settings.php new file mode 100644 index 000000000..e84511b42 --- /dev/null +++ b/lib/plugins/authldap/lang/zh/settings.php @@ -0,0 +1,20 @@ + + */ +$lang['server'] = '您的 LDAP 服务器。填写主机名 (localhost) 或者完整的 URL (ldap://server.tld:389)'; +$lang['port'] = 'LDAP 服务器端口 (如果上面没有给出完整的 URL)'; +$lang['usertree'] = '何处查找用户账户。例如 ou=People, dc=server, dc=tld'; +$lang['grouptree'] = '何处查找用户组。例如 ou=Group, dc=server, dc=tld'; +$lang['userfilter'] = '用于搜索用户账户的 LDAP 筛选器。例如 (&(uid=%{user})(objectClass=posixAccount))'; +$lang['groupfilter'] = '用于搜索组的 LDAP 筛选器。例如 (&(objectClass=posixGroup)(|(gidNumber=%{gid})(memberUID=%{user})))'; +$lang['version'] = '使用的协议版本。您或许需要设置为 3'; +$lang['starttls'] = '使用 TLS 连接?'; +$lang['referrals'] = '是否允许引用 (referrals)?'; +$lang['binddn'] = '一个可选的绑定用户的 DN (如果匿名绑定不满足要求)。例如 Eg. cn=admin, dc=my, dc=home'; +$lang['bindpw'] = '上述用户的密码'; +$lang['userscope'] = '限制用户搜索的范围'; +$lang['groupscope'] = '限制组搜索的范围'; +$lang['debug'] = '有错误时显示额外的调试信息'; -- cgit v1.2.3 From 338ac38c748d94f32ca394dc604dda97ce6762e3 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sun, 24 Feb 2013 10:39:52 +0100 Subject: fixed typos --- lib/plugins/authldap/lang/en/settings.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/plugins/authldap') diff --git a/lib/plugins/authldap/lang/en/settings.php b/lib/plugins/authldap/lang/en/settings.php index 0bb397be5..ddedf8ae3 100644 --- a/lib/plugins/authldap/lang/en/settings.php +++ b/lib/plugins/authldap/lang/en/settings.php @@ -1,14 +1,14 @@ localhost) or full qualified URL (ldap://server.tld:389)'; $lang['port'] = 'LDAP server port if no full URL was given above'; -$lang['usertree'] = 'Where to finde the user accounts. Eg. ou=People, dc=server, dc=tld'; +$lang['usertree'] = 'Where to find the user accounts. Eg. ou=People, dc=server, dc=tld'; $lang['grouptree'] = 'Where to find the user groups. Eg. ou=Group, dc=server, dc=tld'; $lang['userfilter'] = 'LDAP filter to search for user accounts. Eg. (&(uid=%{user})(objectClass=posixAccount))'; $lang['groupfilter'] = 'LDAP filter to search for groups. Eg. (&(objectClass=posixGroup)(|(gidNumber=%{gid})(memberUID=%{user})))'; $lang['version'] = 'The protocol version to use. You may need to set this to 3'; $lang['starttls'] = 'Use TLS connections?'; $lang['referrals'] = 'Shall referrals be followed?'; -$lang['binddn'] = 'DN of an ptional bind user if anonymous bind is not sufficient. Eg. cn=admin, dc=my, dc=home'; +$lang['binddn'] = 'DN of an optional bind user if anonymous bind is not sufficient. Eg. cn=admin, dc=my, dc=home'; $lang['bindpw'] = 'Password of above user'; $lang['userscope'] = 'Limit search scope for user search'; $lang['groupscope'] = 'Limit search scope for group search'; -- cgit v1.2.3 From 03583750eb3b0245839ba46c1b1fb25eac66f3a0 Mon Sep 17 00:00:00 2001 From: Kiril LastName Date: Wed, 6 Mar 2013 23:10:47 +0200 Subject: Bulgarian language update --- lib/plugins/authldap/lang/bg/settings.php | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 lib/plugins/authldap/lang/bg/settings.php (limited to 'lib/plugins/authldap') diff --git a/lib/plugins/authldap/lang/bg/settings.php b/lib/plugins/authldap/lang/bg/settings.php new file mode 100644 index 000000000..644672ca7 --- /dev/null +++ b/lib/plugins/authldap/lang/bg/settings.php @@ -0,0 +1,19 @@ + + */ +$lang['server'] = 'Вашият LDAP сървър. Име на хоста (localhost) или целият URL адрес (ldap://сървър.tld:389)'; +$lang['port'] = 'Порт на LDAP сървъра, ако не сте въвели целия URL адрес по-горе'; +$lang['usertree'] = 'Къде да се търси за потребителски акаунти. Например ou=People, dc=server, dc=tld'; +$lang['grouptree'] = 'Къде да се търси за потребителски групи. Например ou=Group, dc=server, dc=tld'; +$lang['userfilter'] = 'LDAP филтър за търсене на потребителски акаунти. Например (&(uid=%{user})(objectClass=posixAccount))'; +$lang['groupfilter'] = 'LDAP филтър за търсене на потребителски групи. Например (&(objectClass=posixGroup)(|(gidNumber=%{gid})(memberUID=%{user})))'; +$lang['version'] = 'Коя версия на протокола да се ползва? Вероятно ще се наложи да зададете 3'; +$lang['starttls'] = 'Ползване на TLS свързаност?'; +$lang['referrals'] = 'Да бъдат ли следвани препратките (препращанията)?'; +$lang['bindpw'] = 'Парола за горния потребител'; +$lang['userscope'] = 'Ограничаване на обхвата за търсене на потребители'; +$lang['groupscope'] = 'Ограничаване на обхвата за търсене на потребителски групи'; +$lang['debug'] = 'Показване на допълнителна debug информация при грешка'; \ No newline at end of file -- cgit v1.2.3 From 5b84f8e9c9749b424f3813f7126245330a7deb1c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=97=A5=E5=90=91=E5=B0=8F=E9=83=8E?= Date: Mon, 11 Mar 2013 15:33:07 +0100 Subject: Traditional chinese language update --- lib/plugins/authldap/lang/zh-tw/settings.php | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 lib/plugins/authldap/lang/zh-tw/settings.php (limited to 'lib/plugins/authldap') diff --git a/lib/plugins/authldap/lang/zh-tw/settings.php b/lib/plugins/authldap/lang/zh-tw/settings.php new file mode 100644 index 000000000..e93190516 --- /dev/null +++ b/lib/plugins/authldap/lang/zh-tw/settings.php @@ -0,0 +1,21 @@ +localhost) 或完整的 URL (ldap://server.tld:389)'; +$lang['port'] = 'LDAP 伺服器端口 (若上方沒填寫完整的 URL)'; +$lang['usertree'] = '到哪裏尋找使用者帳號?如: ou=People, dc=server, dc=tld'; +$lang['grouptree'] = '到哪裏尋找使用者群組?如: ou=Group, dc=server, dc=tld'; +$lang['userfilter'] = '用於搜索使用者賬號的 LDAP 篩選器。如: (&(uid=%{user})(objectClass=posixAccount))'; +$lang['groupfilter'] = '用於搜索群組的 LDAP 篩選器。例如 (&(objectClass=posixGroup)(|(gidNumber=%{gid})(memberUID=%{user})))'; +$lang['version'] = '使用的通訊協定版本。您可能要設置為 3'; +$lang['starttls'] = '使用 TLS 連接嗎?'; +$lang['referrals'] = '是否允許引用 (referrals)?'; +$lang['binddn'] = '非必要綁定使用者 (optional bind user) 的 DN (匿名綁定不能滿足要求時使用)。如: cn=admin, dc=my, dc=home'; +$lang['bindpw'] = '上述使用者的密碼'; +$lang['userscope'] = '限制使用者搜索的範圍'; +$lang['groupscope'] = '限制群組搜索的範圍'; +$lang['groupkey'] = '以其他使用者屬性 (而非標準 AD 群組) 來把使用者分組,例如以部門或電話號碼分類'; +$lang['debug'] = '有錯誤時,顯示額外除錯資訊'; -- cgit v1.2.3 From df60eba1d79b8a3e9a5dda87cb3466f0b7b9d454 Mon Sep 17 00:00:00 2001 From: Bruno Veilleux Date: Mon, 11 Mar 2013 15:34:55 +0100 Subject: French language update --- lib/plugins/authldap/lang/fr/settings.php | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 lib/plugins/authldap/lang/fr/settings.php (limited to 'lib/plugins/authldap') diff --git a/lib/plugins/authldap/lang/fr/settings.php b/lib/plugins/authldap/lang/fr/settings.php new file mode 100644 index 000000000..3df09eb7c --- /dev/null +++ b/lib/plugins/authldap/lang/fr/settings.php @@ -0,0 +1,21 @@ + + */ +$lang['server'] = 'Votre serveur LDAP. Soit le nom d\'hôte (localhost) ou l\'URL complète (ldap://serveur.dom:389)'; +$lang['port'] = 'Port du serveur LDAP si l\'URL complète n\'a pas été indiquée ci-dessus'; +$lang['usertree'] = 'Où trouver les comptes utilisateur. Ex.: ou=Utilisateurs, dc=serveur, dc=dom'; +$lang['grouptree'] = 'Où trouver les groupes d\'utilisateurs. Ex.: ou=Groupes, dc=serveur, dc=dom'; +$lang['userfilter'] = 'Filtre LDAP pour rechercher les comptes utilisateur. Ex.: (&(uid=%{user})(objectClass=posixAccount))'; +$lang['groupfilter'] = 'Filtre LDAP pour rechercher les groupes. Ex.: (&(objectClass=posixGroup)(|(gidNumber=%{gid})(memberUID=%{user})))'; +$lang['version'] = 'La version de protocole à utiliser. Il se peut que vous deviez utiliser 3'; +$lang['starttls'] = 'Utiliser les connexions TLS?'; +$lang['referrals'] = 'Suivre les références?'; +$lang['binddn'] = 'Nom de domaine d\'un utilisateur de connexion facultatif si une connexion anonyme n\'est pas suffisante. Ex. : cn=admin, dc=mon, dc=accueil'; +$lang['bindpw'] = 'Mot de passe de l\'utilisateur ci-dessus.'; +$lang['userscope'] = 'Limiter la portée de recherche d\'utilisateurs'; +$lang['groupscope'] = 'Limiter la portée de recherche de groupes'; +$lang['groupkey'] = 'Affiliation aux groupes à partir de n\'importe quel attribut utilisateur (au lieu des groupes AD standards), p. ex. groupes par département ou numéro de téléphone'; +$lang['debug'] = 'Afficher des informations de bégogage supplémentaires pour les erreurs'; -- cgit v1.2.3 From 421bfa826519712385983d37cb67a4f69b918674 Mon Sep 17 00:00:00 2001 From: Robert Bogenschneider Date: Mon, 11 Mar 2013 15:37:25 +0100 Subject: Esperanto language update --- lib/plugins/authldap/lang/eo/settings.php | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 lib/plugins/authldap/lang/eo/settings.php (limited to 'lib/plugins/authldap') diff --git a/lib/plugins/authldap/lang/eo/settings.php b/lib/plugins/authldap/lang/eo/settings.php new file mode 100644 index 000000000..2863a1125 --- /dev/null +++ b/lib/plugins/authldap/lang/eo/settings.php @@ -0,0 +1,20 @@ +localhost) aŭ plene detala URL (ldap://servilo.lando:389)'; +$lang['port'] = 'LDAP-servila pordego, se vi supre ne indikis la plenan URL'; +$lang['usertree'] = 'Kie trovi uzantajn kontojn, ekz. ou=Personoj, dc=servilo, dc=lando'; +$lang['grouptree'] = 'Kie trovi uzantogrupojn, ekz. ou=Grupo, dc=servilo, dc=lando'; +$lang['userfilter'] = 'LDAP-filtrilo por serĉi uzantokontojn, ekz. (&(uid=%{user})(objectClass=posixAccount))'; +$lang['groupfilter'] = 'LDAP-filtrilo por serĉi grupojn, ekz. (&(objectClass=posixGroup)(|(gidNumber=%{gid})(memberUID=%{user})))'; +$lang['version'] = 'La uzenda protokolversio. Eble necesas indiki 3'; +$lang['starttls'] = 'Ĉu uzi TLS-konektojn?'; +$lang['referrals'] = 'Ĉu sekvi referencojn?'; +$lang['binddn'] = 'DN de opcie bindita uzanto, se anonima bindado ne sufiĉas, ekz. cn=admin, dc=mia, dc=hejmo'; +$lang['bindpw'] = 'Pasvorto de tiu uzanto'; +$lang['userscope'] = 'Limigi serĉospacon de uzantaj serĉoj'; +$lang['groupscope'] = 'Limigi serĉospacon por grupaj serĉoj'; +$lang['groupkey'] = 'Grupa membreco de iu uzanta atributo (anstataŭ standardaj AD-grupoj), ekz. grupo de departemento aŭ telefonnumero'; +$lang['debug'] = 'Ĉu montri aldonajn erarinformojn?'; -- cgit v1.2.3 From 8b5e2fdbb74e3a04fb31fce01b4cd316fa1a1f40 Mon Sep 17 00:00:00 2001 From: lainme Date: Mon, 11 Mar 2013 15:39:37 +0100 Subject: Simplified Chinese language update --- lib/plugins/authldap/lang/zh/settings.php | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/plugins/authldap') diff --git a/lib/plugins/authldap/lang/zh/settings.php b/lib/plugins/authldap/lang/zh/settings.php index e84511b42..2dfbeb464 100644 --- a/lib/plugins/authldap/lang/zh/settings.php +++ b/lib/plugins/authldap/lang/zh/settings.php @@ -17,4 +17,5 @@ $lang['binddn'] = '一个可选的绑定用户的 DN (如果匿 $lang['bindpw'] = '上述用户的密码'; $lang['userscope'] = '限制用户搜索的范围'; $lang['groupscope'] = '限制组搜索的范围'; +$lang['groupkey'] = '根据任何用户属性得来的组成员(而不是标准的 AD 组),例如根据部门或者电话号码得到的组。'; $lang['debug'] = '有错误时显示额外的调试信息'; -- cgit v1.2.3 From e20faad8330af3e6f2edbd6e8dc3f70c05305492 Mon Sep 17 00:00:00 2001 From: Victor Westmann Date: Sun, 24 Mar 2013 10:28:51 +0100 Subject: Brazilian Portuguese language update --- lib/plugins/authldap/lang/pt-br/settings.php | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 lib/plugins/authldap/lang/pt-br/settings.php (limited to 'lib/plugins/authldap') diff --git a/lib/plugins/authldap/lang/pt-br/settings.php b/lib/plugins/authldap/lang/pt-br/settings.php new file mode 100644 index 000000000..daf9efd00 --- /dev/null +++ b/lib/plugins/authldap/lang/pt-br/settings.php @@ -0,0 +1,19 @@ + + */ +$lang['server'] = 'Seu servidor LDAP. Ou hostname (localhost) ou uma URL completa (ldap://server.tld:389)'; +$lang['port'] = 'Porta LDAP do servidor se nenhuma URL completa tiver sido fornecida acima'; +$lang['usertree'] = 'Onde encontrar as contas de usuários. Eg. ou=Pessoas, dc=servidor, dc=tld'; +$lang['grouptree'] = 'Onde encontrar os grupos de usuários. Eg. ou=Pessoas, dc=servidor, dc=tld'; +$lang['version'] = 'A versão do protocolo para usar. Você talvez deva definir isto para 3'; +$lang['starttls'] = 'Usar conexões TLS?'; +$lang['referrals'] = 'Permitir referências serem seguidas?'; +$lang['binddn'] = 'DN de um vínculo opcional de usuário se vínculo anônimo não for suficiente. Eg. cn=admin, dc=my, dc=home'; +$lang['bindpw'] = 'Senha do usuário acima'; +$lang['userscope'] = 'Limitar escopo da busca para busca de usuário'; +$lang['groupscope'] = 'Limitar escopo da busca para busca de grupo'; +$lang['groupkey'] = 'Membro de grupo vem de qualquer atributo do usuário (ao invés de grupos padrões AD) e.g. departamento de grupo ou número de telefone'; +$lang['debug'] = 'Mostrar informações adicionais de depuração em erros'; -- cgit v1.2.3 From 14bc69e3e1db81c4d329a140cb0e095f0dcf9b5e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=9D=B4=EB=AA=85=EC=A7=84?= Date: Sun, 24 Mar 2013 10:30:58 +0100 Subject: Korean language update --- lib/plugins/authldap/lang/ko/settings.php | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 lib/plugins/authldap/lang/ko/settings.php (limited to 'lib/plugins/authldap') diff --git a/lib/plugins/authldap/lang/ko/settings.php b/lib/plugins/authldap/lang/ko/settings.php new file mode 100644 index 000000000..6c80414d3 --- /dev/null +++ b/lib/plugins/authldap/lang/ko/settings.php @@ -0,0 +1,10 @@ + + */ +$lang['server'] = 'LDAP 서버. 호스트 이름(localhost)이나 전체 자격 URL(ldap://server.tld:389) 중 하나'; +$lang['port'] = '위에 주어진 전체 URL이 없을 때의 LDAP 서버 포트'; +$lang['starttls'] = 'TLS 연결을 사용하겠습니까?'; +$lang['debug'] = '오류에 대한 추가적인 디버그 정보를 보이기'; -- cgit v1.2.3 From f2b500f5e7be771601ea1b1bc110337883d7caf2 Mon Sep 17 00:00:00 2001 From: Frank Loizzi Date: Sun, 24 Mar 2013 10:32:26 +0100 Subject: German (informal) language update --- lib/plugins/authldap/lang/de-informal/settings.php | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 lib/plugins/authldap/lang/de-informal/settings.php (limited to 'lib/plugins/authldap') diff --git a/lib/plugins/authldap/lang/de-informal/settings.php b/lib/plugins/authldap/lang/de-informal/settings.php new file mode 100644 index 000000000..e7b3d2673 --- /dev/null +++ b/lib/plugins/authldap/lang/de-informal/settings.php @@ -0,0 +1,6 @@ + + */ -- cgit v1.2.3 From f6af1fe63a13b2734d1b69817ec800c51e6def9c Mon Sep 17 00:00:00 2001 From: lupo49 Date: Sun, 31 Mar 2013 20:40:03 +0200 Subject: de/de-informal: language updates for the core, authldap, authmysql, authpgsql --- lib/plugins/authldap/lang/de-informal/settings.php | 20 ++++++++++++++++++-- lib/plugins/authldap/lang/de/settings.php | 22 ++++++++++++++++++++++ 2 files changed, 40 insertions(+), 2 deletions(-) create mode 100644 lib/plugins/authldap/lang/de/settings.php (limited to 'lib/plugins/authldap') diff --git a/lib/plugins/authldap/lang/de-informal/settings.php b/lib/plugins/authldap/lang/de-informal/settings.php index e7b3d2673..fa0fc1521 100644 --- a/lib/plugins/authldap/lang/de-informal/settings.php +++ b/lib/plugins/authldap/lang/de-informal/settings.php @@ -1,6 +1,22 @@ + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * @author Matthias Schulte */ +$lang['server'] = 'Adresse zum LDAP-Server. Entweder als Hostname (localhost) oder als FQDN (ldap://server.tld:389).'; +$lang['port'] = 'Port des LDAP-Servers, falls kein Port angegeben wurde.'; +$lang['usertree'] = 'Zweig, in dem die die Benutzeraccounts gespeichert sind. Zum Beispiel: ou=People, dc=server, dc=tld.'; +$lang['grouptree'] = 'Zweig, in dem die Benutzergruppen gespeichert sind. Zum Beispiel: ou=Group, dc=server, dc=tld.'; +$lang['userfilter'] = 'LDAP-Filter, um die Benutzeraccounts zu suchen. Zum Beispiel: (&(uid=%{user})(objectClass=posixAccount)).'; +$lang['groupfilter'] = 'LDAP-Filter, um die Benutzergruppen zu suchen. Zum Beispiel: (&(objectClass=posixGroup)(|(gidNumber=%{gid})(memberUID=%{user}))).'; +$lang['version'] = 'Zu verwendende Protokollversion von LDAP.'; +$lang['starttls'] = 'Verbindung über TLS aufbauen?'; +$lang['referrals'] = 'Weiterverfolgen von LDAP-Referrals (Verweise)?'; +$lang['binddn'] = 'DN eines optionalen Benutzers, wenn der anonyme Zugriff nicht ausreichend ist. Zum Beispiel: cn=admin, dc=my, dc=home.'; +$lang['bindpw'] = 'Passwort des angegebenen Benutzers.'; +$lang['userscope'] = 'Die Suchweite nach Benutzeraccounts.'; +$lang['groupscope'] = 'Die Suchweite nach Benutzergruppen.'; +$lang['groupkey'] = 'Gruppieren der Benutzeraccounts anhand eines beliebigen Benutzerattributes z. B. Telefonnummer oder Abteilung, anstelle der Standard-Gruppen).'; +$lang['debug'] = 'Debug-Informationen beim Auftreten von Fehlern anzeigen?'; diff --git a/lib/plugins/authldap/lang/de/settings.php b/lib/plugins/authldap/lang/de/settings.php new file mode 100644 index 000000000..b237201d8 --- /dev/null +++ b/lib/plugins/authldap/lang/de/settings.php @@ -0,0 +1,22 @@ + + */ +$lang['server'] = 'Adresse zum LDAP-Server. Entweder als Hostname (localhost) oder als FQDN (ldap://server.tld:389).'; +$lang['port'] = 'Port des LDAP-Servers, falls kein Port angegeben wurde.'; +$lang['usertree'] = 'Zweig, in dem die die Benutzeraccounts gespeichert sind. Zum Beispiel: ou=People, dc=server, dc=tld.'; +$lang['grouptree'] = 'Zweig, in dem die Benutzergruppen gespeichert sind. Zum Beispiel: ou=Group, dc=server, dc=tld.'; +$lang['userfilter'] = 'LDAP-Filter, um die Benutzeraccounts zu suchen. Zum Beispiel: (&(uid=%{user})(objectClass=posixAccount)).'; +$lang['groupfilter'] = 'LDAP-Filter, um die Benutzergruppen zu suchen. Zum Beispiel: (&(objectClass=posixGroup)(|(gidNumber=%{gid})(memberUID=%{user}))).'; +$lang['version'] = 'Zu verwendende Protokollversion von LDAP.'; +$lang['starttls'] = 'Verbindung über TLS aufbauen?'; +$lang['referrals'] = 'Weiterverfolgen von LDAP-Referrals (Verweise)?'; +$lang['binddn'] = 'DN eines optionalen Benutzers, wenn der anonyme Zugriff nicht ausreichend ist. Zum Beispiel: cn=admin, dc=my, dc=home.'; +$lang['bindpw'] = 'Passwort des angegebenen Benutzers.'; +$lang['userscope'] = 'Die Suchweite nach Benutzeraccounts.'; +$lang['groupscope'] = 'Die Suchweite nach Benutzergruppen.'; +$lang['groupkey'] = 'Gruppieren der Benutzeraccounts anhand eines beliebigen Benutzerattributes z. B. Telefonnummer oder Abteilung, anstelle der Standard-Gruppen).'; +$lang['debug'] = 'Debug-Informationen beim Auftreten von Fehlern anzeigen?'; -- cgit v1.2.3 From 8ee0487708ea528ade7e43e3688cfd14cf6a7582 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=9D=B4=EB=AA=85=EC=A7=84?= Date: Thu, 4 Apr 2013 20:43:19 +0200 Subject: Korean language update --- lib/plugins/authldap/lang/ko/settings.php | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'lib/plugins/authldap') diff --git a/lib/plugins/authldap/lang/ko/settings.php b/lib/plugins/authldap/lang/ko/settings.php index 6c80414d3..7f7efe8d0 100644 --- a/lib/plugins/authldap/lang/ko/settings.php +++ b/lib/plugins/authldap/lang/ko/settings.php @@ -6,5 +6,16 @@ */ $lang['server'] = 'LDAP 서버. 호스트 이름(localhost)이나 전체 자격 URL(ldap://server.tld:389) 중 하나'; $lang['port'] = '위에 주어진 전체 URL이 없을 때의 LDAP 서버 포트'; +$lang['usertree'] = '사용자 계정을 찾을 장소. 예를 들어 ou=People, dc=server, dc=tld'; +$lang['grouptree'] = '사용자 그룹을 찾을 장소. 예를 들어 ou=Group, dc=server, dc=tld'; +$lang['userfilter'] = '사용자 계정을 찾을 LDAP 필터. 예를 들어 (&(uid=%{user})(objectClass=posixAccount))'; +$lang['groupfilter'] = '그룹을 찾을 LDAP 필터. 예를 들어 (&(objectClass=posixGroup)(|(gidNumber=%{gid})(memberUID=%{user})))'; +$lang['version'] = '사용할 프로토콜 버전. 3으로 설정해야 할 수도 있습니다'; $lang['starttls'] = 'TLS 연결을 사용하겠습니까?'; +$lang['referrals'] = '참고(referrals)를 허용하겠습니까? '; +$lang['binddn'] = '익명 바인드가 충분하지 않으면 선택적인 바인드 사용자의 DN. 예를 들어 cn=admin, dc=my, dc=home'; +$lang['bindpw'] = '위 사용자의 비밀번호'; +$lang['userscope'] = '사용자 찾기에 대한 찾기 범위 제한'; +$lang['groupscope'] = '그룹 찾기에 대한 찾기 범위 제한'; +$lang['groupkey'] = '(표준 AD 그룹 대신) 사용자 속성에서 그룹 구성원. 예를 들어 부서나 전화에서 그룹'; $lang['debug'] = '오류에 대한 추가적인 디버그 정보를 보이기'; -- cgit v1.2.3 From e0c4e620222bfa7d72897f0ab783cd1d30ef1d66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=9D=B4=EB=AA=85=EC=A7=84?= Date: Thu, 4 Apr 2013 20:44:23 +0200 Subject: Chinese language update --- lib/plugins/authldap/lang/zh/settings.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/plugins/authldap') diff --git a/lib/plugins/authldap/lang/zh/settings.php b/lib/plugins/authldap/lang/zh/settings.php index 2dfbeb464..3f38deae9 100644 --- a/lib/plugins/authldap/lang/zh/settings.php +++ b/lib/plugins/authldap/lang/zh/settings.php @@ -13,7 +13,7 @@ $lang['groupfilter'] = '用于搜索组的 LDAP 筛选器。例如 Date: Thu, 4 Apr 2013 20:46:28 +0200 Subject: Latvian language update --- lib/plugins/authldap/lang/lv/settings.php | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 lib/plugins/authldap/lang/lv/settings.php (limited to 'lib/plugins/authldap') diff --git a/lib/plugins/authldap/lang/lv/settings.php b/lib/plugins/authldap/lang/lv/settings.php new file mode 100644 index 000000000..ced5dabf8 --- /dev/null +++ b/lib/plugins/authldap/lang/lv/settings.php @@ -0,0 +1,6 @@ + + */ -- cgit v1.2.3 From 02ea0357f6a255b0f65c967112e6a6d9ec1fa116 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Koot?= Date: Thu, 4 Apr 2013 20:48:39 +0200 Subject: Dutch language update --- lib/plugins/authldap/lang/nl/settings.php | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 lib/plugins/authldap/lang/nl/settings.php (limited to 'lib/plugins/authldap') diff --git a/lib/plugins/authldap/lang/nl/settings.php b/lib/plugins/authldap/lang/nl/settings.php new file mode 100644 index 000000000..274c3b7fc --- /dev/null +++ b/lib/plugins/authldap/lang/nl/settings.php @@ -0,0 +1,20 @@ +localhost) of volledige URL (ldap://server.tld:389)'; +$lang['port'] = 'LDAP server poort als hiervoor geen volledige URL is opgegeven'; +$lang['usertree'] = 'Locatie van de gebruikersaccounts. Bijv. ou=Personen,dc=server,dc=tld'; +$lang['grouptree'] = 'Locatie van de gebruikersgroepen. Bijv. ou=Group,dc=server,dc=tld'; +$lang['userfilter'] = 'LDAP gebruikersfilter. Bijv. (&(uid=%{user})(objectClass=posixAccount))'; +$lang['groupfilter'] = 'LDAP groepsfilter. Bijv. (&(objectClass=posixGroup)(|(gidNumber=%{gid})(memberUID=%{user})))'; +$lang['version'] = 'Te gebruiken protocolversie. Je zou het moeten kunnen instellen op 3'; +$lang['starttls'] = 'Gebruiken TLS verbindingen'; +$lang['referrals'] = 'Moeten verwijzingen worden gevolg'; +$lang['binddn'] = 'DN van een optionele bind gebruiker als anonieme bind niet genoeg is. Bijv. cn=beheer, dc=mijn, dc=thuis'; +$lang['bindpw'] = 'Wachtwoord van bovenstaande gebruiker'; +$lang['userscope'] = 'Beperken scope van zoekfuncties voor gebruikers'; +$lang['groupscope'] = 'Beperken scope van zoekfuncties voor groepen'; +$lang['groupkey'] = 'Groepslidmaatschap van enig gebruikersattribuut (in plaats van standaard AD groepen), bijv. groep van afdeling of telefoonnummer'; +$lang['debug'] = 'Tonen van aanvullende debuginformatie bij fouten'; -- cgit v1.2.3 From ba09710ad34bb383ae3526e84490a3d545f78866 Mon Sep 17 00:00:00 2001 From: Martin Terber Date: Mon, 15 Apr 2013 21:55:41 +0200 Subject: German language update --- lib/plugins/authldap/lang/de/settings.php | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) (limited to 'lib/plugins/authldap') diff --git a/lib/plugins/authldap/lang/de/settings.php b/lib/plugins/authldap/lang/de/settings.php index b237201d8..a1a99b6d6 100644 --- a/lib/plugins/authldap/lang/de/settings.php +++ b/lib/plugins/authldap/lang/de/settings.php @@ -2,21 +2,5 @@ /** * German language file * - * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * @author Matthias Schulte + * @author Mateng Schimmerlos ) */ -$lang['server'] = 'Adresse zum LDAP-Server. Entweder als Hostname (localhost) oder als FQDN (ldap://server.tld:389).'; -$lang['port'] = 'Port des LDAP-Servers, falls kein Port angegeben wurde.'; -$lang['usertree'] = 'Zweig, in dem die die Benutzeraccounts gespeichert sind. Zum Beispiel: ou=People, dc=server, dc=tld.'; -$lang['grouptree'] = 'Zweig, in dem die Benutzergruppen gespeichert sind. Zum Beispiel: ou=Group, dc=server, dc=tld.'; -$lang['userfilter'] = 'LDAP-Filter, um die Benutzeraccounts zu suchen. Zum Beispiel: (&(uid=%{user})(objectClass=posixAccount)).'; -$lang['groupfilter'] = 'LDAP-Filter, um die Benutzergruppen zu suchen. Zum Beispiel: (&(objectClass=posixGroup)(|(gidNumber=%{gid})(memberUID=%{user}))).'; -$lang['version'] = 'Zu verwendende Protokollversion von LDAP.'; -$lang['starttls'] = 'Verbindung über TLS aufbauen?'; -$lang['referrals'] = 'Weiterverfolgen von LDAP-Referrals (Verweise)?'; -$lang['binddn'] = 'DN eines optionalen Benutzers, wenn der anonyme Zugriff nicht ausreichend ist. Zum Beispiel: cn=admin, dc=my, dc=home.'; -$lang['bindpw'] = 'Passwort des angegebenen Benutzers.'; -$lang['userscope'] = 'Die Suchweite nach Benutzeraccounts.'; -$lang['groupscope'] = 'Die Suchweite nach Benutzergruppen.'; -$lang['groupkey'] = 'Gruppieren der Benutzeraccounts anhand eines beliebigen Benutzerattributes z. B. Telefonnummer oder Abteilung, anstelle der Standard-Gruppen).'; -$lang['debug'] = 'Debug-Informationen beim Auftreten von Fehlern anzeigen?'; -- cgit v1.2.3 From 4931ae526572ef290d7337eca9a37786c7108f59 Mon Sep 17 00:00:00 2001 From: Otto Vainio Date: Mon, 15 Apr 2013 21:56:46 +0200 Subject: Finnish language update --- lib/plugins/authldap/lang/fi/settings.php | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 lib/plugins/authldap/lang/fi/settings.php (limited to 'lib/plugins/authldap') diff --git a/lib/plugins/authldap/lang/fi/settings.php b/lib/plugins/authldap/lang/fi/settings.php new file mode 100644 index 000000000..d3aa13e07 --- /dev/null +++ b/lib/plugins/authldap/lang/fi/settings.php @@ -0,0 +1,6 @@ + + */ -- cgit v1.2.3 From a426a6cd90e703479b2f5a57d16b97d5ded495af Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Fri, 19 Apr 2013 09:28:22 +0200 Subject: LDAP: do not bind anonymously if superuser is set FS#2607 --- lib/plugins/authldap/auth.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'lib/plugins/authldap') diff --git a/lib/plugins/authldap/auth.php b/lib/plugins/authldap/auth.php index 6e7bde1f0..b49aa4792 100644 --- a/lib/plugins/authldap/auth.php +++ b/lib/plugins/authldap/auth.php @@ -465,7 +465,13 @@ class auth_plugin_authldap extends DokuWiki_Auth_Plugin { if(defined('LDAP_OPT_NETWORK_TIMEOUT')) { ldap_set_option($this->con, LDAP_OPT_NETWORK_TIMEOUT, 1); } - $bound = @ldap_bind($this->con); + + if($this->getConf('binddn') && $this->getConf('bindpw')) { + $bound = @ldap_bind($this->con, $this->getConf('binddn'), $this->getConf('bindpw')); + $this->bound = 2; + } else { + $bound = @ldap_bind($this->con); + } if($bound) { break; } -- cgit v1.2.3 From bba10e63fd89accbcf180b64adbd26e32ffb1810 Mon Sep 17 00:00:00 2001 From: lupo49 Date: Sun, 21 Apr 2013 21:24:28 +0200 Subject: Revert "German language update" This reverts commit ba09710ad34bb383ae3526e84490a3d545f78866. Conflicts: lib/plugins/authad/lang/de/settings.php --- lib/plugins/authldap/lang/de/settings.php | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'lib/plugins/authldap') diff --git a/lib/plugins/authldap/lang/de/settings.php b/lib/plugins/authldap/lang/de/settings.php index a1a99b6d6..b237201d8 100644 --- a/lib/plugins/authldap/lang/de/settings.php +++ b/lib/plugins/authldap/lang/de/settings.php @@ -2,5 +2,21 @@ /** * German language file * - * @author Mateng Schimmerlos ) + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * @author Matthias Schulte */ +$lang['server'] = 'Adresse zum LDAP-Server. Entweder als Hostname (localhost) oder als FQDN (ldap://server.tld:389).'; +$lang['port'] = 'Port des LDAP-Servers, falls kein Port angegeben wurde.'; +$lang['usertree'] = 'Zweig, in dem die die Benutzeraccounts gespeichert sind. Zum Beispiel: ou=People, dc=server, dc=tld.'; +$lang['grouptree'] = 'Zweig, in dem die Benutzergruppen gespeichert sind. Zum Beispiel: ou=Group, dc=server, dc=tld.'; +$lang['userfilter'] = 'LDAP-Filter, um die Benutzeraccounts zu suchen. Zum Beispiel: (&(uid=%{user})(objectClass=posixAccount)).'; +$lang['groupfilter'] = 'LDAP-Filter, um die Benutzergruppen zu suchen. Zum Beispiel: (&(objectClass=posixGroup)(|(gidNumber=%{gid})(memberUID=%{user}))).'; +$lang['version'] = 'Zu verwendende Protokollversion von LDAP.'; +$lang['starttls'] = 'Verbindung über TLS aufbauen?'; +$lang['referrals'] = 'Weiterverfolgen von LDAP-Referrals (Verweise)?'; +$lang['binddn'] = 'DN eines optionalen Benutzers, wenn der anonyme Zugriff nicht ausreichend ist. Zum Beispiel: cn=admin, dc=my, dc=home.'; +$lang['bindpw'] = 'Passwort des angegebenen Benutzers.'; +$lang['userscope'] = 'Die Suchweite nach Benutzeraccounts.'; +$lang['groupscope'] = 'Die Suchweite nach Benutzergruppen.'; +$lang['groupkey'] = 'Gruppieren der Benutzeraccounts anhand eines beliebigen Benutzerattributes z. B. Telefonnummer oder Abteilung, anstelle der Standard-Gruppen).'; +$lang['debug'] = 'Debug-Informationen beim Auftreten von Fehlern anzeigen?'; -- cgit v1.2.3 From 87945c0e9622dca02b441749b7ed54cc67801475 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=9D=B4=EB=AA=85=EC=A7=84?= Date: Mon, 22 Apr 2013 21:50:17 +0200 Subject: Japanese language update --- lib/plugins/authldap/lang/ja/settings.php | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 lib/plugins/authldap/lang/ja/settings.php (limited to 'lib/plugins/authldap') diff --git a/lib/plugins/authldap/lang/ja/settings.php b/lib/plugins/authldap/lang/ja/settings.php new file mode 100644 index 000000000..576f0eeb5 --- /dev/null +++ b/lib/plugins/authldap/lang/ja/settings.php @@ -0,0 +1,5 @@ + Date: Fri, 26 Apr 2013 14:32:47 +0200 Subject: Russian language update --- lib/plugins/authldap/lang/ru/settings.php | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 lib/plugins/authldap/lang/ru/settings.php (limited to 'lib/plugins/authldap') diff --git a/lib/plugins/authldap/lang/ru/settings.php b/lib/plugins/authldap/lang/ru/settings.php new file mode 100644 index 000000000..4c394080e --- /dev/null +++ b/lib/plugins/authldap/lang/ru/settings.php @@ -0,0 +1,6 @@ + Date: Sun, 5 May 2013 20:03:01 +0200 Subject: Czech language update --- lib/plugins/authldap/lang/cs/settings.php | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 lib/plugins/authldap/lang/cs/settings.php (limited to 'lib/plugins/authldap') diff --git a/lib/plugins/authldap/lang/cs/settings.php b/lib/plugins/authldap/lang/cs/settings.php new file mode 100644 index 000000000..783d2a3ae --- /dev/null +++ b/lib/plugins/authldap/lang/cs/settings.php @@ -0,0 +1,21 @@ +localhost) nebo plně kvalifikovaný popis URL (ldap://server.tld:389)'; +$lang['port'] = 'Port serveru LDAP. Pokud není, bude využito URL výše'; +$lang['usertree'] = 'Kde najít uživatelské účty, tj. ou=Lide, dc=server, dc=tld'; +$lang['grouptree'] = 'Kde najít uživatelské skupiny, tj. ou=Skupina, dc=server, dc=tld'; +$lang['userfilter'] = 'Filter LDAPu pro vyhledávání uživatelských účtů, tj. (&(uid=%{user})(objectClass=posixAccount))'; +$lang['groupfilter'] = 'Filter LDAPu pro vyhledávání uživatelských skupin, tj. (&(uid=%{user})(objectClass=posixAccount))'; +$lang['version'] = 'Verze použitého protokolu. Můžete potřebovat jej nastavit na 3'; +$lang['starttls'] = 'Využít spojení TLS?'; +$lang['referrals'] = 'Přeposílat odkazy?'; +$lang['binddn'] = 'Doménový název DN volitelně připojeného uživatele, pokus anonymní připojení není vyhovující, tj. cn=admin, dc=muj, dc=domov'; +$lang['bindpw'] = 'Heslo uživatele výše'; +$lang['userscope'] = 'Omezení rozsahu vyhledávání uživatele'; +$lang['groupscope'] = 'Omezení rozsahu vyhledávání skupiny'; +$lang['groupkey'] = 'Atribut šlenství uživatele ve skupinách (namísto standardních AD skupin), tj. skupina z oddělení nebo telefonní číslo'; +$lang['debug'] = 'Zobrazit dodatečné debugovací informace'; -- cgit v1.2.3 From 8fb341d2133fef951e0a7bb959440b93d5ca2e4a Mon Sep 17 00:00:00 2001 From: Satoshi Sahara Date: Sun, 5 May 2013 20:04:04 +0200 Subject: Japanese language update --- lib/plugins/authldap/lang/ja/settings.php | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/plugins/authldap') diff --git a/lib/plugins/authldap/lang/ja/settings.php b/lib/plugins/authldap/lang/ja/settings.php index 576f0eeb5..fdc6fc434 100644 --- a/lib/plugins/authldap/lang/ja/settings.php +++ b/lib/plugins/authldap/lang/ja/settings.php @@ -2,4 +2,5 @@ /** * Japanese language file * + * @author Satoshi Sahara */ -- cgit v1.2.3 From 0e748a96cda77fa0131fc0b9601de54a41592ca7 Mon Sep 17 00:00:00 2001 From: Anika Henke Date: Mon, 6 May 2013 12:25:27 +0100 Subject: updated dates in templates' and plugins' info.txt files --- lib/plugins/authldap/plugin.info.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/plugins/authldap') diff --git a/lib/plugins/authldap/plugin.info.txt b/lib/plugins/authldap/plugin.info.txt index 2af8cf00a..94809a75b 100644 --- a/lib/plugins/authldap/plugin.info.txt +++ b/lib/plugins/authldap/plugin.info.txt @@ -1,7 +1,7 @@ base authldap author Andreas Gohr email andi@splitbrain.org -date 2012-10-06 +date 2013-04-19 name ldap auth plugin desc Provides authentication against am LDAP server url http://www.dokuwiki.org/plugin:authldap -- cgit v1.2.3 From 6b519690e45cefe83fbef5691e372c6078c3fb9b Mon Sep 17 00:00:00 2001 From: Anika Henke Date: Mon, 27 May 2013 16:26:40 +0100 Subject: fixed broken default config options (FS#2789) --- lib/plugins/authldap/conf/default.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/plugins/authldap') diff --git a/lib/plugins/authldap/conf/default.php b/lib/plugins/authldap/conf/default.php index d07f9c82e..d530d59c9 100644 --- a/lib/plugins/authldap/conf/default.php +++ b/lib/plugins/authldap/conf/default.php @@ -16,4 +16,4 @@ $conf['bindpw'] = ''; $conf['userscope'] = 'sub'; $conf['groupscope'] = 'sub'; $conf['groupkey'] = 'cn'; -$conf['debug'] = array('onoff'); \ No newline at end of file +$conf['debug'] = 0; \ No newline at end of file -- cgit v1.2.3 From e7fbe18945e8d94fd400fd66f36e67174951f290 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Fri, 7 Jun 2013 13:23:40 +0200 Subject: fix ldap deref option FS2798 Do not pass timelimit and deref settings to ldap_search. These values should be set globally via ldap_set_option() instead (as we do for deref). --- lib/plugins/authldap/auth.php | 8 ++++---- lib/plugins/authldap/conf/default.php | 1 + lib/plugins/authldap/conf/metadata.php | 1 + lib/plugins/authldap/lang/en/settings.php | 9 ++++++++- 4 files changed, 14 insertions(+), 5 deletions(-) (limited to 'lib/plugins/authldap') diff --git a/lib/plugins/authldap/auth.php b/lib/plugins/authldap/auth.php index b49aa4792..e43c3f828 100644 --- a/lib/plugins/authldap/auth.php +++ b/lib/plugins/authldap/auth.php @@ -502,23 +502,23 @@ class auth_plugin_authldap extends DokuWiki_Auth_Plugin { * @return resource */ protected function _ldapsearch($link_identifier, $base_dn, $filter, $scope = 'sub', $attributes = null, - $attrsonly = 0, $sizelimit = 0, $timelimit = 0, $deref = LDAP_DEREF_NEVER) { + $attrsonly = 0, $sizelimit = 0) { if(is_null($attributes)) $attributes = array(); if($scope == 'base') { return @ldap_read( $link_identifier, $base_dn, $filter, $attributes, - $attrsonly, $sizelimit, $timelimit, $deref + $attrsonly, $sizelimit ); } elseif($scope == 'one') { return @ldap_list( $link_identifier, $base_dn, $filter, $attributes, - $attrsonly, $sizelimit, $timelimit, $deref + $attrsonly, $sizelimit ); } else { return @ldap_search( $link_identifier, $base_dn, $filter, $attributes, - $attrsonly, $sizelimit, $timelimit, $deref + $attrsonly, $sizelimit ); } } diff --git a/lib/plugins/authldap/conf/default.php b/lib/plugins/authldap/conf/default.php index d530d59c9..2c295eeeb 100644 --- a/lib/plugins/authldap/conf/default.php +++ b/lib/plugins/authldap/conf/default.php @@ -9,6 +9,7 @@ $conf['groupfilter'] = ''; $conf['version'] = 2; $conf['starttls'] = 0; $conf['referrals'] = 0; +$conf['deref'] = 0; $conf['binddn'] = ''; $conf['bindpw'] = ''; //$conf['mapping']['name'] unsupported in config manager diff --git a/lib/plugins/authldap/conf/metadata.php b/lib/plugins/authldap/conf/metadata.php index fc5b2e63c..a3256628c 100644 --- a/lib/plugins/authldap/conf/metadata.php +++ b/lib/plugins/authldap/conf/metadata.php @@ -8,6 +8,7 @@ $meta['groupfilter'] = array('string'); $meta['version'] = array('numeric'); $meta['starttls'] = array('onoff'); $meta['referrals'] = array('onoff'); +$meta['deref'] = array('multichoice','_choices' => array(0,1,2,3)); $meta['binddn'] = array('string'); $meta['bindpw'] = array('password'); //$meta['mapping']['name'] unsupported in config manager diff --git a/lib/plugins/authldap/lang/en/settings.php b/lib/plugins/authldap/lang/en/settings.php index ddedf8ae3..e3f385f99 100644 --- a/lib/plugins/authldap/lang/en/settings.php +++ b/lib/plugins/authldap/lang/en/settings.php @@ -8,9 +8,16 @@ $lang['groupfilter'] = 'LDAP filter to search for groups. Eg. (&(objec $lang['version'] = 'The protocol version to use. You may need to set this to 3'; $lang['starttls'] = 'Use TLS connections?'; $lang['referrals'] = 'Shall referrals be followed?'; +$lang['deref'] = 'How to dereference aliases?'; $lang['binddn'] = 'DN of an optional bind user if anonymous bind is not sufficient. Eg. cn=admin, dc=my, dc=home'; $lang['bindpw'] = 'Password of above user'; $lang['userscope'] = 'Limit search scope for user search'; $lang['groupscope'] = 'Limit search scope for group search'; -$lang['groupkey'] = 'Group member ship from any user attribute (instead of standard AD groups) e.g. group from department or telephone number'; +$lang['groupkey'] = 'Group membership from any user attribute (instead of standard AD groups) e.g. group from department or telephone number'; $lang['debug'] = 'Display additional debug information on errors'; + + +$lang['deref_o_0'] = 'LDAP_DEREF_NEVER'; +$lang['deref_o_1'] = 'LDAP_DEREF_SEARCHING'; +$lang['deref_o_2'] = 'LDAP_DEREF_FINDING'; +$lang['deref_o_3'] = 'LDAP_DEREF_ALWAYS'; \ No newline at end of file -- cgit v1.2.3 From 04e4890db370bdb57201f76581fe3dc0a3adb614 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Fri, 7 Jun 2013 13:50:46 +0200 Subject: fix problem when ldap returns no groups FS#2788 --- lib/plugins/authldap/auth.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/plugins/authldap') diff --git a/lib/plugins/authldap/auth.php b/lib/plugins/authldap/auth.php index e43c3f828..6a967a6d4 100644 --- a/lib/plugins/authldap/auth.php +++ b/lib/plugins/authldap/auth.php @@ -248,7 +248,7 @@ class auth_plugin_authldap extends DokuWiki_Auth_Plugin { } // always add the default group to the list of groups - if(!in_array($conf['defaultgroup'], $info['grps'])) { + if(!$info['grps'] or !in_array($conf['defaultgroup'], $info['grps'])) { $info['grps'][] = $conf['defaultgroup']; } return $info; -- cgit v1.2.3 From 81ee3b1c4ea669b4278fc1160162c686b82e559c Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sun, 16 Jun 2013 18:09:34 +0200 Subject: Swedish language update --- lib/plugins/authldap/lang/sv/settings.php | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 lib/plugins/authldap/lang/sv/settings.php (limited to 'lib/plugins/authldap') diff --git a/lib/plugins/authldap/lang/sv/settings.php b/lib/plugins/authldap/lang/sv/settings.php new file mode 100644 index 000000000..0fdcad147 --- /dev/null +++ b/lib/plugins/authldap/lang/sv/settings.php @@ -0,0 +1,16 @@ +localhost) eller giltig full URL (ldap://server.tld:389)'; +$lang['port'] = 'LDAP server port, om det inte angavs full URL ovan'; +$lang['usertree'] = 'Specificera var användarkonton finns. T.ex. ou=Användare, dc=server, dc=tld'; +$lang['grouptree'] = 'Specificera var grupper finns. T.ex. ou=Grupp, dc=server, dc=tld'; +$lang['userfilter'] = 'LDAP filter för att söka efter användarkonton. T.ex. (&(uid=%{user})(objectClass=posixAccount))'; +$lang['groupfilter'] = 'LDAP filter för att söka efter grupper. T.ex. (&(objectClass=posixGroup)(|(gidNumber=%{gid})(memberUID=%{user})))'; +$lang['version'] = 'Version av protokoll att använda. Du kan behöva sätta detta till 3'; +$lang['bindpw'] = 'Lösenord för användare ovan'; +$lang['groupkey'] = 'Gruppmedlemskap från något användarattribut (istället för standard AD grupp) t.ex. grupp från avdelning eller telefonnummer'; +$lang['debug'] = 'Visa ytterligare felsökningsinformation vid fel'; -- cgit v1.2.3 From b243b168571b08a674d34701cfbb7ac0a03239e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Volker=20B=C3=B6dker?= Date: Fri, 12 Jul 2013 17:04:41 +0200 Subject: Informal German language update --- lib/plugins/authldap/lang/de-informal/settings.php | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'lib/plugins/authldap') diff --git a/lib/plugins/authldap/lang/de-informal/settings.php b/lib/plugins/authldap/lang/de-informal/settings.php index fa0fc1521..15e4d8129 100644 --- a/lib/plugins/authldap/lang/de-informal/settings.php +++ b/lib/plugins/authldap/lang/de-informal/settings.php @@ -4,6 +4,7 @@ * * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * @author Matthias Schulte + * @author Volker Bödker */ $lang['server'] = 'Adresse zum LDAP-Server. Entweder als Hostname (localhost) oder als FQDN (ldap://server.tld:389).'; $lang['port'] = 'Port des LDAP-Servers, falls kein Port angegeben wurde.'; @@ -14,9 +15,14 @@ $lang['groupfilter'] = 'LDAP-Filter, um die Benutzergruppen zu suchen. $lang['version'] = 'Zu verwendende Protokollversion von LDAP.'; $lang['starttls'] = 'Verbindung über TLS aufbauen?'; $lang['referrals'] = 'Weiterverfolgen von LDAP-Referrals (Verweise)?'; +$lang['deref'] = 'Wie sollen Aliasse derefernziert werden?'; $lang['binddn'] = 'DN eines optionalen Benutzers, wenn der anonyme Zugriff nicht ausreichend ist. Zum Beispiel: cn=admin, dc=my, dc=home.'; $lang['bindpw'] = 'Passwort des angegebenen Benutzers.'; $lang['userscope'] = 'Die Suchweite nach Benutzeraccounts.'; $lang['groupscope'] = 'Die Suchweite nach Benutzergruppen.'; $lang['groupkey'] = 'Gruppieren der Benutzeraccounts anhand eines beliebigen Benutzerattributes z. B. Telefonnummer oder Abteilung, anstelle der Standard-Gruppen).'; $lang['debug'] = 'Debug-Informationen beim Auftreten von Fehlern anzeigen?'; +$lang['deref_o_0'] = 'LDAP_DEREF_NIEMALS'; +$lang['deref_o_1'] = 'LDAP_DEREF_SUCHEN'; +$lang['deref_o_2'] = 'LDAP_DEREF_FINDEN'; +$lang['deref_o_3'] = 'LDAP_DEREF_IMMER'; -- cgit v1.2.3 From dbd5b4caeac5f2f45d05da38f1a54282d972b3ce Mon Sep 17 00:00:00 2001 From: Victor Westmann Date: Fri, 12 Jul 2013 17:06:30 +0200 Subject: Brazilian Portuguese language update --- lib/plugins/authldap/lang/pt-br/settings.php | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'lib/plugins/authldap') diff --git a/lib/plugins/authldap/lang/pt-br/settings.php b/lib/plugins/authldap/lang/pt-br/settings.php index daf9efd00..70b68b289 100644 --- a/lib/plugins/authldap/lang/pt-br/settings.php +++ b/lib/plugins/authldap/lang/pt-br/settings.php @@ -8,12 +8,19 @@ $lang['server'] = 'Seu servidor LDAP. Ou hostname (localhos $lang['port'] = 'Porta LDAP do servidor se nenhuma URL completa tiver sido fornecida acima'; $lang['usertree'] = 'Onde encontrar as contas de usuários. Eg. ou=Pessoas, dc=servidor, dc=tld'; $lang['grouptree'] = 'Onde encontrar os grupos de usuários. Eg. ou=Pessoas, dc=servidor, dc=tld'; +$lang['userfilter'] = 'Filtro do LDAP para procurar por contas de usuários. Eg. (&(uid=%{user})(objectClass=posixAccount))'; +$lang['groupfilter'] = 'Filtro do LDAP 0ara procurar por grupos. Eg. (&(objectClass=posixGroup)(|(gidNumber=%{gid})(memberUID=%{user})))'; $lang['version'] = 'A versão do protocolo para usar. Você talvez deva definir isto para 3'; $lang['starttls'] = 'Usar conexões TLS?'; $lang['referrals'] = 'Permitir referências serem seguidas?'; +$lang['deref'] = 'Como respeitar aliases ?'; $lang['binddn'] = 'DN de um vínculo opcional de usuário se vínculo anônimo não for suficiente. Eg. cn=admin, dc=my, dc=home'; $lang['bindpw'] = 'Senha do usuário acima'; $lang['userscope'] = 'Limitar escopo da busca para busca de usuário'; $lang['groupscope'] = 'Limitar escopo da busca para busca de grupo'; $lang['groupkey'] = 'Membro de grupo vem de qualquer atributo do usuário (ao invés de grupos padrões AD) e.g. departamento de grupo ou número de telefone'; $lang['debug'] = 'Mostrar informações adicionais de depuração em erros'; +$lang['deref_o_0'] = 'LDAP_DEREF_NEVER'; +$lang['deref_o_1'] = 'LDAP_DEREF_SEARCHING'; +$lang['deref_o_2'] = 'LDAP_DEREF_FINDING'; +$lang['deref_o_3'] = 'LDAP_DEREF_ALWAYS'; -- cgit v1.2.3