Andrew Bartlett
b299409410
netapi: Move DC check to NetJoinDomain() where it is needed.
...
This partially reverts 15f6e27bd5a9065c8b781fa21f5989ce2c355776.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=10891
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
2014-12-11 19:14:06 +01:00
Stefan Metzmacher
18c19d51d1
s3:lib/netapi: fix some incompatible pointer type warnings in NetGetJoinableOUs_l()
...
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2014-04-02 09:03:42 +02:00
Günther Deschner
77f7f2a976
s3-libnetapi: pass down ndr_interface_table to libnetapi_open_pipe().
...
Guenther
Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2013-08-05 10:29:59 +02:00
Günther Deschner
5779460f3f
s3-netapi: fix memoryleak while not using talloc_tos() in cli_get_session_key() usage.
...
Thanks Volker!
Guenther
Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Fri Mar 25 18:21:18 CET 2011 on sn-devel-104
2011-03-25 18:21:18 +01:00
Günther Deschner
63bb64d531
s3-netapi: use cli_get_session_key() in netapi.
...
Guenther
2011-03-24 23:08:22 +01:00
Günther Deschner
c53e7f8d58
s3-build: use HAVE_ADS define in some more places.
...
Guenther
2011-03-19 00:11:18 +01:00
Andreas Schneider
bf18403c81
s3-rpc_client: Move client pipe functions to own header.
2011-02-28 18:15:04 +01:00
Günther Deschner
415a390ba8
s3-libnetapi: add missing error check after switchting to dcerpc_wkssvc_X functions.
...
Guenther
2011-01-12 13:32:10 +01:00
Günther Deschner
4920390913
s3-wkssvc: prefer dcerpc_wkssvc_X functions.
...
Guenther
2011-01-11 17:09:25 +01:00
Volker Lendecke
13756d0e80
s3: Attempt to fix bug 7665
...
Quite a few of our internal routines put stuff on talloc_tos() these days.
In top-level netapi routines, properly allocate a stackframe and clean it
again. Also, don't leak memory in the rpccli_ callers onto the libnetapi
context.
2010-10-02 12:02:02 +02:00
Günther Deschner
ffdfcfb514
s3-dsgetdcname: always pass in messaging context.
...
Volker, please check.
Guenther
2010-09-23 10:26:25 -07:00
Günther Deschner
0f8e032628
s3-netlogon: remove global include of netlogon.h.
...
This reduces precompiled headers by another 4 MB and also slightly speeds up the
build.
Guenther
2010-08-06 15:46:16 +02:00
Günther Deschner
c136b84f0d
s3-secrets: only include secrets.h when needed.
...
Guenther
2010-08-05 10:12:25 +02:00
Günther Deschner
e7a6a3ec0d
s3: avoid global include of ads.h.
...
Guenther
2010-08-05 00:32:02 +02:00
Günther Deschner
80b47fcb0a
s3-libnet: better separate headers.
...
Guenther
2010-07-13 22:40:46 +02:00
Günther Deschner
3d679a3b5f
s3-rpc: Avoid including every pipe's client and server stubs everywhere in samba.
...
Guenther
2009-11-26 20:03:17 +01:00
Volker Lendecke
6a650d7d16
Revert "s3: Make libnetapi_open_pipe take strings instead of a ndr_interface_table"
...
This reverts commit 5fc9d93408effe75abcd231c45cbc14656692ebe.
2009-11-08 19:43:46 +01:00
Volker Lendecke
5fc9d93408
s3: Make libnetapi_open_pipe take strings instead of a ndr_interface_table
2009-11-08 13:12:16 +01:00
Jim McDonough
7930f15f5d
Don't require "Modify property" perms to unjoin bug #6481 )
...
"net ads leave" stopped working when "modify properties"
permissions were not granted (meaning you had to be allowed
to disable the account that you were about to delete).
Libnetapi should not delete machine accounts, as this does not
happen on win32. The WKSSVC_JOIN_FLAGS_ACCOUNT_DELETE flag
really means "disable" (both in practice and docs).
However, to keep the functionality in "net ads leave", we
will still try to do the delete. If this fails, we try
to do the disable.
Additionally, it is possible in windows to not disable or
delete the account, but just tell the local machine that it
is no longer in the account. libnet can now do this as well.
2009-06-19 13:46:07 -04:00
Andrew Bartlett
27815a71a9
More work to adapt to merged libcli/auth function prototypes
2009-04-14 16:23:42 +10:00
Volker Lendecke
a9542ddcb7
libnetapi_open_pipe does not need to return cli_state
...
The user session key is also available in rpccli->auth->user_session_key
Guenther, please check!
Thanks,
Volker
2009-01-18 20:10:06 +01:00
Günther Deschner
8cb544e2a1
netapi: implement NetRenameMachineInDomain_r.
...
Guenther
(This used to be commit 39a42380ca3fac92eb27bded90ab06f7760937b9)
2008-09-05 13:13:44 +02:00
Günther Deschner
c8334dc708
netapi: add skeleton for NetRenameMachineInDomain.
...
Guenther
(This used to be commit 03a7f7f33370d65493a81ccead2038ee3ab291d0)
2008-09-05 13:13:29 +02:00
Günther Deschner
71196cf6ad
netapi: fix NetGetJoinableOUs_r: do not tear down connection.
...
Guenther
(This used to be commit 14c2688f2d37105ad129d26d13930177fe5c585f)
2008-09-05 12:58:05 +02:00
Günther Deschner
c5a9348f19
netapi: fix NetGetJoinableOUs_l.
...
It needs to try the dns domain name for the
ads connection.
Guenther
(This used to be commit 918eae8221bb8c24084cad96556e4d8c3685e314)
2008-08-29 13:58:06 +02:00
Günther Deschner
fcd10d26a4
netapi: make libnetapi_open_ipc_connection static.
...
Guenther
(cherry picked from commit 0259914f8ff04514a8395d8e1af61aadd50c5efb)
(This used to be commit 7edc671cc1007ae216e7efdbcdb9cfa1e547dca5)
2008-08-14 12:22:11 +02:00
Volker Lendecke
798b56edae
Refactoring: libnetapi_open_pipe takes an interface instead of pipe_idx
...
(This used to be commit 726e56c72fdb685ab5eddefd2fd8b043dc38d6ad)
2008-07-21 14:36:27 +02:00
Günther Deschner
18c9e75218
libads: use ads_connect_user_creds in some places.
...
Guenther
(This used to be commit ebf31203e7cf22e32b986c536279688b17a65d22)
2008-06-24 23:37:58 +02:00
Günther Deschner
67c644aa59
dsgetdcname: use existing messaging_context if possible.
...
Guenther
(This used to be commit 7889516a384c155a9045aad4409c041fddd0d98d)
2008-05-09 14:59:20 +02:00
Günther Deschner
f11acf3582
Use strip_hostname after dsgetdcname/getdcname calls.
...
Guenther
(This used to be commit 82cbb3269b2e764c9c2a2fbcbe9c29feae07fb62)
2008-05-09 14:59:19 +02:00
Günther Deschner
1223574c7b
netapi: fix returned name buffer in NetGetJoinInformation_r().
...
Guenther
(This used to be commit 0e8e05d556a7f84e500cca3fa858f9b4a9522a5f)
2008-04-29 20:22:01 +02:00
Günther Deschner
ef6ed54765
Use libnetapi_open_pipe in netapi functions.
...
Guenther
(This used to be commit 5804d8b112e1da022988c635284eb4799974d4c7)
2008-04-10 22:44:00 +02:00
Günther Deschner
aeb7f7db40
Use libnetapi_open_ipc_connection in libnetapi.
...
Guenther
(This used to be commit d9f19fc61586d606393368799dee9757c169d602)
2008-04-10 22:04:04 +02:00
Günther Deschner
8ab9696bfb
Split out private headers in libnetapi.
...
Guenther
(This used to be commit dd6251d51472a96bfc5ba3d62ea788c8924d4c6b)
2008-04-10 21:52:03 +02:00
Günther Deschner
af19343df8
Try to use kerberos in libnetapi.
...
Guenther
(This used to be commit 9cfce2229508c2145c3527074ac76520544e5d25)
2008-04-08 19:42:26 +02:00
Günther Deschner
ba35a8c8dd
Restructure inner workings of libnetapi a bit.
...
Guenther
(This used to be commit a4e3bc2bade8bf74696e1c6ced74da563ff2df7b)
2008-04-08 03:08:49 +02:00
Günther Deschner
6c1c07bde3
Make sure to hand down the domain name in libnetapi NetUnjoinDomain.
...
Guenther
(This used to be commit 0058ab30de943f134792e3d66051206086987110)
2008-04-02 11:14:15 +02:00
Günther Deschner
5259a7a808
Enable libnetjoin debugging for now but avoid printing passwords.
...
The gen_ndr needs proper fixing still.
Guenther
(This used to be commit 966d7244d7765d285a7026b97e6093fd1f8d83ce)
2008-03-07 18:31:13 +01:00
Günther Deschner
0d8985f2da
Let dsgetdcname() return a struct netr_DsRGetDCNameInfo.
...
Guenther
(This used to be commit b1a4b21f8c35dc23e5c986ebe44d3806055eb39b)
2008-02-28 12:40:55 +01:00
Günther Deschner
5ab43ae0d8
Eliminate remote tree of dsgetdcname (which will happen in libnetapi then).
...
Guenther
(This used to be commit fd490d236b1fb73a75c457b75128c9b98719418f)
2008-01-29 15:09:56 +01:00
Günther Deschner
db40120c73
Fix the build w/o ADS.
...
Guenther
(This used to be commit 645f2376d40fabdc787902ac7506ad7234616619)
2008-01-18 08:50:33 +01:00
Günther Deschner
b18fd380bd
Add NetGetJoinableOUs() to libnetapi (incl. example).
...
Guenther
(This used to be commit 8858e403e1940c362d307b4d4125f977abb0b96a)
2008-01-18 02:55:19 +01:00
Günther Deschner
b1424846c6
Cosmetics and error string reporting for libnetapi.
...
Guenther
(This used to be commit 4ca33928512bd71268bafd41d2b608e814a7295f)
2008-01-18 02:55:10 +01:00
Günther Deschner
c79ce2ffa3
As long as DsGetDcName is not part of libnetapi, lowercase the fn name.
...
Guenther
(This used to be commit 19a980f52044a170618629e5b0484c1f6b586e5f)
2008-01-11 15:32:20 +01:00
Günther Deschner
200bba3ad6
Make name_buffer in NetGetJoinInformation() talloced.
...
Guenther
(This used to be commit 421905fb608df6736944ac21ac67abee24991521)
2008-01-08 11:59:01 +01:00
Günther Deschner
d6659f8ac8
In the local path of NetJoinDomain, try to get error string from libnetjoin.
...
Guenther
(This used to be commit 0f0f0e13022da584b77e850fec2cef6169e1ac28)
2008-01-07 20:13:26 +01:00
Günther Deschner
528d253cc8
Rearrange order of libnet join context init.
...
Guenther
(This used to be commit 89669c66f27fb47c9769d1058e29bff83f862752)
2008-01-07 19:38:35 +01:00
Günther Deschner
0b92d8bc79
Free libnet_JoinCtx after joining.
...
Guenther
(This used to be commit 5abae9ef15fa9884c5c4a0e256274f70f6ecd779)
2008-01-07 19:38:22 +01:00
Günther Deschner
395c366237
Do not pass emtpy wkssvc_PasswordBuffers to rpc functions.
...
Guenther
(This used to be commit fe75e5ccdfc2609380367e59215637b0de1ef241)
2008-01-04 23:03:55 +01:00
Günther Deschner
28ef4878d9
Rename server_name to dc_name in libnet join structures.
...
Guenther
(This used to be commit ff5e15b1ba0d5c39ceef9f9995c107e510162564)
2008-01-04 17:43:15 +01:00