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
Kamen Mazdrashki
82b8bbdfac
s4/py_net: Source code formatting fix
2010-04-12 04:20:35 +03:00
Kamen Mazdrashki
a62d0419de
s4/libnet: handle errors returned for DsAddEntry_v3 properly
...
It turns out ms-docs are little bit misleading - in case of
no error, r->out.ctr->ctr3.err_data is not NULL, but
error information (r->out.ctr->ctr3.err_data->v1.info) is NULL!
2010-04-12 01:50:39 +03:00
Kamen Mazdrashki
cb0ad42a3d
s4/libnet: Add few new lines in the debug log so it is readable again
2010-04-12 01:50:39 +03:00
Kamen Mazdrashki
9f92d586ca
s4/libnet: Dump DRSUAPI_DIRERR_OK as unexpected
...
Actually DRSUAPI_DIRERR_OK is not valid error to be returned.
I introduce it in the IDL so that I can use it in enum.
So it should be dumped as Unexpected error code
2010-04-12 01:50:39 +03:00
Jelmer Vernooij
f83aa13f62
s4-net: Convert vampire command over to Python.
2010-04-09 11:53:00 +02:00
Jelmer Vernooij
ffa73c412e
s4-net: Convert user subcommand to Python.
2010-04-09 11:53:00 +02:00
Jelmer Vernooij
0c6f434b7b
net: Convert time command to python.
2010-04-08 23:22:55 +02:00
Jelmer Vernooij
6510b2cdd2
s4-net: Use new Net() object in net export keytab.
2010-04-08 23:22:55 +02:00
Jelmer Vernooij
814e20e7da
pynet: Create a net class.
2010-04-08 23:22:55 +02:00
Jelmer Vernooij
cf17d48dec
Migrate 'net export keytab' to python.
2010-04-08 22:37:35 +02:00
Andrew Tridgell
b690fedef5
s4-waf: removed the AUTOGENERATED markers
...
we won't be using the mk -> wscript generator again
2010-04-06 20:27:16 +10:00
Andrew Tridgell
f9eae32f4b
s4-waf: mark the wscript files as python so vim/emacs knows how to highlight them
2010-04-06 20:27:11 +10:00
Andrew Tridgell
2974f8d947
build: fixed libcli/ndr_netlogon.c dependency rules
2010-04-06 20:26:59 +10:00
Andrew Tridgell
845e0cbe6f
build: commit all the waf build files in the tree
2010-04-06 20:26:48 +10:00
Stefan Metzmacher
733701ae9b
s4:libnet/libnet_passwd.c: add explicit check for NTSTATUS r.out.result
...
metze
2010-03-29 15:35:52 +02:00
Stefan Metzmacher
cd3ae926e7
s4:libnet/libnet_samsync.c: add explicit check for NTSTATUS r.out.result
...
metze
2010-03-29 15:35:52 +02:00
Stefan Metzmacher
d0efef3f86
s4:libnet/libnet_join.c: add explicit check for NTSTATUS r.out.result
...
metze
2010-03-29 15:35:51 +02:00
Kamen Mazdrashki
db02ca65a0
s4/drs: Implement DsAddEntry V3 error handling
2010-03-24 17:34:42 +02:00
Kamen Mazdrashki
04f4ea6ae2
s4/drs: Refactor error handling for DsAddEntry V3 replies
...
Dumping for specific error classes are to be implemented properly
in the near future.
2010-03-24 17:34:39 +02:00
Kamen Mazdrashki
00fce797e8
s4/drs: drsuapi_DsAddEntry_ErrData propagate structure def in source code
2010-03-24 17:34:37 +02:00
Kamen Mazdrashki
427a1f3c62
s4/drs: DsAddEntry - extending error handling for V2 replies
...
After having more complete definition for DsAddEntryReply V2
structure, we can now handle error state in more robust way,
not just counting on number of objects returned.
2010-03-24 17:34:35 +02:00
Kamen Mazdrashki
58ddf31ad1
s4/drs: drsuapi_DsAddEntryErrorInfoX changes propagated to source code
2010-03-24 17:34:34 +02:00
Kamen Mazdrashki
05db9365b6
s4/drs: DsAddEntry - Propagating unsigned switches to source code
2010-03-24 17:34:31 +02:00
Stefan Metzmacher
48cd096126
s4:libnet: don't include librpc/rpc/dcerpc.h directly
...
metze
2010-03-23 18:44:32 +01:00
Andrew Bartlett
2de07761e0
s4:dsdb Change dsdb_get_schema() callers to use new talloc argument
...
This choses an appropriate talloc context to attach the schema too,
long enough lived to ensure it does not go away before the operation
compleates.
Andrew Bartlett
2010-03-16 19:26:03 +11:00
Stefan Metzmacher
9e0557a149
s4:libnet/libnet_time.c: make use of dcerpc_binding_handle stubs
...
metze
2010-03-12 15:25:52 +01:00
Stefan Metzmacher
07a28b1923
s4:libnet/libnet_share.c: make use of dcerpc_binding_handle stubs
...
metze
2010-03-12 15:25:52 +01:00
Stefan Metzmacher
02c61f520c
s4:libnet/libnet_samsync.c: make use of dcerpc_binding_handle stubs
...
metze
2010-03-12 15:25:51 +01:00
Stefan Metzmacher
19d229a11b
s4:libnet/libnet_passwd.c: make use of dcerpc_binding_handle stubs
...
metze
2010-03-12 15:25:51 +01:00
Stefan Metzmacher
bec3d8e7ae
s4:libnet/libnet_join.c: make use of dcerpc_binding_handle stubs
...
metze
2010-03-12 15:25:51 +01:00
Stefan Metzmacher
a011cbccb7
s4:libnet/libnet_rpc.c: make use of use tevent_req based dcerpc_binding_handle stubs
...
metze
2010-03-12 15:25:45 +01:00
Stefan Metzmacher
c190ae1631
s4:libnet/usernam.c: make use of use tevent_req based dcerpc_binding_handle stubs
...
metze
2010-03-12 15:25:44 +01:00
Stefan Metzmacher
a8967c378c
s4:libnet/userinfo.c: make use of use tevent_req based dcerpc_binding_handle stubs
...
metze
2010-03-12 15:25:44 +01:00
Stefan Metzmacher
ccc0ab6811
s4:libnet/libnet_user.c: make use of use tevent_req based dcerpc_binding_handle stubs
...
metze
2010-03-12 15:25:44 +01:00
Stefan Metzmacher
c148405a12
s4:libnet/libnet_lookup.c: make use of use tevent_req based dcerpc_binding_handle stubs
...
metze
2010-03-12 15:25:44 +01:00
Stefan Metzmacher
eae3436320
s4:libnet/libnet_group.c: make use of use tevent_req based dcerpc_binding_handle stubs
...
metze
2010-03-12 15:25:43 +01:00
Stefan Metzmacher
3d72524ab4
s4:libnet/libnet_domain.c: make use of use tevent_req based dcerpc_binding_handle stubs
...
metze
2010-03-12 15:25:43 +01:00
Stefan Metzmacher
f0a394315d
s4:libnet_unbecome_dc: make use of use tevent_req based dcerpc_binding_handle stubs
...
metze
2010-03-12 15:25:43 +01:00
Stefan Metzmacher
2c5bbea8cb
s4:libnet_become_dc: make use of use tevent_req based dcerpc_binding_handle stubs
...
metze
2010-03-12 15:25:42 +01:00
Stefan Metzmacher
8dc4fd921b
s4:libnet/group*: make use of tevent_req based dcerpc_binding_handle stubs
...
metze
2010-03-12 15:25:42 +01:00
Stefan Metzmacher
a3ae9802d4
s4:libnet: keep a dcerpc_binding_handle for samr and lsa
...
metze
2010-03-12 15:25:42 +01:00