1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-11 05:18:09 +03:00
Commit Graph

19145 Commits

Author SHA1 Message Date
Andrew Bartlett
1a97bd915d s4:provision Ensure that @OPTIONS is mirrored into each partition
The previous patches to the provision system cut down on the number of
reconnects, and disabled the partition handling for part of the
process.  This means we lost the setting of @OPTIONS as a replicated
attribute into the partitions.

Andrew Bartlett
2009-08-26 17:37:01 +10: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
74218726e8 s4:schema Rework dsdb_write_prefixes_from_schema_to_ldb() to use talloc
This changes dsdb_write_prefixes_from_schema_to_ldb() to use an
internal talloc hirarchy, so we can safely give it a NULL context from
the python.

It also fixes manual construction of the ldb_message - we now use the
right helper functions.

Andrew Bartlett
2009-08-26 13:49:10 +10:00
Andrew Bartlett
a1da91174b s4:provison Add prefixes to ldb using same code a later modify will use
This allows us to test out the code that will do the modify of the
prefixMap, and to provide the bindings that may assist a future
upgrade script.

Andrew Bartlett
2009-08-26 13:49:10 +10:00
Andrew Bartlett
b9ec6bb1eb s4:provision Only create references to our server DN after the self join
This will ensure that the GUID can be filled in correctly, and assist
us to validate DN targets in the future.

Andrew Bartlett
2009-08-26 13:48:35 +10:00
Andrew Bartlett
a52e7a2c65 s4:scheam quiet a 'const' warning 2009-08-26 12:32:47 +10:00
Andrew Bartlett
7e54b5e568 s4:dsdb Rework dsdb_write_prefixes_to_ldb() to take a schema
The aim is to create a function that is more easily wrapped for
python, so that we can write the updated prefixMap in an upgrade
script.

Andrew Bartlett
2009-08-26 12:29:45 +10:00
Andrew Bartlett
cda99a202d s4:dsdb Use helper function to add 'show deleted' control
This revises tridge's commit 61ca4c491e
to use ldb_request_add_control() instead of a manual construction.

Andrew Bartlett
2009-08-26 11:10:51 +10:00
Andrew Tridgell
61ca4c491e fixed DRS rename of deleted objects
The objectclass module checks that the target parent exists, and
refuses renames if it doesn't exist. For this to work for deleted
objects we have to do the search in the objectclass module with the
"show deleted" control enabled.
2009-08-25 17:00:27 +10:00
Andrew Tridgell
3c7cbd60e5 fixed a double free bug on error in net export 2009-08-25 16:59:25 +10:00
Andrew Bartlett
436d8b6e06 s4:python Fix the reprovision test by deleting 'deleted' objects too.
We were failing because CN=Deleted Objects, which is marked as
'deleted' itself, could not be re-added in a reprovision.

Andrew Bartlett
2009-08-25 16:28:44 +10:00
Andrew Bartlett
6542a084a5 s4:dsdb Rework show_deleted module not to liniearise the LDAP filter
Instead, use the fact that the ldb_parse_tree structure is public to
construct the 'and not deleted' clause as a structure, and apply each
filter tree to that template.

Andrew Bartlett
2009-08-25 16:28:44 +10:00
Jeremy Allison
9a86f26a5f Allow systems with timestamp granularity of 1sec to work with
this test.
Jeremy.
2009-08-24 18:21:23 -07:00
Andrew Bartlett
be9441ac3f s4:dsdb Use talloc_strndup() to ensure OIDs are null terminated
The OIDs are not NULL terminated by the python caller, in line with
the LDB API, but we need them to be here, as we were casting them to a
string.

Andrew Bartlett
2009-08-24 20:24:19 +10:00
Andrew Bartlett
7234a24f82 s4:ldb Add python binding and test for ldb_msg_diff() 2009-08-24 20:24:18 +10:00
Andrew Bartlett
b4e8d927cd s4:dsdb Add const 2009-08-24 20:24:18 +10:00
Andrew Bartlett
bf54b419ae s4:dsdb remove unused variable 2009-08-24 20:24:18 +10:00
Andrew Bartlett
cc330f9362 s4:dsdb use talloc_strndup() in GET_STRING_LDB() rather than walk off the end
The problem is that samdb_result_string() and
ldb_msg_find_attr_as_string() both simply cast the string, rather than
ensuring the return value is NULL terminated.  This may be best
regarded as a flaw in LDB, but fixing it there is going to be more
difficult.

Andrew Bartlett
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
Stefan Metzmacher
5cefde4075 s4:build: require talloc >= 2.0.0
metze
2009-08-24 16:29:59 +10:00
Andrew Bartlett
497234c1cb s4:ntp_signd Fix bug 6656 - Set protocol version to 0, as used by ntpd
The change to protocol version 1 was not intentional, and broke the
protocol established with the ntp.org project.

Andrew Bartlett
2009-08-22 11:14:22 +10:00
Sam Liddicott
9d824dc115 s4:client
Put was assuming that the remote name was always absolute, and not relative to
the current remote directory.

