LDAP client configuration data, I/O functions.
List of Global Functions
AddMissingAttributes - For a given object, add all atributes this object is allowed to have according to its "objectclass" value. Added attributes have empty values.
AttributeDescription - Gets the description of attribute (from schema)
AutoPackages - Return needed packages and packages to be removed during autoinstallation.
BaseDNChanged - If the base DN has changed from a nonempty one, it may only be changed at boot time. Use this to warn the user.
CheckBaseConfig - Check if base config DN belongs to some existing object and offer creating it if necessary
CheckNDS - Check the server if it is NDS (novell directory service)
CheckOES - Check if current machine runs OES
CheckOrderOfCreation - Check if references to other objects are correct; create these objects if possible
CheckTemplateDN - Check if given DN exist and if it points to some template
CommitConfigModules - Save the edited map of configuration modules to global map
CommitTemplates - Save the edited map of templates to global map
ConnectWithoutTLS - popup shown after failed connection: ask for retry withou TLS (see bug 246397)
ConvertDefaultValues - In template object, convert the list of values (where is in the form [ "a1=v1", "a2=v2"]) to map (in the form $[ "a1":"v1", "a2":"v2"]
CreateModule - Creates default new map for new configuration object
CreateTemplate - Creates default new map for a new object template
Export - Dump the LDAP settings to a map, for autoinstallation use.
GetAllAttributes - Returns allowed and required attributes of given object class Read it from LDAP if it was not done yet.
GetBaseDN - Get the Base DN
GetBindDN - return administrator's DN if it was not read yet, read it now
GetConfigModules - Return the map of configuration modules (new copy) (in the form $[ DN: $[ map_of_one_module] ])
GetDefaultObjectClasses - Return list of default object classes for user or group There is fixed list here, it is not saved anywhere (only in default users plugin for LDAP objects)
GetGroupsDN - Returns DN's of groups (objectclass=posixGroup) in given base
GetLDAPEntry - Search for one entry (=base scope) in LDAP directory
GetLDAPPassword - Asks user for bind password to LDAP server
GetMainConfigDN - Return main configuration object DN
GetObjectAttributes - Returns the list of all allowed and required attributes for each object class, given in the list of object classes
GetRequiredAttributes - Returns required attributes of given object class Read it from LDAP if it was not done yet.
GetTemplates - Return the map of templates (new copy)
Import - Get all the LDAP configuration from a map. When called by ldap_auto (preparing autoinstallation data) the map may be empty.
InitSchema - Prepare agent for later schema queries (agent reads schema to its internal structures)
LDAPAskAndBind - Asks for LDAP password and tries to bind with it
LDAPBind - Binds to LDAP server
LDAPError - Reads and returns error message from agent
LDAPErrorMap - Reads and returns error map (=message + code) from agent
LDAPErrorMessage - Error popup for errors detected during LDAP operation
LDAPInit - Initializes LDAP agent
LDAPInitWithTLSCheck - Initializes LDAP agent, offers to turn off TLS if it failed
ObjectClassExists - Returns true if given object class exists in schema
ObjectClassStructural - Returns true if given object class is of 'structural' type
ParentExists - Check for existence of parent object of given DN in LDAP tree return the answer
Read - Reads LDAP settings from the SCR
ReadConfigModules - Read configuration moduels from LDAP server
ReadDN - Searches for DN's of all objects defined by filter in given base ("sub")
ReadTemplates - Read object templates from LDAP server
RestartSSHD - Set the value of restart_sshd (= restart sshd during write)
Set - Only set variables, without checking anything
SetAnonymous - Set the value of 'anonymous' variable (= bind without password)
SetBaseDN - Set new LDAP base DN
SetBindPassword - Set the value of bind_pass variable
SetDefaults - Set the defualt values, which should replace the ones from Read () Used during instalation, when we want to do a reasonable proposal
SetGUI - Set the value of 'use_gui' variable (= show error popups)
SetReadSettings - set the value of read_settings variable which means, do not read some settings from system
ShortSummary - returns html formated configuration summary (shorter than Summary)
SingleValued - Check if attribute allowes only single or multiple value
Summary - Summary() returns html formated configuration summary
UpdatedArchPackages - Return list of architecture specific packages (derived from package list given as parameter) merged with the packages in parameter
Write - Saves LDAP configuration.
WriteLDAP - Writes map of objects to LDAP. Ask for password, when needed and shows the error message when necessary.
WriteNow - wrapper for Write, without abort block
WriteOpenLdapConf - Modify also /etc/openldap/ldap.conf for the use of ldap client utilities (like ldapsearch)
WritePlusLine - If a file does not + entry, add it.
WriteToLDAP - Writes map of objects to LDAP
List of Global Variables
_autofs_allowed - If no, automounter will not be affected.
_start_autofs - Start automounter and import the settings from LDAP
attr_types - Map of atribute types (from schema). Indexed by names.
available_config_modules - Available configuration modules (objectclass names) TODO update
base_config_dn - DN of base configuration object
bind_dn - DN for binding to LDAP server
file_server - If home directories of LDAP users are stored on this machine
hash_schemas - encryption schemes supported by slappasswd
initial_defaults - The defualt values, which should replace the ones from Read () Used during instalation, when we want to do a reasonable proposal
initial_defaults_used - If the default values, used from ldap-server module were used to configure ldap-client
login_enabled - If login of LDAP uses to local machine is enabled
member_attribute - which attribute have LDAP groups for list of members
mkhomedir - if pam_mkhomedir is set in /etc/pam.d/commond-session
new_objects - defaults for adding new config objects and templates
nis_available - Is NIS service available? If yes, and LDAP client will be enabled, warn user (see bug #36981)
object_classes - Map of object classes (from schema). Indexed by names.
read_settings - If false, do not read settings already set from outside used e.g. for Users YaPI. see bug #60898
required_packages - Required packages for this module to operate -- they are now required only when LDAP is set for authentication
restart_sshd - if sshd should be restarted during write phase
server - IP addresses of LDAP server.
start - Are LDAP services available via nsswitch.conf?
use_gui - show popups with error messages?
write_only - Write only, used during autoinstallation. Don't run services and SuSEconfig, it's all done at one place.
For a given object, add all atributes this object is allowed to have according to its "objectclass" value. Added attributes have empty values.
Function parameters
map object
Return value
map - updated map
Gets the description of attribute (from schema)
Function parameters
string attr
Return value
string - description
Return needed packages and packages to be removed during autoinstallation.
Return value
map - of lists.
If the base DN has changed from a nonempty one, it may only be changed at boot time. Use this to warn the user.
Return value
boolean - whether changed by SetBaseDN
Check if base config DN belongs to some existing object and offer creating it if necessary
Function parameters
string dn
Return value
boolean
Check if references to other objects are correct; create these objects if possible
Return value
boolean
Check if given DN exist and if it points to some template
Function parameters
string dn
Return value
map - empty map if DN don't exist, template map if DN points to template object, nil if object with given DN is not template
Save the edited map of configuration modules to global map
Function parameters
map modules
Return value
boolean
Save the edited map of templates to global map
Function parameters
map templs
Return value
boolean
popup shown after failed connection: ask for retry withou TLS (see bug 246397)
Function parameters
map errmap
Return value
boolean - true if user wants to retry without TLS
In template object, convert the list of values (where is in the form [ "a1=v1", "a2=v2"]) to map (in the form $[ "a1":"v1", "a2":"v2"]
Function parameters
map templ
Return value
map - updated template map
Creates default new map for new configuration object
Function parameters
string cn
string class
Return value
map<string,any> - new module map
Creates default new map for a new object template
Function parameters
string cn
list<string> classes
Return value
map - template map
Dump the LDAP settings to a map, for autoinstallation use.
Return value
map - $["start":, "servers":[...], "domain":]
Returns allowed and required attributes of given object class Read it from LDAP if it was not done yet.
Function parameters
string class
Return value
list - attribute names (list of strings)
Return the map of configuration modules (new copy) (in the form $[ DN: $[ map_of_one_module] ])
Return value
map
Return list of default object classes for user or group There is fixed list here, it is not saved anywhere (only in default users plugin for LDAP objects)
Function parameters
map template
Return value
list
Returns DN's of groups (objectclass=posixGroup) in given base
Function parameters
string base
Return value
list - groups (list of strings)
Search for one entry (=base scope) in LDAP directory
Function parameters
string dn
Return value
map - with entry values, empty map if nothing found, nil on error
Asks user for bind password to LDAP server
Function parameters
boolean enable_anonymous
Return value
string - password
Returns the list of all allowed and required attributes for each object class, given in the list of object classes
Function parameters
list classes
Return value
list - attribute names (list of strings)
Returns required attributes of given object class Read it from LDAP if it was not done yet.
Function parameters
string class
Return value
list<string> - attribute names (list of strings)
Get all the LDAP configuration from a map. When called by ldap_auto (preparing autoinstallation data) the map may be empty.
Function parameters
map settings
Return value
boolean - success
Prepare agent for later schema queries (agent reads schema to its internal structures)
Return value
string - error message
Asks for LDAP password and tries to bind with it
Function parameters
boolean enable_anonymous
Return value
string - password entered, nil on cancel
Error popup for errors detected during LDAP operation
Function parameters
string type
string error
Return value
void
Initializes LDAP agent, offers to turn off TLS if it failed
Function parameters
map args
Return value
string
Returns true if given object class exists in schema
Function parameters
string class
Return value
boolean
Returns true if given object class is of 'structural' type
Function parameters
string class
Return value
boolean
Check for existence of parent object of given DN in LDAP tree return the answer
Function parameters
string dn
Return value
boolean
Read configuration moduels from LDAP server
Return value
string - error message
Searches for DN's of all objects defined by filter in given base ("sub")
Function parameters
string base
string search_filter
Return value
list<string> - of DN's (list of strings)
Set the value of restart_sshd (= restart sshd during write)
Function parameters
boolean restart
Return value
void
Only set variables, without checking anything
Function parameters
map settings
Return value
void
Set the value of 'anonymous' variable (= bind without password)
Function parameters
boolean anon
Return value
void
Set the value of bind_pass variable
Function parameters
string pass
Return value
void
Set the defualt values, which should replace the ones from Read () Used during instalation, when we want to do a reasonable proposal
Function parameters
map settings
Return value
boolean
Set the value of 'use_gui' variable (= show error popups)
Function parameters
boolean gui
Return value
void
set the value of read_settings variable which means, do not read some settings from system
Function parameters
boolean read
Return value
boolean
returns html formated configuration summary (shorter than Summary)
Return value
string - summary
Check if attribute allowes only single or multiple value
Function parameters
string attr
Return value
boolean - answer
Return list of architecture specific packages (derived from package list given as parameter) merged with the packages in parameter
Function parameters
list<string> packages
Return value
list<string>
Writes map of objects to LDAP. Ask for password, when needed and shows the error message when necessary.
Function parameters
map objects
Return value
boolean - success
Modify also /etc/openldap/ldap.conf for the use of ldap client utilities (like ldapsearch)
Return value
boolean - modified?
If a file does not + entry, add it.
Function parameters
boolean login
Return value
boolean - success?
The defualt values, which should replace the ones from Read () Used during instalation, when we want to do a reasonable proposal
If the default values, used from ldap-server module were used to configure ldap-client
Is NIS service available? If yes, and LDAP client will be enabled, warn user (see bug #36981)
If false, do not read settings already set from outside used e.g. for Users YaPI. see bug #60898
Required packages for this module to operate -- they are now required only when LDAP is set for authentication