1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-12 20:58:37 +03:00

4642 Commits

Author SHA1 Message Date
Andrew Tridgell
67bf17598b don't allow two controls to be added with the same OID
Two controls with the same OID makes no sense, as they may
have different data attached
2009-09-02 18:19:55 +10:00
Andrew Tridgell
b5bf440065 added ldb_ldif_message_string()
This function provides a easy function for displaying a ldb_message
structure in a human readable format. It is especially useful for
calling in gdb.
2009-09-02 18:19:54 +10:00
Simo Sorce
a3e9b62f44 ldb: Depend on libtalloc 2.0.0 2009-08-30 17:52:43 -04:00
Simo Sorce
185d06e122 ldb: cosmetic changes in ldb_dn
- remove trailing spaces and tabs
- shorten some variable names for readability
- try to break superlong lines for readability
2009-08-30 17:49:37 -04:00
Andrew Bartlett
77e2403f13 s4:ldb Don't sleep(100) in this error case, but debug the LDIF 2009-08-28 22:41:54 +10:00
Michael Adam
e3c7e9e81e s4-ldb: update dlinklist.h to match main copy (lib/util/dlinklist.h)
Michael
2009-08-28 14:25:40 +02:00
Andrew Bartlett
425386ff61 s4:ldb Add ldb_ldif_write_string() and python wrappers
This allows us to turn a python LdbMessage back into a string.

Andrew Bartlett
2009-08-26 15:59:00 +10:00
Andrew Bartlett
3ed33813bb s4:ldb Add hooks to get/set the flags on a ldb_message_element
Also add tests to prove that we got this correct, and correct the
existing tests which used the wrong constants.

Andrew Bartlett
2009-08-26 15:07:50 +10:00
Andrew Bartlett
7234a24f82 s4:ldb Add python binding and test for ldb_msg_diff() 2009-08-24 20:24:18 +10:00
Stefan Metzmacher
251b03eee6 s4:cmdline: setup talloc log and abort functions
metze
2009-08-24 16:29:59 +10:00
Andrew Bartlett
e71ce2f9e3 s4:ldb Python requires that a 'compare' handler return -1, 0 or 1 2009-08-21 17:51:52 +10:00
Andrew Bartlett
c49145b1ab s4:ldb Use length-limited printf to avoid walking off end of strings
This should ensure the debug messages do not have random characters at
their ends.

Andrew Bartlett
2009-08-21 17:50:50 +10:00
Matthias Dieter Wallnöfer
2cf897b10a s4: Make the int32 problem more clear - and fix another error 2009-08-17 20:29:11 +02:00
Matthias Dieter Wallnöfer
6cc9e4b900 s4: Fixed the int32 datatype support
Should finally fix bug #6136 ("groupType", "sAMAccountType" ... attributes).
2009-08-17 13:15:26 +02:00
Matthias Dieter Wallnöfer
faedda0455 s4:ldb python bindings: Handle the parameters of the connect call in the right way 2009-08-17 11:58:38 +02:00
Andrew Bartlett
148290a809 s4:ldb Remove obsolete comment about ldb_tdb's sequence num 2009-08-17 11:47:14 +10:00
Andrew Tridgell
341477347d fixed the updateNow schema test to use a canonical OID
The expression time.strftime("%s", time.gmtime())[3:] leads to a
string with a leading 0. When added then read back from the prefix map
this leads to a different string, so it is never found.

Use the simpler str(random.randint(a,b)) expression instead
2009-08-17 11:14:07 +10:00
Matthias Dieter Wallnöfer
fa61fdf8b7 s4:ldb - Free the asynchronous result 2009-08-14 01:56:33 +02:00
Matthias Dieter Wallnöfer
44dfb2902e s4: Better way to call "dom_sid_to_rid" from ldap.py 2009-08-14 00:14:15 +02:00
Matthias Dieter Wallnöfer
c7e21907b4 ldb: Don't break the standalone LDB build (operational module removed) 2009-08-11 11:02:03 +02:00
Matthias Dieter Wallnöfer
159a33a7d4 s4:test for "primaryGroupToken"
Tests for the right behaviour of this introduced constructed attribute.
Since we don't support the read-only-ness of those attributes yet, I commented
some lines out.
Also I had to add a function for python which converts domain SIDs in RIDs.
And a small fix for the "groupType" test.
2009-08-11 12:59:17 +02:00
Matthias Dieter Wallnöfer
b255a41dca s4:operational module - move and enhancements
This moves the "operational" LDB module to the right place under "dsdb/samdb/ldb_modules"
(suggested by abartlet) and enhances it for supporting dynamic generated
"primaryGroupToken" for AD groups. This should fix bug #6466.
2009-08-11 12:59:15 +02:00
Andrew Tridgell
c6936ab00f raise the debug level for a common message
when a client disconnects we expect this to happen, so don't print an
error each time
2009-08-12 15:19:42 +10:00
Andrew Tridgell
e2d4ae1510 fixed several places that unnecessarily take a reference to the event context
These references were triggering the ambiguous talloc_free errors from
the recent talloc changes when the server is run using the 'standard'
process model instead of the 'single' process model. I am aiming to
move the build farm to use the 'standard' process model soon, as part
of an effort to make our test environment better match the real
deployment of Samba4.

