1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-24 02:04:21 +03:00

4795 Commits

Author SHA1 Message Date
Matthias Dieter Wallnöfer
f9990e9b39 s4:ldb - add a check which has to be done on beginning of a "modify" operation 2009-10-08 00:18:06 +02:00
Matthias Dieter Wallnöfer
32a7b82e87 s4:ldb_tdb - Rework/Various
- Unify the error handling method with "done" mark in all longer functions
- Fix up result codes to match more the real MS AD
- Some cosmetic fixups
2009-10-08 00:18:06 +02:00
Matthias Dieter Wallnöfer
8536e1b947 s4:various LDB modules - "build_request" functions - propagate result codes back
It's very useful to know the exact result code when something fails and not
only a generic (by the module) created one.
Sure, there are some exception cases with specific results (special message
constellations, attributes, values...) which shouldn't be changed at all
(examples of them are in the "ldap.py" test). Therefore I looked very
carefully to not change them.
2009-10-06 19:41:16 +02:00
Andrew Tridgell
9c1e230bc2 s4-ldb: fixed error on single value error
When you try to add a 2nd value to a single valued attribute you get 
LDB_ERR_ATTRIBUTE_OR_VALUE_EXISTS. w2k8-r2 join to s4 relies on this
error, doing a replace after it sees the error
2009-10-06 18:57:06 +11:00
Matthias Dieter Wallnöfer
6a4efccb38 s4:ldap.py - commented out the UTF8 tests (and fixed some deletion DNs) 2009-10-03 16:54:19 +02:00
Matthias Dieter Wallnöfer
957cc4b8b6 s4:ldb_tdb - fix memory leaks 2009-10-03 15:49:40 +02:00
Matthias Dieter Wallnöfer
817208090d s4:ldb.h - add constant for LDAP EXOP password change
Also enhance some other comments.
2009-10-03 13:27:50 +02:00
Matthias Dieter Wallnöfer
be938ab44b s4:ldap.py - add tests for valid parent and RDN 2009-10-03 12:48:51 +02:00
Matthias Dieter Wallnöfer
2904f3378d s4:ldap.py - add a test for the "systemOnly" classes 2009-10-03 10:57:14 +02:00
Matthias Dieter Wallnöfer
deb268f7fa s4:rdn_name - fix up the rename operation
A function call was wrong ("ldb_request" rathen than "ldb_next_request").
2009-10-03 10:36:41 +02:00
Matthias Dieter Wallnöfer
2b9b232912 Revert "s4:LDB/LDAP - Re-allow renames"
This reverts commit 767fce6fccf484b547219abd5e6abc941eacaf92.

Simo pointed out that the patch generates race conditions. We need to solve this
using a new control.
2009-10-03 00:14:05 +02:00
Matthias Dieter Wallnöfer
e218a529e0 s4:ldap.py - add a very special rename test (with invalid - empty RDN) 2009-10-02 21:27:46 +02:00
Matthias Dieter Wallnöfer
b45f56d4ba s4:ldb_ildap - Don't segfault on a empty RDN 2009-10-02 21:27:46 +02:00
Matthias Dieter Wallnöfer
767fce6fcc s4:LDB/LDAP - Re-allow renames
The main problem is that the "rdn_name" module launches on a rename request also
a modification one with the "special attributes" which can't be changed directly.
An introduced flag helps to bypass the restriction.
2009-10-02 21:27:46 +02:00
Matthias Dieter Wallnöfer
a076d9fb59 s4:ldap.py - major enhancements
- Clean up and reorder it a bit
- Test which adds invalid attributes
- Test which makes sure that the 'distinguishedName' attribute cannot be modified
- Test which makes sure that we cannot change the RDN/'name' attribute through a modify request
2009-10-02 19:29:31 +02:00
Andrew Bartlett
2651603269 s4:ldb Don't allow RDN to be modified with an LDB modify message
Found by the Microsoft testsuite at the AD interop event.

Andrew Bartlett
2009-10-02 19:17:24 +02:00
Matthias Dieter Wallnöfer
d2ac4cbcee s4:rdn_name module - a normal error message should be enough for this failure
I don't think that we really want to have this error printed out on the server
console (stdout) since this hasn't serious results as DB or data corruption
and similar.
2009-10-02 19:17:23 +02:00
Andrew Bartlett
2f211daa47 s4:ldb Don't allow modifcation of distinguishedName 2009-10-02 18:57:08 +02:00
Matthias Dieter Wallnöfer
44df2488e3 s4: fix various warnings (not "const" related ones) 2009-10-02 15:33:48 +02:00
Andrew Tridgell
3f59705a71 Revert "s4:ldb-samba Use temp talloc contexts and talloc_steal avoid leaks."
This reverts commit 38f87f40bfd7892043d49009067ae28431279580.
2009-10-02 22:40:50 +10:00
Andrew Tridgell
35ff1f6f1f Revert "s4:ldb Fix ldb_list_find() folowing the change from char * to TDB_DATA"
This reverts commit f0c2c9854c7659221fe9480110a7d9b2b48afbf9.
2009-10-02 22:40:31 +10:00
Andrew Tridgell
a0c82f17f8 Revert "s4:ldb always talloc_free() the ldb_ldif_write context, even on success"
This reverts commit a610843e9f21ee77fd29356313d2ef05fe25a1ed.
2009-10-02 22:40:02 +10:00
Andrew Tridgell
959eff9206 Revert "s4:ldb Remove LTDB_PACKING_FORMAT_NODN"
This reverts commit bcbf0ae1e707c2355824800dc213d364070f070a.
2009-10-02 22:39:44 +10:00
Andrew Tridgell
52b10ff3c5 Revert "s4-ldb: merged with master"
This reverts commit 14c9070322d089dd96b389e8087c4f4bf1a6c7cc.
2009-10-02 22:39:19 +10:00
Andrew Tridgell
dfafd58348 Revert "s4-ldb: overallocate idxptr to reduce memory fragmentation"
This reverts commit e7846f69cacdd0551fcd777a71bf833a2fc9ca2b.
2009-10-02 22:39:10 +10:00
Andrew Tridgell
81c193da09 Revert "s4-ldb: fixed a memory leak"
This reverts commit c7358d989034c9d936c04f2a7e4f89db252b798e.
2009-10-02 22:38:58 +10:00
Matthias Dieter Wallnöfer
ee956c9172 s4:ldb.h - cosmetic - add whitespace 2009-10-02 12:45:09 +02:00
Andrew Bartlett
46c2af3612 s4:dsdb Add 'lazy_commit' module to swallow the 'lazy commit' OID
This allows this control to be specified as critical.  We support the
control because we choose to always be durable in our transactions.

