summaryrefslogtreecommitdiffstats
path: root/source4/dsdb/common
Commit message (Collapse)AuthorAgeFilesLines
* s4:samr Push most of samr_LookupRids into a helper functionAndrew Bartlett2010-05-241-0/+66
| | | | | | | | | | This is a rewrite of the lookup_rids code, using a query based on the extended DN for a clearer interface. By splitting this out, the logic is able to be shared, rather than copied, into a passdb wrapper. Andrew Bartlett
* s4:samr Push most of samr_QueryGroupMember into a helper functionAndrew Bartlett2010-05-241-0/+67
| | | | | | | | | | | This is a rewrite of the group membership lookup code, using the stored extended DNs to avoid doing the lookup into each member to find the SID By splitting this out, the logic is able to be shared, rather than copied, into a passdb wrapper. Andrew Bartlett
* s4:samr Move most of samr_CreateDomAlias into a helper functionAndrew Bartlett2010-05-241-0/+73
| | | | | | | This allows this logic to be shared, rather than copied, into a passdb wrapper. Andrew Bartlett
* s4:samr Split most of samr_CreateDomainGroup into a helper functionAndrew Bartlett2010-05-241-0/+79
| | | | | | | This allows this logic to be shared, rather than copied, into a passdb wrapper. Andrew Bartlett
* s4:samr Split the guts of samr_CreateUser2 into a helper functionAndrew Bartlett2010-05-241-0/+249
| | | | | | | This allows this logic to be shared, rather than copied, into a passdb wrapper. Andrew Bartlett
* s4:dsdb Allow a NULL search expression in dsdb_search()Andrew Bartlett2010-05-241-2/+5
| | | | | | | The NULL search expression expands to (objectClass=*), but %s expands NULL to (NULL) which doesn't parse... Andrew Bartlett
* Finish removal of iconv_convenience in public API's.Jelmer Vernooij2010-05-182-8/+6
|
* s4-rodc: Cache am_rodc flagAnatoliy Atanasov2010-05-171-0/+29
|
* s4:dsdb: fix samdb_result_logon_hours() and don't hardcode units_per_weekStefan Metzmacher2010-05-131-4/+11
| | | | metze
* s4:dsdb: cached results of samdb_rodc()Stefan Metzmacher2010-05-111-1/+29
| | | | metze
* s4:samdb_set_password - adapt it for the user password change handlingMatthias Dieter Wallnöfer2010-05-101-0/+12
| | | | Make use of the new "change old password checked" control.
* s4:samdb_set_password/samdb_set_password_sid - ReworkMatthias Dieter Wallnöfer2010-05-101-256/+134
| | | | | | | | Adapt the two functions for the restructured "password_hash" module. This means that basically all checks are now performed in the mentioned module. An exception consists in the SAMR password change calls since they need very precise NTSTATUS return codes on wrong constraints ("samr_password.c") file
* s4:dsdb/util.c - Add a new function for retrieving password change attributesMatthias Dieter Wallnöfer2010-05-101-0/+41
| | | | | | | | | This is needed since we have not only reset operations on password fields (attributes marked with REPLACE flag) but also change operations which can be performed by users itself. They have one attribute with the old value marked with the REMOVE flag and one with the new one marked with the ADD flag. This function helps to retrieve them (argument "new" is used for the new password on both reset and change).
* s4:dsdb Provide an intelegent fallback if not CN=Subnets is foundAndrew Bartlett2010-05-091-3/+7
| | | | | | | We may as well fall back rather than return NULL (which callers don't do useful things with). Andrew Bartlett
* s4/rodc: Support read-only databaseAnatoliy Atanasov2010-05-041-0/+1
| | | | | | Check on modify if we are RODC and return referral. On the ldap backend side now we pass context and ldb_modify_default_callback to propagate the referral error to the client.
* s4/rodc: Implement msDS-isRODC constructed attrAnatoliy Atanasov2010-05-031-6/+15
|
* s4/rodc: RODC FAS initial implementationAnatoliy Atanasov2010-04-291-0/+28
|
* s4/dsdb: dsdb_validate_invocation_id() should validate by objectGUIDKamen Mazdrashki2010-04-281-18/+18
| | | | | This function is used in DRSUpdateRefs() implementation where we get DSA's objectGUID rather than invocationId
* s4:dsdb/common: if we don't have the ip of the client return the server site ↵Stefan Metzmacher2010-04-271-0/+8
| | | | | | as client site metze
* s4:util - add a function which finds the matching client site using the ↵Matthias Dieter Wallnöfer2010-04-271-0/+90
| | | | | | | | | | | client address The lookup of the client site is done using the subnets in the configuration partition. If no one matches we use the Windows Server fallback mechansim. This means: if only one site is available just use it. If they're more set the output variable to "". Signed-off-by: Andrew Tridgell <tridge@samba.org>
* s4-drs: removed dsdb_validate_client_flags()Andrew Tridgell2010-04-221-30/+0
| | | | | | This test is in the wrong place. We end up validating our own flags. Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
* s4-dsdb: added dsdb_validate_invocation_id()Andrew Tridgell2010-04-221-0/+87
| | | | | | | | | this validates that a invocationID matches an account sid This will be used to ensure that we don't allow DRS replication from someone a non-DC or administrator Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
* s4-dsdb: added dsdb_get_extended_dn_sid()Andrew Tridgell2010-04-221-0/+29
| | | | | | This will be used by the RODC code Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
* s4-drs: Use new samdb_rodc() function in s4 codeFernando J V da Silva2010-04-221-1/+1
| | | | | | | This patch fits the calling to the new samdb_rodc() function and fix a little bug in this function. Signed-off-by: Andrew Tridgell <tridge@samba.org>
* s4-drs: dsdb_validate_client_flags() functionFernando J V da Silva2010-04-221-0/+28
| | | | | | | This function is intended to check if some client is not lying about his flags. At this moment, it only checks for RODC flags. Signed-off-by: Andrew Tridgell <tridge@samba.org>
* s4-drs: samdb_is_rodc() function and new samdb_rodc() functionFernando J V da Silva2010-04-221-32/+41
| | | | | | | | | | | This patch creates the samdb_is_rodc() function, which looks for the NTDSDSA object for a DC that has a specific invocationId and if msDS-isRODC is present on such object and it is TRUE, then consider the DC as a RODC. The new samdb_rodc() function uses the samdb_is_rodc() function for the local server. Signed-off-by: Andrew Tridgell <tridge@samba.org>
* s4:provision Pass in the invoication ID and NTDS Settings DN to Schema()Andrew Bartlett2010-04-201-1/+38
| | | | | | | By putting these values into the cache on the LDB, this reduces some of the noise in provision, particularly with the LDAP backend. Andrew Bartlett
* s4:Replaced dsdb_get_dom_sid_from_ldb_message() with samdb_result_dom_sid()Nadezhda Ivanova2010-04-161-31/+2
|
* s4:samdb_server_site_name - fix indentationMatthias Dieter Wallnöfer2010-04-131-4/+6
|
* s4:dsdb/common/util.c - add a call which determines centrally the forest DNS ↵Matthias Dieter Wallnöfer2010-04-131-0/+19
| | | | domainname
* s4:remove "samdb_root_dn", "samdb_base_dn", "samdb_config_dn" and ↵Matthias Dieter Wallnöfer2010-04-131-20/+0
| | | | | | "samdb_schema_dn" They aren't needed anymore.
* Revert "s4:prefer "samdb_*_dn" basedn calls over the "ldb_get_*_dn" functions"Matthias Dieter Wallnöfer2010-04-131-6/+8
| | | | | We should use the "ldb_get_*_basedn" calls since they are available in the LDB library.
* s4:samdb_server_site_dn - free unused DNs in the right wayMatthias Dieter Wallnöfer2010-04-111-2/+2
|
* s4:dsdb Move dsdb_save_partition_usn() to be a module helper functionAndrew Bartlett2010-03-221-88/+0
| | | | | | | | This function should not traverse the module stack again, but instead run from this point. Also add a matching dsdb_module_load_partition_usn() and change repl_meta_data to match. Andrew Bartlett
* Split the dsdb_access_check_on_dn.Nadezhda Ivanova2010-03-121-36/+49
| | | | | Split the dsdb_access_check_on_dn so it can be reused for checks from both within the module stack and outside it.
* Moved access_check_on_dn from acl module as an utility.Nadezhda Ivanova2010-03-121-0/+181
| | | | | | Made this an utility function so it can be used for access checking outside of the acl ldb module, such as checking validated writes and control access rights in other protocols (e. g drs)
* A helper function to get the Infrastructure DN.Nadezhda Ivanova2010-03-091-0/+12
|
* s4:dsdb/util - Change also here counters to "unsigned"Matthias Dieter Wallnöfer2010-03-051-13/+16
| | | | No need to have "signed" counters at those places.
* s4/rodc: Implement samdb_rodc with ldb contextAnatoliy Atanasov2010-03-011-7/+61
|
* s4-dsdb: fixed the fetch of the server site nameAndrew Tridgell2010-02-261-1/+7
| | | | | | | when the ntds objects were moved by a recent change it broke the calculation of the server site Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
* s4:dsdb/util.c - Use LDB result constants in some more helper functionsMatthias Dieter Wallnöfer2010-02-211-11/+11
| | | | Always better to rely on the standards rather than on custom results.
* s4-dsdb: return LDB_ERR_CONSTRAINT_VIOLATION on num_recs != 1Andrew Tridgell2010-02-161-1/+1
| | | | | | | In a single record search, LDB_ERR_CONSTRAINT_VIOLATION is more useful than the generic LDB_ERR_OPERATIONS_ERROR Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
* s4-dsdb: added dsdb_search_one() and cleanup dsdb_find_dn_by_guid()Andrew Tridgell2010-02-162-11/+73
| | | | | | | | dsdb_find_dn_by_guid() now takes a struct GUID instead of a guid_string. All the callers in fact wanted a struct GUID, so we now avoid the extra conversion. Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
* s4-dsdb: replace dsdb_find_dn_by_guid() with a dsdb_search() callAndrew Tridgell2010-02-161-67/+84
| | | | | | much simpler code by using dsdb_flags Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
* s4-dsdb: change dsdb_search_dn_with_deleted() to dsdb_search_dn() with ↵Andrew Tridgell2010-02-161-56/+58
| | | | | | dsdb_flags Allows for arbitrary controls
* s4-dsdb: change samdb_replace() to dsdb_replace() and allow for dsdb_flagsAndrew Tridgell2010-02-162-72/+28
| | | | This allows for controls to be added easily where they are needed.
* s4-dsdb: replace dsdb_modify_permissive() with dsdb_modify() and dsdb_flagsAndrew Tridgell2010-02-162-38/+41
|
* s4-dsdb: move dsdb_request_add_controls() into dsdb/common/util.cAndrew Tridgell2010-02-162-0/+102
| | | | | This will be used to allow the flag based ldb functions to work on both a ldb or a module, thus saving a lot of specialist functions.
* s4-dsdb: added dsdb_modify_permissive()Andrew Tridgell2010-02-151-0/+36
| | | | This will be used in the drsuapi server
* s4:util.c - Corrected the location of the "Directory Service" objectMatthias Dieter Wallnöfer2010-02-131-1/+1
| | | | | I wonder why nobody noticed this since for sure this "tombstone" functionality was broken till now.