The references are not needed as the way that the event context is
used is as the 'top parent', so when the event context is freed then
all of the structures that were taking a reference to the event
context were actually freed as well, thus making the references
redundent.
2009-08-07 17:24:48 +10:00
Andrew Tridgell
4aad79041b make sure we never look past the end of either string in ldb_comparison_fold()
This fixes a bug in the samba3sam test with the python libraries as
noticed by abartlet
2009-08-07 14:34:01 +10:00
Andrew Bartlett
dd557cc361 s4:ldb Make error message in rnd_name more useful 2009-08-07 14:22:54 +10:00
Matthias Dieter Wallnöfer
39b0158373 s4:ldb Cosmetic corrections in "rdn_name" module 2009-08-05 20:28:05 +02:00
Jelmer Vernooij
46bd2271b2 pyldb: Fix reference counting on ldb_message_elements, add extra type
check.
2009-08-05 03:44:25 +02:00
Andrew Bartlett
3e3f64f05f s4:ldb initialise e->values[i].length before use in python bindings 2009-08-05 10:35:45 +10:00
Andrew Bartlett
dac8aabb55 Add const 2009-08-04 16:11:55 +10:00
Andrew Bartlett
d7b39a353a s4:ldif_handlers Allow a binary nTsecurityDescriptor when parsing LDIF
Also allow a SDDL security descriptor, using the domain SID attached
to the session (it will search for it during the LDIF parse if need
be).

Andrew Bartlett
2009-08-04 16:10:39 +10:00
Jelmer Vernooij
15d73317ea pyldb: Properly keep copies of Python string contents, rather than
relying on reference leaks :-)
2009-08-04 00:18:42 +02:00
Jelmer Vernooij
bb944dcf64 pyldb: Raise proper exception when attempting to assign a string to a dn
attribute.
2009-08-03 18:15:16 +02:00
Stefan Metzmacher
6f40637ca8 s4:tls: avoid using talloc_reference() in tls_init_client()
metze
2009-07-31 14:42:04 +02:00
Stefan Metzmacher
d866497b18 s4:tls: avoid using talloc_reference() in tls_init_server()
metze
2009-07-31 14:42:03 +02:00
Jelmer Vernooij
6768cfe624 DCE/RPC(Python): Rename py_talloc_import to py_talloc_steal.
Use py_talloc_reference in DCE/RPC code, fixes
					access to SAMR pipe.
2009-07-30 20:04:42 +02:00
Andrew Bartlett
bfda910a20 s4:tls Enable GnuTLS back to version 1.4 (an into the future)
We think we have the bug fixed.

Andrew Bartlett
2009-07-28 14:11:18 +10:00
Stefan Metzmacher
d005e4dabb s4:ldb: add support for the new Recycle Bin Feature LDAP controls
LDB_CONTROL_SHOW_RECYCLED_OID         1.2.840.113556.1.4.2064
LDB_CONTROL_SHOW_DEACTIVATED_LINK_OID 1.2.840.113556.1.4.2065

metze
2009-07-23 18:04:33 +02:00
Slava Semushin
11fa3ed9ee source4/lib/registry/patchfile.c(reg_diff_load): fixed possible resource leak.
File descriptor leaks when write(2) fails and we are returning from
function.

Found by cppcheck:
[./source4/lib/registry/patchfile.c:319]: (error) Resource leak: fd
2009-07-19 16:01:12 +02:00
Jelmer Vernooij
04c1d02021 Remove unnecessary include, update README. 2009-07-19 12:15:59 +02:00
Jelmer Vernooij
5bf6203bc2 Remove outdated status file about samba3 -> samba4 upgrade project. 2009-07-19 12:10:47 +02:00
Jelmer Vernooij
d884fcf9a0 Actually fill in ldb modules directory. 2009-07-18 18:28:57 +02:00
Jelmer Vernooij
d356669492 Remove pyldb_util and simply duplicate the 5-line function it contains,
rather than creating a separate shared library for it.
2009-07-18 16:11:21 +02:00
Jelmer Vernooij
8c5aff207d ldb: Display SHLD_FLAGS when building. 2009-07-18 10:37:59 +02:00
Sumit Bose
9d7cb4826a remove all '\n' from ldb_debug 2009-07-14 11:21:11 -04:00
Anatoliy Atanasov
e3631da158 Test for schemaUpdateNow command 2009-07-08 14:40:20 +10:00
Andrew Bartlett
f45a9d63e5 s4:ldb Rework use of talloc and ldif objects in python wrapper
The talloc hirarchy here was a bit odd - we would both steal the
parsed ldif onto 'NULL', then reference it onto a python talloc
wrapper.

Now we just leave the reference, after we complete building the object.

Andrew Bartlett
2009-07-06 09:50:47 +10:00
Andrew Bartlett
da45d5215d s4:ldb Fix talloc hirarchy in LDIF parsing code
The problem here was that some parts of the ldb_message were still
attached to the ldb_ldif structure, and when only the message was
taken (and the ldif free'ed to reclaim memory) we refereced free'ed
memory.

Andrew Bartlett
2009-07-06 09:50:47 +10:00
Andrew Bartlett
4e58c7881e s4:ldb Allow rootdse module to build without ldb_private.h
It seems quite reasonable to allow modules to re-initialise the set of
cached DNs on the ldb context.

Andrew Bartlett
2009-06-30 15:30:13 +10:00
Andrew Bartlett
49e5b83aa9 s4: dsdb Avoid using the internal ldb_private.h header
This job is not complete (the partition module remains a unfinished
task), but now we do use the private ldb headers much less.

Andrew Bartlett
2009-06-30 15:12:29 +10:00