We really, really need a 'duplicate request' API, as at the
moment we can't do this without a large, error-prone set of code that
cannot cope with new request fields or types.

Andrew Bartlett
2009-10-02 12:45:06 +02:00
Andrew Tridgell
c7358d9890 s4-ldb: fixed a memory leak 2009-10-02 12:45:05 +02:00
Andrew Tridgell
e7846f69ca s4-ldb: overallocate idxptr to reduce memory fragmentation 2009-10-02 12:45:04 +02:00
Andrew Bartlett
14c9070322 s4-ldb: merged with master 2009-10-02 12:45:03 +02:00
Andrew Bartlett
bcbf0ae1e7 s4:ldb Remove LTDB_PACKING_FORMAT_NODN
The restructured code makes this hader to support, and we have not had
this kind of LDB for a very long time now.

Andrew Bartlett
2009-10-02 12:45:03 +02:00
Andrew Bartlett
a610843e9f s4:ldb always talloc_free() the ldb_ldif_write context, even on success 2009-10-02 12:45:02 +02:00
Andrew Bartlett
f0c2c9854c s4:ldb Fix ldb_list_find() folowing the change from char * to TDB_DATA
(The format of index records in the internal manipulation changed)

Andrew Bartlett
2009-10-02 12:45:02 +02:00
Andrew Bartlett
38f87f40bf s4:ldb-samba Use temp talloc contexts and talloc_steal avoid leaks.
We would use the mem_ctx for internal work, but previously we did not
clean it up on exit.

Andrew Bartlett
2009-10-02 12:45:01 +02:00
Matthieu Patou
977a0aa273 pythonbindings: allow add() to have an array of controls as second parameter 2009-10-02 12:45:00 +02:00
Matthieu Patou
a73a0372f9 s4-ldb: Add new relax controls that allow relaxed x500 constraints checks 2009-10-02 12:44:59 +02:00
Andrew Tridgell
fd22e03047 s4-ldb: Add support for binary blobs in DNs
AD has the concept of a DN prefixed with B:NN:XXXXXX: that contains a
binary blob. We need to support those in order to give correctly
formatted binary blobs for things like wellKnownObjects

This implementation is not ideal, as it allows for binary blobs on all
DNs, whereas it should only allow them on those with a syntax of
2.5.5.7. We should clean this up in the future, but meanwhile this
implementation at least gets us a working DC join of w2k8 to s4.

This patch also uses a static function for marking DNs as invalid,
which is very useful when debugging this code, as you can break on it
in gdb.
2009-10-02 12:03:05 +10:00
Matthias Dieter Wallnöfer
c173c1beb1 s4:pyldb - Wrong error type (found only after the push) 2009-10-01 14:02:59 +02:00
Matthias Dieter Wallnöfer
54ea150f36 s4:ldb_msg_diff - Fixes up possible memory leaks and the python binding of it 2009-10-01 13:59:02 +02:00
Matthias Dieter Wallnöfer
ad549072aa s4:pyldb - Fixed the return value in "py_ldb_msg_diff"
The case distinction shouldn't be needed also when "diff" is NULL.
"PyLdbMessage_FromMessage" works with "NULL" arguments.
2009-09-30 16:01:17 +02:00
Matthias Dieter Wallnöfer
2529def9fd Revert "s4:wmic - Output enhancements"
This reverts commit fb914640ad656b146f732ab33063575e2e47e37c.

Jelmer requested the revert since he feels better when we reapply this change
after his merge with the updated WMI branch.
2009-09-30 16:01:01 +02:00
Wilco Baan Hofman
9af1c6db0f regshell: Add support for 'cd ..' and cd relative to the root.
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
2009-09-26 17:05:34 +02:00
Jelmer Vernooij
169ff6efea registry: Fix warning freeing talloc pointer with multiple parents. 2009-09-26 15:41:22 +02:00
Jelmer Vernooij
6b595a93c1 ldb: Check for talloc using pkg-config before checking manually, so we
find version errors.
2009-09-26 13:53:27 +02:00
Matthieu Patou
9a9202e7bd pythonbindings: allow add() to have an array of controls as second parameter
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
2009-09-26 01:31:38 +02:00
Andrew Bartlett
f28219d1a1 s4:ldif_handlers Fix memory leak in objectCategory LDIF handler 2009-09-23 14:01:30 -07:00
Andrew Tridgell
9b7de7f491 fixed spelling 2009-09-23 14:01:29 -07:00
Andrew Tridgell
83bef7d047 s4-ldb: server side sort args are const char * 2009-09-22 17:10:06 -07:00
Andrew Tridgell
1dfcd4c22c s4-ldb: fixed call argument order for ldb_dn_from_ldb_val
This caused _lots_ of problems, especially in server side sort
2009-09-22 17:10:06 -07:00