1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00
Commit Graph

790 Commits

Author SHA1 Message Date
Andrew Tridgell
650dcda2a2 s4-rodc: s->schema need initialisation
this fixes a segfault in net rodc preload
2010-09-09 21:39:24 +10:00
Andrew Tridgell
e2fdcf1a7a pynet: fixed ref count error on Py_None
ensure we don't run out of None ...

Pair-Programmed-With: Jelmer Vernooij <jelmer@samba.org>
2010-09-02 13:37:07 +10:00
Andrew Tridgell
bdab6c36e8 s4-pynet: pynet depends on pyrpc_util 2010-08-27 04:41:40 +02:00
Jelmer Vernooij
64552e11dd pyrpc: Add py_check_dcerpc_type().
This function checks whether the type of a PyObject matches a
DCE/RPC Python type.

Pair-Programmed-With: Andrew Tridgell <tridge@samba.org>
2010-08-27 04:41:40 +02:00
Andrew Tridgell
aa54d239e2 s4-pynet: some systems don't have Py_TYPE()
we need a better method than this ....
2010-08-25 23:05:05 +10:00
Andrew Tridgell
4cacdf0002 s4-pynet: added replicate_init() and replicate_chunk() calls
these calls allow python code to pass chunks from DRS replication
calls into the code that applies the chunks to a database

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-08-25 08:40:04 +10:00
Andrew Tridgell
631c5f1fd5 s4-libnet: added libnet_vampire_replicate_init()
this is used to setup for later calls to the replicate chunk functions

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-08-25 08:40:04 +10:00
Andrew Tridgell
1337f5875c libnet-s4: added replicate() command in pynet
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-08-23 15:55:39 +10:00
Andrew Tridgell
bdc1639642 s4-libnet: split libnet_Vampire() into two parts
libnet_Replicate() will do just the replication portion of
libnet_Vampire(). This will be used by the RODC join, where the join
part of the operation happens in python, and behaves quite differently
to the libnet_Join() code.

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-08-23 15:55:39 +10:00
Andrew Tridgell
2d2a0cb582 s4-libnet: show the DN when DsAddEntry() fails
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-08-23 15:55:39 +10:00
Andrew Tridgell
8a442b0822 s4-libnet: added join type constants to python interface
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-08-23 15:55:39 +10:00
Matthias Dieter Wallnöfer
ab3e20b82f s4:libnet - free the "c" context also on error conditions
(and if it's NULL then "talloc_free" does ignore it)
2010-08-14 18:48:20 +02:00
Anatoliy Atanasov
bf5d88ec1c s4/vampire: update dNSHostName for the Server object 2010-08-03 11:15:21 +03:00
Andrew Tridgell
6b266b85cf s4-loadparm: 2nd half of lp_ to lpcfg_ conversion
this converts all callers that use the Samba4 loadparm lp_ calling
convention to use the lpcfg_ prefix.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2010-07-16 18:24:27 +10:00
Stefan Metzmacher
1ea4215e56 s4:libnet_GroupList: allocate children strings on the correct talloc parent
Otherwise the _recv() function won't move the children strings to the
callers memory context and let the callers crash.

metze
2010-07-10 09:35:02 +02:00
Stefan Metzmacher
35c554bef0 s4:libnet_UserList: allocate children strings on the correct talloc parent
Otherwise the _recv() function won't move the children strings to the
callers memory context and let the callers crash.

metze
2010-07-10 09:35:01 +02:00
Matthias Dieter Wallnöfer
b0bba4003e s4:libnet - add missing "talloc_free"s for "c" contexts on "recv" operations 2010-07-04 22:05:17 +02:00
Andrew Bartlett
9fc3f8194d s4:libnet_join Fix typo in msDS-SupportedEncryptionTypes 2010-06-29 16:59:30 +10:00
Matthias Dieter Wallnöfer
b172b7f467 s4:libnet_join.c - always use LDB constants 2010-06-24 10:04:48 +02:00
Andrew Bartlett
d0f52ddac2 s4:provision Raise default max functional level to 2008R2
We don't support many of the extra features, but that applies across many
other parts of AD.  Allow the admin to join a 2008R2 domain if he or she wants.

This also makes it possible to test 2008R2 domain code in 'make test'

Andrew Bartlett
2010-06-23 20:10:06 +10:00
Andrew Bartlett
ebc2da10cd s4:libnet When joining a domain, update msDS-SupportedEncryptionTypes
We need this for our DC to have clients use AES keys to us
2010-06-23 20:10:04 +10:00
Andrew Bartlett
c4482bf53e libds:common Remove DS_DC_* domain functionality flags
These are just a subset of the DS_DOMAIN_ functionality flags, are compared and often confused with each other.  Just make them one set.

Andrew Bartlett
2010-06-23 20:10:03 +10:00
Stefan Metzmacher
6dbcffb51d s4:lib: merge LDB_WRAP and LDBSAMBA and make LDBSAMBA a library.
This is needed to remove samba specifc symbols from the bundled
ldb, in order to get the ABI right.

metze

Signed-off-by: Andreas Schneider <asn@samba.org>
2010-06-16 14:07:28 +02:00
Andrew Bartlett
35237d5356 s4:libnet Remove 'ads min function level' checks.
We support Windows 2000 native now.

Andrew Bartlett
2010-06-16 09:57:52 +10:00
Andrew Bartlett
b5d80a225e s4:dsdb Rework the vampire schema handling to convert 3 times.
This seems like a lot of duplicate work, but by the end we should
have, in normal LDB format, the remote DRS schema, having bootstrapped
it with the locally loaded schema.

The multiple steps are to resolve the problems with references to
schema items that we don't 'yet' know about.

Andrew Bartlett

Signed-off-by: Kamen Mazdrashki <kamenim@samba.org>
2010-06-15 10:51:34 +10:00
Andrew Bartlett
7c60ac97bf s4:provision Allow a specific prefix map to be loaded into a new schema provision
This allows the prefixMap from a DRS server to be used when loading
the schema from the local files.  This helps us then import other
schema with this map in place.

Andrew Bartlett

Signed-off-by: Kamen Mazdrashki <kamenim@samba.org>
2010-06-15 10:51:34 +10:00
Andrew Bartlett
9e28ceda96 s4:dsdb Keep the DRS-based prefix map for use in provision-based schema
We need to use the remote prefix map for the provision schema, or else
we can't decode new, non-standard attributes into OIDs.  Then once we
decode that schema, we can try again and get them properly translated.

Andrew Bartlett

Signed-off-by: Kamen Mazdrashki <kamenim@samba.org>
2010-06-15 10:51:34 +10:00
Andrew Bartlett
5323485eb3 s4:dsdb Allow the setting an override on the schema
The change here is to try and convert a per the previous rules, but if
we don't know a particular OID as a attributeID, then store it as an
OID (for example).  This allows known values to be converted as
before, but still copes with unknown values.

Andrew Bartlett

Signed-off-by: Kamen Mazdrashki <kamenim@samba.org>
2010-06-15 10:51:34 +10:00
Andrew Bartlett
6a2f7fe04c s4:dsdb Use the schema from our local provision to decode the schema
This works on the assumption that the schema partition can only
contain schema objects.

We may need to pass down some kind of 'relax' to the DRS -> LDB
conversion code, so that it allows incomplete conversions, so that we
don't fail if a new attribute is present, and we can't decode it.
This would then be resolved the second time we do the conversion.

Andrew Bartlett

Signed-off-by: Kamen Mazdrashki <kamenim@samba.org>
2010-06-15 10:51:34 +10:00
Andrew Bartlett
c313590547 s4:libnet Steal ldb and lp_ctx from python result into correct structures.
Signed-off-by: Kamen Mazdrashki <kamenim@samba.org>
2010-06-15 10:51:34 +10:00
Andrew Bartlett
1104b41f1e s4:libnet Make the libnet_vampire default callbacks non-static
These are intended to be called from the NET-API-BECOMEDC torture test
to avoid duplication of code.

Andrew Bartlett

Signed-off-by: Kamen Mazdrashki <kamenim@samba.org>
2010-06-15 10:51:34 +10:00
Andrew Bartlett
72486a6dd1 s4:dsdb Add debug 2010-06-12 11:19:13 +10:00
Stefan Metzmacher
625ffba8ec s4:libnet: use the new generated config from the provision for the self_join
This fixes net vampire with the --target-dir option.

metze
2010-05-22 08:41:18 +02:00
Jelmer Vernooij
f9ca9e46ad Finish removal of iconv_convenience in public API's. 2010-05-18 11:45:30 +02:00
Andrew Bartlett
6324a0f59f s4:provision Remove unused 'account_name' parameter
The python glue code didn't even de-reference this element in the
structure.

Andrew Bartlett
2010-05-18 13:20:18 +10:00
Jelmer Vernooij
f7f1a3a451 pynet: Remove unused credentials argument. 2010-05-18 01:40:19 +02:00
Andrew Bartlett
084c8065f8 s4:libnet Make 'net vampire' more robust to command line arguments
When we have just joined a domain, we know a bit about that domain.
Use these to override previous guesses as to what domain and realm to
use for the rest of the join.

Andrew Bartlett
2010-04-29 19:44:16 +10:00
Matthias Dieter Wallnöfer
eceffe6909 nbt: samlogon/netlogon structures - unify denominations 2010-04-27 18:45:41 +02:00
Andrew Tridgell
280d06f8b5 s4-libnet: cope with an empty client site name from CLDAP
We fall back to the server site name in a vampire

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-04-27 15:24:44 +10:00
Andrew Tridgell
4679bb731b s4-vampire: show main CLDAP response attributes during vampire 2010-04-27 15:24:40 +10:00
Andrew Tridgell
47712ab3dd s4-libnet: fixed two compiler warnings 2010-04-22 19:36:16 +10:00
Andrew Tridgell
7ccebb49af s4-pynet: accept None for target_dir in vampire 2010-04-21 13:35:55 +10:00
Andrew Tridgell
f1c523939b pytalloc: ensure talloc_ctx is directly after PyObject_HEAD
the talloc python interface for tp_alloc and tp_dealloc relies on a
cast to a py_talloc_Object to find the talloc_ctx (see
py_talloc_dealloc). This means we rely on the talloc_ctx for the
object being directly after the PyObject_HEAD

This fixes the talloc free with references bug in samba_dnsupdate

The actual problem was the tp_alloc() call in
PyCredentialCacheContainer_from_ccache_container() which used a cast
from a py_talloc_Object to a PyCredentialCacheContainerObject. That
case effectively changed the parent/child relationship between the
talloc_ctx and the ccc ptr.

This patch changes all the structures that follow this pattern to put
the TALLOC_CTX directly after the PyObject_HEAD, to ensure that if
anyone else decides to do a dangerous cast like this that it won't
cause the same sort of subtle breakage.

Pair-Programmed-With: Rusty Russell <rusty@samba.org>
2010-04-20 15:50:27 +10:00
Andrew Tridgell
e6cbbd9640 s4-python: PyErr_SetString() will crash on NULL strings
use nt_errstr() when no error available
2010-04-19 16:34:14 +10:00
Stefan Metzmacher
3f8e9b919d s4:libnet_passwd: check for NT_STATUS_RPC_ENUM_VALUE_OUT_OF_RANGE for SetPassword
metze
2010-04-15 17:32:31 +02:00
Stefan Metzmacher
2570f8dcda s4:libnet_passwd: check for NT_STATUS_RPC_PROCNUM_OUT_OF_RANGE in the ChangePassword calls
metze
2010-04-15 17:32:31 +02:00
Stefan Metzmacher
b2261c8272 s4:libnet_rpc: check for NT_STATUS_RPC_PROCNUM_OUT_OF_RANGE instead of NT_STATUS_NET_WRITE_FAULT
metze
2010-04-15 17:32:30 +02:00
Stefan Metzmacher
146ce6ead1 s4:libnet/libnet_join: don't look at p->last_fault_code for debugging anymore
metze
2010-04-15 09:34:02 +02:00
Matthias Dieter Wallnöfer
ad9e407357 Revert "s4:prefer "samdb_*_dn" basedn calls over the "ldb_get_*_dn" functions"
We should use the "ldb_get_*_basedn" calls since they are available in the LDB
library.
2010-04-13 08:55:15 +02:00
Kamen Mazdrashki
a9e4abaa6e s4/libnet: Allocate mem in supplied mem_ctx
In this case, 'libnet_Vampire *r' may not be a pointer to
a talloced memory.
2010-04-12 04:20:36 +03:00