summaryrefslogtreecommitdiff
path: root/source4/lib/ldb/common
AgeCommit message (Collapse)AuthorFilesLines
2010-06-29ldb:ldb_modules.c - "ldb_dso_load_symbol" - remove unneeded caste before "dlsym"Matthias Dieter Wallnöfer1-2/+1
2010-06-29s4:ldb - "ldb_dn_update_components" - fix free of invalid DN partsMatthias Dieter Wallnöfer1-4/+3
Use "LDB_FREE" for such free operations and in addition wipe also the casefolded DN out.
2010-06-29ldb:ldb_dn.c - "ldb_dn_set_extended_component" - free the linearized string ↵Matthias Dieter Wallnöfer1-2/+4
when the components change
2010-06-29s4:ldb_dn.c - make the code parts which free extended components consistentMatthias Dieter Wallnöfer1-9/+7
Cosmetic
2010-06-29ldb:ldb_dn - "ldb_dn_explode" - move the "dn->comp_num" initalisation ↵Matthias Dieter Wallnöfer1-3/+3
upwards and use "LDB_FREE" for freeing "dn->components" Mostly cosmetic - no behaviour change
2010-06-20ldb:controls - add the "TREE_DELETE" control for allowing subtree deletesMatthias Dieter Wallnöfer1-0/+27
2010-06-20ldb: add a new control bypassioperationnalMatthieu Patou1-0/+27
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
2010-06-19ldb:ldb_dn.c - don't support "ldb_dn_add_child" on a "" parent DNMatthias Dieter Wallnöfer1-0/+7
It's meaningless and could end in DNs as "cn=child,".
2010-06-15ldb: Fix included ldb build.Jelmer Vernooij1-0/+4
2010-06-06ldb:ldb_msg_remove_attr - provide a better implementationMatthias Dieter Wallnöfer1-2/+3
We can have some special (bad) messages which contain multiple message elements for the same attribute. The AD password change ones are such an example.
2010-06-02s4:ldb_msg_element_compare - fix typo in commentMatthias Dieter Wallnöfer1-1/+1
2010-05-31ldb:ldb_msg_add_steal_string - prevent also there the addition of strings ↵Matthias Dieter Wallnöfer1-0/+5
with length 0
2010-05-22s4:ldb_controls: make it possible to pass arbitrary control via the command lineStefan Metzmacher1-0/+34
--controls=local_oid:1.3.6.1.4.1.7165.4.3.7:1 To specify the DSDB_CONTROL_PASSWORD_HASH_VALUES_OID control as critical. metze
2010-05-13ldb:ldb_msg.c - use result constantMatthias Dieter Wallnöfer1-1/+1
2010-05-10s4/dn: handle case 'base' dn has no componentsKamen Mazdrashki1-1/+1
This could if the 'base' dn is special for example.
2010-05-04s4/rodc: Support read-only databaseAnatoliy Atanasov1-0/+48
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.
2010-04-12s4-ldb: fixed a crash bug for non-UTF8 stringsAndrew Tridgell1-1/+3
when one of the strings was not valid UTF8, we would try to dereference NULL
2010-03-09Fix typo and convert spaces to tabsSimo Sorce1-4/+4
2010-03-09s4:ldb fix escape parsingSimo Sorce1-2/+24
sscanf can return also on short reads, in this case an invalid escape sequence like '\1k' would be accepted, returning 1 as value and swallowing the 'k'. Use an auxiliar function to validate and convert hex escapes.
2010-03-08LDB:common - Change counters to "unsigned" where appropriateMatthias Dieter Wallnöfer11-67/+76
To count LDB objects use variables of type "unsigned (int)" or "long long int" on binary or downto searches. To count characters in strings use "size_t". To calculate differences between pointers use "ptrdiff_t".
2010-03-01s4:LDB - cosmetic fix for a "for" loopMatthias Dieter Wallnöfer1-1/+1
2010-02-26s4:ldb_dn: fix an uninitialized variable (found by make valgrindtest)Stefan Metzmacher1-1/+1
metze
2010-02-26s4:ldb_dn: remove dn->ext_linearized when ext_components is modified.Stefan Metzmacher1-3/+4
metze
2010-02-26s4:ldb_dn: reset dn->ext_comp_num in ldb_dn_explode()Stefan Metzmacher1-2/+2
metze
2010-02-22LDB related spelling fixes.Brad Hards4-4/+4
Signed-off-by: Matthias Dieter Wallnöfer <mwallnoefer@yahoo.de>
2010-02-14s4-ldb: use TYPESAFE_QSORT() in the rest of the ldb codeAndrew Tridgell2-4/+4
2010-02-11ldb_match - Ignore ":dn" part of extended matches for nowMatthias Dieter Wallnöfer1-2/+5
It's not fully clear what this ":dn" part means for us. What we know is that older AD implementations (Windows Server 2000, 2003) need it to have extended matches working in the expected way. To be able to interoperate with s3's winbind and other tools I and gd decided to transform this into a warning until we know what to do. This should fix bug #6511.
2010-01-13s4:ldb_msg: first try to decode integers as signed and then fallback to unsignedStefan Metzmacher1-0/+18
LDAP only knowns about signed integers, so let ldb_msg_find_attr_as_uint() and ldb_msg_find_attr_as_uint64() cope with it. metze
2010-01-13s4:ldb: be more strict in parsing ldb time stringsStefan Metzmacher1-4/+4
metze
2010-01-09s4-ldb: validate the type of the ldb argument to ldb_dn_new()Andrew Tridgell1-1/+7
It has been a common bug to get the first two arguments the wrong way around
2010-01-02s4-ldb: fixed valgrind error: ares can be freed by callbackAndrew Tridgell1-4/+1
2010-01-02s4-ldb: allow modules to override error return valuesAndrew Tridgell1-2/+4
The samldb module overrides the error code for some returns when handling primaryGroupID. We need to take the error from the async callback to allow this to work reliably
2010-01-02s4-ldb: use safe length limited conversions for int64 and timeAndrew Tridgell1-13/+48
2010-01-02s4-ldb: added ldb_val_to_time() Andrew Tridgell1-0/+27
This is intended as a replacement for ldb_string_to_time() for ldb_val inputs. This ensures it is length limited and includes additional validity checks
2010-01-02s4-ldb: added ldb_module_get_ops()Andrew Tridgell1-0/+5
This is needed to support DSDB_FLAG_OWN_MODULE Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2009-12-18s4-dsdb: added ldb_dn_update_components()Andrew Tridgell1-0/+23
This is used to udpate just the DN components of a ldb_dn, leaving the other extended fields alone. It is needed to prevent linked attribute updates from removing other extended components. Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2009-12-18s4-ldb: canonicalise the message on ldb_addAndrew Tridgell1-0/+9
This canonicalise avoids a problem with an add that has multiple elements with the same el->name. That is allowed by MS servers, and by ldb, but it breaks things like the tdb backend and the repl_meta_data RPMD handling. Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2009-12-16s4-ldb: fixed a transaction error on prepare_commitAndrew Tridgell1-2/+2
when a prepare commit fails, we need to give a cancel to all modules, not a commit! Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2009-12-15Removed ldb_modify_ctrl from ldb, implemented as a static in ldap_backend.Nadezhda Ivanova1-13/+4
2009-12-14s4-ldb: added a function to filter extended components of a ldb_dnAndrew Tridgell1-0/+16
We need to be able to filter out components that should not be exposed to users
2009-12-14s4-ldb: added a new "reveal" controlAndrew Tridgell1-0/+27
This control will allow inspection of internal ldb values, which would normally be stripped before being presented to users. The first use will be stripping linked attribute meta data extended components.
2009-12-14s4-ldb: sort the linearized extended DN by component nameAndrew Tridgell1-0/+14
This will make life easier when handling deleted linked attributes
2009-12-10s4-ldb: fixed 2 bugs in ldb_dn_set_extended_component()Andrew Tridgell1-2/+5
The first bug was that setting a component twice could cause it to appear twice in the DN. The second bug was that using an existing ldb_val from a previous call of ldb_dn_get_extended_component() as an argument to ldb_dn_set_extended_component() would cause a valgrind error (as the array the val pointed into will change).
2009-12-10s4-ldb: use GUID_to_ndr_blob()Andrew Tridgell1-1/+6
2009-12-07s4:ldb Add a function to match a message against an objectClassAndrew Bartlett1-0/+19
(as objectClass will always be a case insensitive ascii string, we can make a much simpler match function here than for the general case). Andrew Bartlett
2009-12-05s4-ldif: Fix memory leek in ldb_ldif_write()Kamen Mazdrashki1-0/+2
2009-11-30s4-ldb: changed ldb_msg_add_dn() to ldb_msg_add_linearized_dn()Crístian Deives1-3/+4
this makes the usage clearer Signed-off-by: Andrew Tridgell <tridge@samba.org>
2009-11-28s4: fix SD update and password change in upgrade scriptMatthieu Patou1-0/+27
- reserve a new Samba OID for recalculate SD control - fix the update SD function - fix handling of kvno in the update_machine_account_password function - fix handling of handles in RPC winreg server Signed-off-by: Andrew Tridgell <tridge@samba.org>
2009-11-27s4-ldb: better to test for valid arguments in ldb library than commandlineAndrew Tridgell1-0/+10
We were testing for valid DNs in ldbrename in the command line tool. This hid a bug in the ldb library where we caught a bad DN in the objectclass module rather than in the main ldb code. It is better to do validation of the DNs passed on the command line in the library code, as this gives us more consistent error handling between the programming APIs for ldb and the command line.
2009-11-20Some changes to allow processing of ldap controls on modify requests.Nadezhda Ivanova1-4/+13
ldap_backend used to filter out ldap controls on modify. Also, modified python binding for ldap_modify to allow writing tests for such controls.