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

63 Commits

Author SHA1 Message Date
Andrew Bartlett
80171ddcff samba-tool: Remove vampire subcommand and now unused libnet_Vampire()
This has been deprecated for a long time now

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
2015-10-26 05:11:21 +01:00
Stefan Metzmacher
450dc02d6d s4:py_net: make domain and address fully optional to py_net_finddc
E.g. address=None is now also possible.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2015-03-12 17:13:43 +01:00
Jelmer Vernooij
08ca688d4e py_net: Fix typo in change_password docstring, and indentation in
set_password docstring.

Change-Id: I93e9ed79ee43233fc3c1bb69d8eb0a5c6e0e3940
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2014-10-14 06:44:06 +02:00
Andrew Bartlett
a623359fb8 python/drs: Ensure to pass in the local invocationID during the domain join
This ensures (and asserts) that we never write an all-zero GUID as an invocationID
to the database in replPropertyMetaData.

Andrew Bartlett

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-09-19 12:25:41 -07:00
Alexander Bokovoy
bcc16f1911 s4-libnet: split export_keytab in a separate python module to avoid pulling in HDB dependency
Signed-off-by: Andreas Schneider <asn@samba.org>

Autobuild-User: Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date: Thu Apr 12 15:23:19 CEST 2012 on sn-devel-104
2012-04-12 15:23:19 +02:00
Stefan Metzmacher
f8fbc4163b s4:py_net: add optional 'machinepass' parameter to py_net_join_member()
metze
2011-11-29 09:21:25 +01:00
Stefan Metzmacher
677f5246f1 s4:libnet/py_net: ZERO_STRUCT() struct libnet_Join_member in py_net_join_member()
metze
2011-11-29 09:21:25 +01:00
Andrew Bartlett
2bff209128 s4-samba-tool: Add --principal argument to samba-tool domain exportkeytab
This allows only a particular principal to be exported to the keytab.
This is useful when setting up unix servers in a Samba controlled
domain.

Based on a request by Gémes Géza <geza@kzsdabas.hu>

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Tue Nov 29 09:20:55 CET 2011 on sn-devel-104
2011-11-29 09:20:54 +01:00
Matthias Dieter Wallnöfer
179bf9b51c s4:libnet/py_net.c: "py_net_finddc" - add an "address" parameter
This is useful for a new "samba-tool domain info" command.

Patch inspired by Matthieu Patou.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-11-26 10:34:58 +01:00
Matthias Dieter Wallnöfer
dec1435a42 s4:libnet/py_net.c - initialise optional keyword arguments
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-11-26 10:32:59 +01:00
Stefan Metzmacher
236e6fecda s4:libnet: initialize forest structure in py_net_replicate_init()
metze
2011-11-15 09:46:25 +01:00
Matthias Dieter Wallnöfer
b759dc9f39 s4:libnet/py_net.c - fix up includes (in order to find all "struct"s)
Reviewed-by: Jelmer
2011-09-19 16:31:07 +02:00
Andrew Tridgell
085936926a s4-libnet: fixed forest DNS name
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-08-25 07:39:39 +10:00
Stefan Metzmacher
47fcbd71ae s4:libnet: passdown the DsGetNCChangesReq* to the libnet_BecomeDC_StoreChunk handler
metze

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-08-12 12:39:05 +02:00
Jelmer Vernooij
f8ec7f6cb1 pytalloc: Use consistent prefix for functions, add ABI file. 2011-08-10 15:36:21 +02:00
Stefan Metzmacher
5d68c4eb44 s4:py_net: PyArg_ParseTuple("i") requires an 'int' argument
If we pass variable references we don't get implicit casting!

metze
2011-08-08 16:45:27 +02:00
Jelmer Vernooij
fdff105854 pyldb: Consistently use pyldb_ prefix. 2011-08-07 17:08:56 +02:00
Andrew Bartlett
35b309fa0c gensec: clarify memory ownership for gensec_session_info() and gensec_session_key()
This is slightly less efficient, because we no longer keep a cache on
the gensec structures, but much clearer in terms of memory ownership.
Both gensec_session_info() and gensec_session_key() now take a mem_ctx
and put the result only on that context.

Some duplication of memory in the callers (who were rightly uncertain
about who was the rightful owner of the returned memory) has been
removed to compensate for the internal copy.

Andrew Bartlett
2011-08-03 18:48:02 +10:00
Amitay Isaacs
9c370846ae s4-libnet: py_net Add change_password() python command
Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-28 15:20:53 +10:00
Amitay Isaacs
05ff244cc0 s4-libnet: py_net - Remove parsing for credentials argument
py_creds are not used anywhere in the function.

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-28 15:20:53 +10:00
Andrew Bartlett
c6cc22adc0 s4-libnet: Remove libnet_Join and create libnet_Join_member
libnet_Join conflicts with a function in the source3 netapi of the
same name, and the ability to join as a DC via this particular method
is unused.

Andrew Bartlett
2011-05-18 16:12:08 +02:00
Jelmer Vernooij
8bf5356958 s4-python: Add missing prototypes. 2011-01-03 01:48:04 +01:00
Jelmer Vernooij
4350e0c3c9 s4-python: Properly call PyObject_Del from all destructors. 2011-01-01 02:54:05 +01:00
Matthias Dieter Wallnöfer
e4b22702b6 ldb:pyldb.h - revert to the previous header behaviour
"ldb_private.h" is private and therefore might not always be available.
2010-12-12 22:55:14 +01:00
Matthias Dieter Wallnöfer
34c5bdc1c3 s4:libcli/finddc.h - fix header dependancies
And optimise includes
2010-12-12 20:06:24 +01:00
Matthias Dieter Wallnöfer
f9b87352f4 s4:libnet/py_net.c - add checks for OOM conditions 2010-12-12 20:06:24 +01:00
Andrew Tridgell
3d7a4cf5b6 s4-pynet: added server keyword to Net() initialisation
this sets up server_address in the libnet context

Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>
2010-09-25 10:38:45 -07:00
Andrew Tridgell
2edbf74f35 s4-pynet: return the full netlogon response from python finddc
this gives the caller the other server parameters

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-09-16 07:24:01 +10:00
Andrew Tridgell
e18c0030e0 s4-pyjoin: fill in the dns name in the python replication method
this is needed to get the repsFrom DNS entry right

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-09-16 07:24:01 +10:00
Andrew Tridgell
59d415f43f s4-finddc: use NBT lookup for a 1C name if joining a short domain name
once we get the 1C lookup reply, use a CLDAP query to find the details
for the server

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-09-15 15:39:36 +10:00
Andrew Tridgell
2e92484c60 s4-pynet: added finddc call
this gives access to the CLDAP/DNS finddc code from python

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-09-15 15:39:35 +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
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
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
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
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
Jelmer Vernooij
f7f1a3a451 pynet: Remove unused credentials argument. 2010-05-18 01:40:19 +02: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
Kamen Mazdrashki
82b8bbdfac s4/py_net: Source code formatting fix 2010-04-12 04:20:35 +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
Jelmer Vernooij
ef453c63af py_net/libnet: Remove C++-style comments, add more error checking, move
initialization of dcerpc subsystem to libnet.
2009-12-25 14:48:45 +01:00