summaryrefslogtreecommitdiff
path: root/source4/librpc
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2011-08-26 13:23:41 +1000
committerAndrew Bartlett <abartlet@samba.org>2011-09-13 15:38:02 +1000
commit8c33036a374b6f61677965dbb357d6ae7216cbfb (patch)
tree690c282f32fee564c89f9eeea0a7feb71905f63c /source4/librpc
parent60150323be045bf6612fcde18eaea5bbc0d2e818 (diff)
downloadsamba-8c33036a374b6f61677965dbb357d6ae7216cbfb.tar.gz
samba-8c33036a374b6f61677965dbb357d6ae7216cbfb.tar.bz2
samba-8c33036a374b6f61677965dbb357d6ae7216cbfb.zip
s4-subdomain more work on sub-domain join
we can now create a subdomain of an existing windows domain using: samba-tool domain join sub.domain.dns.name subdomain The ordering of the creation of the key records is quite tricky, especially for the NTDSDSA object Pair-Programmed-With: Andrew Tridgell <tridge@samba.org>
Diffstat (limited to 'source4/librpc')
-rw-r--r--source4/librpc/rpc/pyrpc.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/source4/librpc/rpc/pyrpc.c b/source4/librpc/rpc/pyrpc.c
index 2d6e1f6c61..7aa5ff5868 100644
--- a/source4/librpc/rpc/pyrpc.c
+++ b/source4/librpc/rpc/pyrpc.c
@@ -117,6 +117,17 @@ static PyObject *py_iface_transfer_syntax(PyObject *obj, void *closure)
return py_ndr_syntax_id(&iface->pipe->transfer_syntax);
}
+static PyObject *py_iface_session_key(PyObject *obj, void *closure)
+{
+ dcerpc_InterfaceObject *iface = (dcerpc_InterfaceObject *)obj;
+ DATA_BLOB session_key;
+
+ NTSTATUS status = dcerpc_fetch_session_key(iface->pipe, &session_key);
+ PyErr_NTSTATUS_IS_ERR_RAISE(status);
+
+ return PyString_FromStringAndSize((const char *)session_key.data, session_key.length);
+}
+
static PyGetSetDef dcerpc_interface_getsetters[] = {
{ discard_const_p(char, "server_name"), py_iface_server_name, NULL,
discard_const_p(char, "name of the server, if connected over SMB") },
@@ -124,6 +135,8 @@ static PyGetSetDef dcerpc_interface_getsetters[] = {
discard_const_p(char, "syntax id of the abstract syntax") },
{ discard_const_p(char, "transfer_syntax"), py_iface_transfer_syntax, NULL,
discard_const_p(char, "syntax id of the transfersyntax") },
+ { discard_const_p(char, "session_key"), py_iface_session_key, NULL,
+ discard_const_p(char, "session key (as used for blob encryption on LSA and SAMR)") },
{ NULL }
};