Subversion Repositories ALCASAR

Rev

Rev 1623 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log

Rev 1623 Rev 2191
Line 20... Line 20...
20
		$this->_items['port']				= '389';//not use yet (689 = ldaps)
20
		$this->_items['port']				= '389';//not use yet (689 = ldaps)
21
		$this->_items['identity']			= '';
21
		$this->_items['identity']			= '';
22
		$this->_items['password']			= '';
22
		$this->_items['password']			= '';
23
		$this->_items['basedn']				= 'dc=example,dc=com';
23
		$this->_items['basedn']				= 'dc=example,dc=com';
24
		$this->_items['uid']				= 'uid';
24
		$this->_items['uid']				= 'uid';
25
		$this->_items['filter']				= "($this->_items['uid']=%{User-Name})";
25
		$this->_items['filter']				= "({$this->_items['uid']}=%{User-Name})";
26
		$this->_items['base_filter']			= '';
26
		$this->_items['base_filter']			= '';
27
		$this->_items['ldap_connections_number']	= '5';
27
		$this->_items['ldap_connections_number']	= '5';
28
		$this->_items['timeout']			= '4';
28
		$this->_items['timeout']			= '4';
29
		$this->_items['timelimit']			= '3';
29
		$this->_items['timelimit']			= '3';
30
		$this->_items['net_timeout'] 			= '1';
30
		$this->_items['net_timeout']			= '1';
31
		// TLS setting related items
31
		// TLS setting related items
32
		$this->_tls['start_tls']			= 'no'; // if no all tls config are comments
32
		$this->_tls['start_tls']			= 'no'; // if no all tls config are comments
33
		$this->_tls['cacertfile']			= '#';
33
		$this->_tls['cacertfile']			= '#';
34
		$this->_tls['cacertdir']			= '#';
34
		$this->_tls['cacertdir']			= '#';
35
		$this->_tls['certfile']				= '#';
35
		$this->_tls['certfile']				= '#';
Line 40... Line 40...
40
		$this->_items['default_profile']		= '#';
40
		$this->_items['default_profile']		= '#';
41
		$this->_items['profile_attribute']		= '#';
41
		$this->_items['profile_attribute']		= '#';
42
		$this->_items['access_attr']			= '#';
42
		$this->_items['access_attr']			= '#';
43
		// Mapping of RADIUS dictionary attributes to LDAP
43
		// Mapping of RADIUS dictionary attributes to LDAP
44
		// directory attributes.
44
		// directory attributes.
45
		$this->_items['dictionary_mapping']	= '${confdir}/ldap.attrmap';
45
		$this->_items['dictionary_mapping']		= '${confdir}/ldap.attrmap';
46
		// for ldap like NOVEL
46
		// for ldap like NOVEL
47
		$this->_items['password_attribute']		= '#';
47
		$this->_items['password_attribute']		= '#';
48
		$this->_items['edir_account_policy_check']	= 'no';
48
		$this->_items['edir_account_policy_check']	= 'no';
49
		//  Group membership checking.  Disabled by default.
49
		//  Group membership checking.  Disabled by default.
50
		$this->_items['groupname_attribute']		= '#';
50
		$this->_items['groupname_attribute']		= '#';
Line 101... Line 101...
101
					if (preg_match('`^[\(]([\sa-zA-Z0-9_-]*)=\%\{User-Name\}\)`',$value)){
101
					if (preg_match('`^[\(]([\sa-zA-Z0-9_-]*)=\%\{User-Name\}\)`',$value)){
102
						$this->_items['uid'] = preg_replace('`^[\(]([\sa-zA-Z0-9_-]*)=\%\{User-Name\}\)`','$1',$value);
102
						$this->_items['uid'] = preg_replace('`^[\(]([\sa-zA-Z0-9_-]*)=\%\{User-Name\}\)`','$1',$value);
103
					} else {
103
					} else {
104
						$this->_items['uid'] = 'uid';
104
						$this->_items['uid'] = 'uid';
105
					}
105
					}
106
					$this->_items['filter']		= "($this->_items['uid']=%{User-Name})";
106
					$this->_items['filter']		= "({$this->_items['uid']}=%{User-Name})";
107
					break;
107
					break;
108
				default:
108
				default:
109
					$this->_items[$attr] = $value;
109
					$this->_items[$attr] = $value;
110
			}
110
			}
111
		} elseif (array_key_exists($attr, $this->_tls)){
111
		} elseif (array_key_exists($attr, $this->_tls)){