summaryrefslogtreecommitdiff
path: root/source4/dsdb/common/util.c
AgeCommit message (Collapse)AuthorFilesLines
2010-02-16s4-dsdb: change samdb_replace() to dsdb_replace() and allow for dsdb_flagsAndrew Tridgell1-72/+27
This allows for controls to be added easily where they are needed.
2010-02-16s4-dsdb: replace dsdb_modify_permissive() with dsdb_modify() and dsdb_flagsAndrew Tridgell1-38/+40
2010-02-16s4-dsdb: move dsdb_request_add_controls() into dsdb/common/util.cAndrew Tridgell1-0/+71
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.
2010-02-15s4-dsdb: added dsdb_modify_permissive()Andrew Tridgell1-0/+36
This will be used in the drsuapi server
2010-02-13s4:util.c - Corrected the location of the "Directory Service" objectMatthias Dieter Wallnöfer1-1/+1
I wonder why nobody noticed this since for sure this "tombstone" functionality was broken till now.
2010-02-13s4-dsdb: use TYPESAFE_QSORT() in dsdb codeAndrew Tridgell1-10/+5
2010-02-02Change uint_t to unsigned int in source4Matt Kraai1-8/+8
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2010-01-16s4-dsdb: add our local cursor and sort in dsdb_load_udv_*()Andrew Tridgell1-19/+65
This makes things much simpler for the callers
2010-01-16s4-dsdb: added dsdb_load_udv_v2() and dsdb_load_udv_v1()Andrew Tridgell1-0/+82
2010-01-14s4-drs: Store uSNUrgent for Urgent ReplicationFernando J V da Silva1-5/+23
When a object or attribute is created/updated/deleted, according to [MS-ADTS] 3.1.1.5.1.6, it stores the uSNUrgent on @REPLCHANGED for the partitions that it belongs. Signed-off-by: Andrew Tridgell <tridge@samba.org>
2010-01-13s4:dsdb/common: fix major bug in lsa_BinaryString to ldb_val conversation.Stefan Metzmacher1-2/+2
In lsa_BinaryString length and size are byte counts! TODO: we may need to do byte order conversion in this functions too... metze
2010-01-13s4:dsdb/common: let samdb_msg_add_uint() call samdb_msg_add_int()Stefan Metzmacher1-2/+1
This is important as LDAP servers always play with int32 values and we have to encode 0x80000000 as "-2147483648" instead of "2147483648". metze
2010-01-13s4:dsdb/common: let samdb_msg_add_uint64() call samdb_msg_add_int64()Stefan Metzmacher1-2/+1
This is important as LDAP servers always play with int64 values and we have to encode 0x8000000000000000LL as "-9223372036854775808" instead of "9223372036854775808". metze
2010-01-10s4-dsdb: added samdb_domain_sid_cache_only()Andrew Tridgell1-1/+8
2010-01-09s4-dsdb: added samdb_ldb_val_case_cmp()Andrew Tridgell1-0/+16
2010-01-09s4-drs: added filtering by udv in getncchangesAndrew Tridgell1-0/+6
When a client supplied an uptodateness_vector, we can use it to filter what objects we return. This greatly reduces the amount of replication traffic between DCs.
2010-01-08s4-dsdb: added dsdb_find_guid_attr_by_dn()Andrew Tridgell1-5/+18
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-01-08s4-dsdb: added samdb_rid_set_dn()Andrew Tridgell1-0/+18
This returns the DN of our RID Set object Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-01-08s4-dsdb: added samdb_reference_dn()Andrew Tridgell1-0/+62
This returns a 'reference' DN, which is a link to a DN, from the specified object. It is then used by samdb_server_reference_dn() which returns the serverReference DN, and samdb_rid_manager_dn() which returns the rIDManagerReference DN.
2010-01-02s4-dsdb: switched to using RMD_FLAGS instead of DELETED in extended DNsAndrew Tridgell1-7/+41
This allows for more flags in the future
2010-01-02s4-dsdb: fixed several memory leaksAndrew Tridgell1-5/+18
need to be careful with those temporary contexts
2010-01-02s4-dsdb: fixed samdb_create_foreign_security_principal() to use the ↵Andrew Tridgell1-18/+20
wellknown GUID This also fixes a memory leak
2010-01-02s4-dsdb: added dsdb_tombstone_lifetime()Andrew Tridgell1-0/+26
2010-01-02s4-dsdb: added dsdb_set_extended_dn_guid()Andrew Tridgell1-0/+19
2010-01-02s4-dsdb: added dsdb_dn_is_upgraded_link_val()Andrew Tridgell1-0/+9
This is used to detect if a link has been stored in the w2k3 extended format
2010-01-02s4-dsdb: allow the component name to be specified in dsdb_get_extended_dn_guid()Andrew Tridgell1-2/+2
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2009-12-21s4-dsdb-util: Execute ldb_request using LDB_CONTROL_AS_SYSTEMKamen Mazdrashki1-0/+49
This function is intended to be used when data needs to be modified skipping access checks. Signed-off-by: Andrew Tridgell <tridge@samba.org>
2009-12-21s4-dsdb-util: Utility function to process ldb_request in transactionKamen Mazdrashki1-0/+26
This function is to be used later for manually crafted ldb_requests from within dsdb layer Signed-off-by: Andrew Tridgell <tridge@samba.org>
2009-12-21s4-dsdb: added dsdb_get_extended_dn_uint64()Andrew Tridgell1-3/+11
2009-12-21s4-dsdb: added two new dsdb_get_extended_dn_*() helper functionsAndrew Tridgell1-0/+43
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2009-12-18s4-dsdb: fixed the sort in dsdb_find_nc_root()Andrew Tridgell1-1/+6
2009-12-17s4:"samdb_set_password" - remove delete instructionsMatthias Dieter Wallnöfer1-7/+2
They won't work when the LDB change is done using "samdb_replace" (consider "samr_password.c" functions). I think this has been a relict which has been useful before the "password_hash" module existed. Basically it itself does now the updates.
2009-12-17s4:dsdb/common/util - make NTTIME attribute wrappers use a "const" messageMatthias Dieter Wallnöfer1-4/+6
There is no reason to have the message non-const here.
2009-12-16s4-dsdb: added dsdb_get_deleted_objects_dn()Andrew Tridgell1-0/+22
This is based on the code from Eduardo Lima <eduardoll@gmail.com>, but uses the new helper functions added in the last couple of commits Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2009-12-16s4-dsdb: added dsdb_find_nc_root()Andrew Tridgell1-0/+64
This is based on the function of the same name from Eduardo Lima <eduardoll@gmail.com>, but using ldb_dn_compare, to give us comparisons consistent with what the rest of the code uses. We will use this function in combination with dsdb_wellknown_dn() to find the Deleted Objects container for any object. Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2009-12-16s4-dsdb: added dsdb_wellknown_dn()Andrew Tridgell1-0/+32
This finds a wellknown object given its GUID Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2009-12-16s4-dsdb: added dsdb_dn_is_deleted_val()Andrew Tridgell1-0/+14
This is used to determine if a extedned DN has the 'DELETED=1' component Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2009-12-14s4-dsdb: return a zero guid on error in samdb_result_guid()Andrew Tridgell1-1/+1
2009-12-13s4:"samdb_set_password_sid" - clean up created objects correctlyMatthias Dieter Wallnöfer1-2/+14
- We should clean up such "helper" objects created in this function to don't have them around until "mem_ctx" is destroyed - Remove a from my view pointless comment "This is a password set, not change" since an external argument "user_change" decides this ("modify" or "(re)set")
2009-12-10s4-dsdb: use GUID_to_ndr_blob()Andrew Tridgell1-7/+3
2009-12-10s4-dsdb: simplify samdb_result_guid()Andrew Tridgell1-11/+4
2009-12-10s4-dsdb: use GUID_from_ndr_blob() to create dsdb_get_extended_dn_guid()Andrew Tridgell1-0/+14
2009-12-09s4-dsdb: added dsdb_functional_level() helper functionAndrew Tridgell1-0/+16
2009-12-07s4:dsdb Make parentGUID handler use dsdb_module_search_dn()Andrew Bartlett1-58/+0
This avoids doing a new search from the top of the module stack. This also removes the helper function dsdb_find_parentguid_by_dn() which is now unused. Andrew Bartlett
2009-12-04s4-drsutil: fixed a memory leak in samdb_search_countAndrew Tridgell1-4/+5
In general functions that don't return any memory should not take a memory context. Otherwise it is too easy to have a bug like this where memory is leaked
2009-11-24s4:dsdb Add function to return the CN=Aggregate schema DNAndrew Bartlett1-0/+18
2009-11-20s4-drs: Utility functions to deal with GUIDFernando J V da Silva1-0/+99
dsdb_find_parentguid_by_dn() returns the parentGUID for a given DN dsdb_msg_add_guid() adds a GUID value to a given message (either objectGUID or parentGUID). Signed-off-by: Andrew Tridgell <tridge@samba.org>
2009-11-15s4:samdb util - add a call for generating a correct "lDAPDisplayName"Matthias Dieter Wallnöfer1-0/+28
This is needed for the SAMLDB module enhancement regarding schema objects. The algorithm in pseudo code is located in MS-ADTS 3.1.1.2.3.4.
2009-11-07s4:dsdb/common/util - samdb_result_hashes - use "unsigned int" for countersMatthias Dieter Wallnöfer1-2/+1
2009-11-06s4:samdb_check_password - allow the password string to be NULLMatthias Dieter Wallnöfer1-0/+1
This deactivates the password complexity check, but not the minimum password length one, since the length is specified. This change is needed by my password module work.