Part of samba
Class | ProvisionLDB | Undocumented |
Function | get_ldbs | Return LDB object mapped on most important databases |
Function | usn_in_range | Check if the usn is in one of the range provided. To do so, the value is checked to be between the lower bound and higher bound of a range |
Function | get_paths | Get paths to important provision objects (smb.conf, ldb files, ...) |
Function | update_policyids | Update policy ids that could have changed after sam update |
Function | newprovision | Create a new provision. |
Function | dn_sort | Sorts two DNs in the lexicographical order it and put higher level DN before. |
Function | identic_rename | Perform a back and forth rename to trigger renaming on attribute that can't be directly modified. |
Function | chunck_acl | Return separate ACE of an ACL |
Function | chunck_sddl | Return separate parts of the SDDL (owner, group, ...) |
Function | get_diff_sddls | Get the difference between 2 sddl |
Function | update_secrets | Update secrets.ldb |
Function | getOEMInfo | Return OEM Information on the top level Samba4 use to store version info in this field |
Function | updateOEMInfo | Update the OEMinfo field to add information about upgrade |
Function | update_gpo | Create missing GPO file object if needed |
Function | increment_calculated_keyversion_number | No summary |
Function | delta_update_basesamdb | Update the provision container db: sam.ldb This function is aimed for alpha9 and newer; |
Function | construct_existor_expr | Construct a exists or LDAP search expression. |
Function | update_machine_account_password | Update (change) the password of the current DC both in the SAM db and in secret one |
Function | update_dns_account_password | Update (change) the password of the dns both in the SAM db and in secret one |
Function | search_constructed_attrs_stored | Search a given sam DB for calculated attributes that are still stored in the db. |
Function | int64range2str | Display the int64 range stored in value as xxx-yyy |
Parameters | paths | An object holding the different importants paths for provision object |
creds | Credential used for openning LDB files | |
session | Session to use for openning LDB files | |
lp | A loadparam object | |
Returns | A ProvisionLDB object that contains LDB object for the different LDB files of the provision |
Parameters | usn | A integer value corresponding to the usn that we want to update |
range | A list of integer representing ranges, lower bounds are in the even indices, higher in odd indices | |
Returns | True if the usn is in one of the range, False otherwise |
Parameters | param | Param object |
targetdir | Directory where the provision is (or will be) stored | |
smbconf | Path to the smb.conf file | |
Returns | A list with the path of important provision objects |
Parameters | names | List of key provision parameters |
samdb | An Ldb object conntected with the sam DB |
This provision will be the reference for knowing what has changed in the since the latest upgrade in the current provision
Parameters | names | List of provision parameters |
creds | Credentials for the authentification | |
session | Session object | |
smbconf | Path to the smb.conf file | |
provdir | Directory where the provision will be stored | |
logger | A Logger |
So given the dns cn=bar,cn=foo and cn=foo the later will be return as smaller
Parameters | x | First object to compare |
y | Second object to compare |
Parameters | lbdobj | An Ldb Object |
dn | DN of the object to manipulate |
Parameters | acl | A string representing the ACL |
Returns | A hash with different parts |
Parameters | sddl | An string containing the SDDL to chunk |
Returns | A hash with the different chunk |
This function split the textual representation of ACL into smaller chunck in order to not to report a simple permutation as a difference
Parameters | refsddl | First sddl to compare |
cursddl | Second sddl to compare | |
checkSacl | If false we skip the sacl checks | |
Returns | A string that explain difference between sddls |
Parameters | newsecrets_ldb | An LDB object that is connected to the secrets.ldb of the reference provision |
secrets_ldb | An LDB object that is connected to the secrets.ldb of the updated provision |
Parameters | samdb | An LDB object connect to sam.ldb |
rootdn | Root DN of the domain | |
Returns | The content of the field oEMInformation (if any) |
Parameters | samdb | an LDB object connected to the sam DB |
rootdn | The string representation of the root DN of the provision (ie. DC=...,DC=...) |
Set ACL correctly also. Check ACLs for sysvol/netlogon dirs also
Parameters | samdb | An SamDB object pointing to the sam |
rootdn | The base DN where we want to start | |
hashDns | A hash with dn as key and number representing the minimum value of msDs-KeyVersionNumber that we want to have |
Parameters | refsampath | Path to the samdb in the reference provision |
sampath | Path to the samdb in the upgraded provision | |
creds | Credential used for openning LDB files | |
session | Session to use for openning LDB files | |
lp | A loadparam object | |
Returns | A msg_diff object with the difference between the @ATTRIBUTES of the current provision and the reference provision |
Parameters | attrs | List of attribute on which we want to create the search expression. |
Returns | A string representing the expression, if attrs is empty an empty string is returned |
Parameters | samdb | An LDB object related to the sam.ldb file of a given provision |
secrets_ldb | An LDB object related to the secrets.ldb file of a given provision | |
names | List of key provision parameters |
Parameters | samdb | An LDB object related to the sam.ldb file of a given provision |
secrets_ldb | An LDB object related to the secrets.ldb file of a given provision | |
names | List of key provision parameters |
Parameters | samdb | An LDB object pointing to the sam |
rootdn | The base DN where the search should start | |
attrs | A list of attributes to be searched | |
Returns | A hash with attributes as key and an array of array. Each array contains the dn and the associated values for this attribute as they are stored in the sam. |