summaryrefslogtreecommitdiffstats
path: root/source4/lib/ldb/common
Commit message (Collapse)AuthorAgeFilesLines
...
* s4:ldb_controls: make it possible to pass arbitrary control via the command lineStefan Metzmacher2010-05-221-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
* ldb:ldb_msg.c - use result constantMatthias Dieter Wallnöfer2010-05-131-1/+1
|
* s4/dn: handle case 'base' dn has no componentsKamen Mazdrashki2010-05-101-1/+1
| | | | This could if the 'base' dn is special for example.
* s4/rodc: Support read-only databaseAnatoliy Atanasov2010-05-041-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.
* s4-ldb: fixed a crash bug for non-UTF8 stringsAndrew Tridgell2010-04-121-1/+3
| | | | | when one of the strings was not valid UTF8, we would try to dereference NULL
* Fix typo and convert spaces to tabsSimo Sorce2010-03-091-4/+4
|
* s4:ldb fix escape parsingSimo Sorce2010-03-091-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.
* LDB:common - Change counters to "unsigned" where appropriateMatthias Dieter Wallnöfer2010-03-0811-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".
* s4:LDB - cosmetic fix for a "for" loopMatthias Dieter Wallnöfer2010-03-011-1/+1
|
* s4:ldb_dn: fix an uninitialized variable (found by make valgrindtest)Stefan Metzmacher2010-02-261-1/+1
| | | | metze
* s4:ldb_dn: remove dn->ext_linearized when ext_components is modified.Stefan Metzmacher2010-02-261-3/+4
| | | | metze
* s4:ldb_dn: reset dn->ext_comp_num in ldb_dn_explode()Stefan Metzmacher2010-02-261-2/+2
| | | | metze
* LDB related spelling fixes.Brad Hards2010-02-224-4/+4
| | | | Signed-off-by: Matthias Dieter Wallnöfer <mwallnoefer@yahoo.de>
* s4-ldb: use TYPESAFE_QSORT() in the rest of the ldb codeAndrew Tridgell2010-02-142-4/+4
|
* ldb_match - Ignore ":dn" part of extended matches for nowMatthias Dieter Wallnöfer2010-02-111-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.
* s4:ldb_msg: first try to decode integers as signed and then fallback to unsignedStefan Metzmacher2010-01-131-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
* s4:ldb: be more strict in parsing ldb time stringsStefan Metzmacher2010-01-131-4/+4
| | | | metze
* s4-ldb: validate the type of the ldb argument to ldb_dn_new()Andrew Tridgell2010-01-091-1/+7
| | | | | It has been a common bug to get the first two arguments the wrong way around
* s4-ldb: fixed valgrind error: ares can be freed by callbackAndrew Tridgell2010-01-021-4/+1
|
* s4-ldb: allow modules to override error return valuesAndrew Tridgell2010-01-021-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
* s4-ldb: use safe length limited conversions for int64 and timeAndrew Tridgell2010-01-021-13/+48
|
* s4-ldb: added ldb_val_to_time() Andrew Tridgell2010-01-021-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
* s4-ldb: added ldb_module_get_ops()Andrew Tridgell2010-01-021-0/+5
| | | | | | This is needed to support DSDB_FLAG_OWN_MODULE Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
* s4-dsdb: added ldb_dn_update_components()Andrew Tridgell2009-12-181-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>
* s4-ldb: canonicalise the message on ldb_addAndrew Tridgell2009-12-181-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>
* s4-ldb: fixed a transaction error on prepare_commitAndrew Tridgell2009-12-161-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>
* Removed ldb_modify_ctrl from ldb, implemented as a static in ldap_backend.Nadezhda Ivanova2009-12-151-13/+4
|
* s4-ldb: added a function to filter extended components of a ldb_dnAndrew Tridgell2009-12-141-0/+16
| | | | | We need to be able to filter out components that should not be exposed to users
* s4-ldb: added a new "reveal" controlAndrew Tridgell2009-12-141-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.
* s4-ldb: sort the linearized extended DN by component nameAndrew Tridgell2009-12-141-0/+14
| | | | This will make life easier when handling deleted linked attributes
* s4-ldb: fixed 2 bugs in ldb_dn_set_extended_component()Andrew Tridgell2009-12-101-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).
* s4-ldb: use GUID_to_ndr_blob()Andrew Tridgell2009-12-101-1/+6
|
* s4:ldb Add a function to match a message against an objectClassAndrew Bartlett2009-12-071-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
* s4-ldif: Fix memory leek in ldb_ldif_write()Kamen Mazdrashki2009-12-051-0/+2
|
* s4-ldb: changed ldb_msg_add_dn() to ldb_msg_add_linearized_dn()Crístian Deives2009-11-301-3/+4
| | | | | | this makes the usage clearer Signed-off-by: Andrew Tridgell <tridge@samba.org>
* s4: fix SD update and password change in upgrade scriptMatthieu Patou2009-11-281-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>
* s4-ldb: better to test for valid arguments in ldb library than commandlineAndrew Tridgell2009-11-271-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.
* Some changes to allow processing of ldap controls on modify requests.Nadezhda Ivanova2009-11-201-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.
* s4-ldb: added a warning about ldb_msg_add_dnAndrew Tridgell2009-11-201-0/+2
| | | | ldb_msg_add_dn does not copy the dn linearized string
* added new function "ldb_msg_add_dn"Crístian Deives2009-11-201-0/+9
| | | | | | a helper function to a DN element to an ldb_msg using ldb_msg_add_string. Signed-off-by: Andrew Tridgell <tridge@samba.org>
* s4-ldb: make DN escaping/unescaping consistentAndrew Tridgell2009-11-131-20/+54
| | | | | | | | | | | | The DN escape function was using the form \c where c is any character. The unescape function was using \XX where XX is a 2 digit hex number. The asymmetry led to quite a few problems when we start to deal with DNs containing escape chars, such as CN=foo\0ADEL:XXX. The result was a DN that was not accessible. This patch changes the escaping to follow RFC2253 much more closely. We accept either type of escape, and produce the two types of escape, depending on the character being escaped
* s4:ldb Allow ldb_msg_canonicalize to handle empty elementsAndrew Bartlett2009-11-121-1/+1
| | | | | | (These are deliberately there in DRS replication). Andrew Bartlett
* s4:ldb Don't segfault if we somehow get an unknown extended dn elementAndrew Bartlett2009-11-121-0/+8
|
* s4:ldb Change ldb_request_add_control to the normal 'for loop' patternAndrew Bartlett2009-11-121-2/+1
|
* s4:ldb Remove DN+Binary code from the core ldb_dnAndrew Bartlett2009-11-121-256/+6
| | | | | | | | | | This is now in dsdb_dn. Removing this to a specific wrapper avoids a number of bugs where Binary DNs were being handled incorrectly. This reverts much of tridge's commit fd22e0304782e20b9bbb29464b6c745d409ff4c6 Andrew Bartlett
* s4:ldb Add a helper function for 'canonicalise' both strings base comparesAndrew Bartlett2009-11-121-0/+27
| | | | | | | This will help simplify boilerplate comparison functions where we don't have a shortcut way to compare. Andrew Bartlett
* ldb_init: use constant for result of "ldb_setup_wellknown_attributes"Matthias Dieter Wallnöfer2009-11-071-1/+1
|
* s4/ldb: Fix double allocation for "ldb_url"Kamen Mazdrashki2009-11-061-2/+2
| | | | Signed-off-by: Stefan Metzmacher <metze@samba.org>
* s4-ldb: '+' can also happen in base64 encoded index DNsAndrew Tridgell2009-10-271-1/+1
|
* s4:ldb Add additional tracing of the ldb APIAndrew Bartlett2009-10-272-4/+80
| | | | | | | This helps pin down where errors occour, by printing a call stack and setting error strings and trace messages in the transaction case. Andrew Bartlett