Signed-off-by: Sam Liddicott <sam@liddicott.com>
2009-08-21 16:54:49 +02: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
Andrew Bartlett
29ef1b2325 s4:kerberos Use MIT compatible names for these enc types
This is a small start on (ie, the only trivial part of) the work shown in:
http://k5wiki.kerberos.org/wiki/Projects/Samba4_Port#Samba.27s_use_of_Heimdal_symbols.2C_with_MIT_differences
(a table of all Kerberos symbols used in Samba4, and notes on where
they differ from those provided with MIT Kerberos)

Andrew Bartlett
2009-08-21 17:50:49 +10:00
Günther Deschner
f3c94f4b40 s4-spoolss: add stubs for new idl opcodes in spoolss server.
Guenther
2009-08-20 14:25:41 +02:00
Andrew Tridgell
a0df109d66 added basic support for rename in DRS replication
Added simple DRS rename support in replication. This should be done
async, and I'm not sure if we should also do any repl data updates to
indicate the rename. I'm still learning how this stuff works, but at
least this allows a rename on a DC to propogate correctly
2009-08-19 15:53:19 +10:00
Andrew Tridgell
e38f38fe48 we need the Deleted Objects container for replication
When objects are deleted they get renamed to this container. The
container needs to exist when we provision
2009-08-19 15:51:07 +10:00
Kai Blin
dd8d04f9fa s4 winbind: Quiet down the WINBINDD_DOMAIN_INFO handler stub warning 2009-08-18 21:48:41 +02:00
Kai Blin
b31f0de467 s4 winbind: Silence compile warning by adding new commands to the list 2009-08-18 20:26:10 +02:00
Kai Blin
7cafb65387 s4 winbind: Implement a stubbed out version of WINBINDD_DOMAIN_INFO 2009-08-18 20:26:10 +02:00
Kai Blin
f27bda63cd s4 ctags: Stop *_proto.h files from cluttering up the tags 2009-08-18 19:53:37 +02:00
Matthias Dieter Wallnöfer
61d4f8be60 s4: int32 handling: previous fix was not fully correct 2009-08-17 20:42:39 +02: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
Stefan Metzmacher
87737f8946 s4:librpc/rpc: fix DEBUG() message
metze
2009-08-18 11:58:18 +02:00
Andrew Tridgell
1b09e36f0b fixed make test reporting success when provision fails
We were getting build test 'pass' on the build farm when the provision
is failing. The cause was the use of filter pipelines in the selftest
code in the makefile. A bourne shell will by default report the error
status of the last element of the pipeline, which means when provision
failed, make thought everything had passed.

We could use the bash 'pipefail' option to fix this, but it isn't
portable, so instead I've modified the makefile to touch st/st_done
when the first element in the pipeline completes successfully. That
means we now get errors in make test, at the expense of making the
makefile even more horrible than it was.
2009-08-17 22:46:47 +10: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
Andrew Tridgell
3dee92fcb9 fixed the build
the changes from Matthias didn't take account of url and lp being None
in some ldb python instances in 'make test'
2009-08-17 21:40:19 +10:00
Matthias Dieter Wallnöfer
7a79d16183 s4: Major rework of the LDB/SAMDB/IDMAP python bindings
- Centralise the lookups for the default domain (root) in the call "domain_dn"
- Reduce the LDB connections attempts ("connect" calls) from three to one
  - tools should load faster
- Make the LDB connection init more like the "ldb_wrap_connection" call
- Load the right UTF8 casefolder which fixes up problems with special characters
  (discovered by me: e.g. small "Umlaute" (ä, ö, ü, ...) in the DN weren't upcased
  - so records "seemed" lost in TDB)
2009-08-17 11:58:40 +02:00
Matthias Dieter Wallnöfer
0a5ea25d21 s4:python tools - Centralise the lookups for the default domain (root) in the call "domain_dn" from SamDB 2009-08-17 11:58:39 +02:00
Matthias Dieter Wallnöfer
0a46fd630e s4:pyglue Add a wrapper for loading the correct UTF8 casefolder
Needed for special characters (e.g. in German "Umlaute")
2009-08-17 11:58:39 +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
Matthias Dieter Wallnöfer
36f828bafb Revert "s4:samdb python bindings - we don't need the attributes here"
This reverts commit 53ef426e6f.

As abartlet pointed out this causes to load all attributes and therefore gives
us more here than we need (only the check for the DN)!
2009-08-17 11:06:39 +02:00
Andrew Tridgell
87921bf694 sigh - still not right 2009-08-17 17:50:26 +10:00
Andrew Tridgell
52108a19a4 fixed up add_foreign again
my last patch was not even close ...

I'll leave abartlet to work out how to fix the test case
2009-08-17 17:48:27 +10:00
Andrew Tridgell
905db32885 more fixups from provision changes
Andrew, can you please check this? The idmap.setup_name_mapping tests
look totally out of place here. I'm also not sure I captured your
intention with the other changes
2009-08-17 17:35:36 +10:00
Stefan Metzmacher
3b3bde938c s4:build: require tevent 0.9.7 with tevent_req_cancel()
metze
2009-08-17 09:25:44 +02:00
Andrew Tridgell
26e114b83c skip the autoidl test
The autoidl test is not needed now that we have IDL source
available. It also generates a lot of errors in the logs.
2009-08-17 13:29:34 +10:00
Andrew Tridgell
f3e473ee72 fixed up some provision errors from the recent changes 2009-08-17 13:28:57 +10:00