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

87 Commits

Author SHA1 Message Date
Stefan Metzmacher
11f3c852c7 s4:libnet_rpc: avoid reusing the assoc_group_id of the lsa connection
This was an unexpected side effect introduced in commit
1b17d9a587.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu Mar 11 22:50:02 UTC 2021 on sn-devel-184
2021-03-11 22:50:02 +00:00
Stefan Metzmacher
07b1e375e5 s4:libnet: make use of dcerpc_secondary_auth_connection_send/recv()
This avoid the bogus usage of dcerpc_pipe_auth().

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2015-07-07 14:05:28 +02:00
Stefan Metzmacher
f65c1f0e2f s4:librpc: use authenticated epmapping for ncacn_http
We need to authenticate against the RpcProxy.
In future we could have a way to specify alternative credentials
for the RpcProxy and HttpProxy.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>

Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Tue Sep 23 01:34:05 CEST 2014 on sn-devel-104
2014-09-23 01:34:05 +02:00
Stefan Metzmacher
776f5c65bf s4:libnet: use helper functions to access dcerpc_binding->target_hostname
If possible also specify the already known address as dcerpc_binding->host.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2014-02-13 11:54:16 +01:00
Stefan Metzmacher
cd0981b2d8 s4:libnet: make use of dcerpc_binding_set_flags()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2014-02-13 11:54:16 +01:00
Stefan Metzmacher
de8e013bec s4:libnet: make use of dcerpc_binding_get_*() in libnet_rpc.c
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2014-02-13 11:54:16 +01:00
Stefan Metzmacher
47fa7c83a2 s4:libnet: use dcerpc_binding_dup() in continue_epm_map_binding_send()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2014-02-11 16:20:32 +01:00
Stefan Metzmacher
6e5943af94 s4:libnet: avoid using dcecli_connection->event_ctx
We should avoid per connection tevent_contexts,
the one per libnet_context isn't much better, but a start.

Note the pointers have the same value.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2014-01-16 16:22:51 +01:00
Stefan Metzmacher
c477850467 s4:libnet: keep a dcerpc_binding_handle for samr and lsa
This completes commit a3ae9802d4.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2014-01-16 16:22:51 +01:00
Andreas Schneider
af18339e03 s4-libnet: Don't call talloc_get_type() for the same struct twice.
Found by Coverity.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
2012-12-12 15:00:02 +01:00
Andreas Schneider
0b93587b7e s4-libnet: Skip calling lsarpc functions over a wrong pipe. 2012-07-06 10:00:58 +02:00
Matthias Dieter Wallnöfer
40ea52a267 s4:libnet/libnet_rpc.c - quiet an enum warning
Other enum types have been checked before.

Reviewed-by: Tridge
2011-06-09 10:53:36 +02:00
Andrew Tridgell
9bae4cd3d9 s4-rpc: added target_principal binding handle option
this allows you to specify a target SPN for a connection

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-10-01 22:31:57 -07:00
Andrew Tridgell
c18e9566ea s4-libnet: force IDL printing for high debug levels
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-09-15 15:39:36 +10:00
Andrew Tridgell
041c699f3a s4-libnet: converted finddcs call to tevent_req
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-09-15 15:39:34 +10: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
48cd096126 s4:libnet: don't include librpc/rpc/dcerpc.h directly
metze
2010-03-23 18:44:32 +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
a3ae9802d4 s4:libnet: keep a dcerpc_binding_handle for samr and lsa
metze
2010-03-12 15:25:42 +01:00
Stefan Metzmacher
f995e596bb s4:libnet: make use of explicit dcerpc_*_recv functions
metze
2010-03-01 16:11:53 +01:00
Stefan Metzmacher
ff37d6631c s4:libnet: use talloc_strdup() instead of talloc_reference()
metze
2009-07-31 14:42:03 +02:00
Andrew Tridgell
27620c85e7 use a talloc_reparent in a very ugly way
this works around some terrible use of talloc in the libnet code
2009-07-01 15:15:37 +10:00
Andrew Bartlett
58e8db912d s4:libnet Allow 'net password change' to work on expired passwords
We need to pass down flags to the DCE/RPC layer to allow fallback to
anonymous connections, as we can't log in with an expired password.

The anonymous connection can then change the password with SAMR.

Andrew Bartlett
2009-06-18 13:49:30 +10:00
Günther Deschner
95231eae39 s4-lsa: merge lsa_QueryInfoPolicy/{2} from s3 lsa idl.
Guenther
2008-10-27 19:33:23 +01:00
Jelmer Vernooij
afe3e8172d Install public header files again and include required prototypes.
(This used to be commit 47ffbbf674)
2008-04-02 04:53:27 +02:00
Andrew Bartlett
359be70ed7 Report binding in libnet failure message.
Andrew Bartlett
(This used to be commit def46f6852)
2008-03-13 14:13:31 +11:00
Jelmer Vernooij
4c4323009f r26327: Explicit loadparm_context for RPC client functions.
(This used to be commit eeb2251d22)
2007-12-21 05:48:41 +01:00
Stefan Metzmacher
f14bd1a90a r24557: rename 'dcerpc_table_' -> 'ndr_table_'
metze
(This used to be commit 84651aee81)
2007-10-10 15:02:15 -05:00
Rafal Szczesniak
a47313851f r24051: more monitor function calls and monitor msg names
convention change.

rafal
(This used to be commit 6ab10b2ed2)
2007-10-10 15:01:18 -05:00
Rafal Szczesniak
0d80514173 r23959: add more monitor messages support that's been sitting around on my
laptop for a while.

rafal
(This used to be commit c257363adb)
2007-10-10 15:01:11 -05:00
Andrew Tridgell
0479a2f1cb r23792: convert Samba4 to GPLv3
There are still a few tidyups of old FSF addresses to come (in both s3
and s4). More commits soon.
(This used to be commit fcf38a38ac)
2007-10-10 14:59:12 -05:00
Stefan Metzmacher
40cd2d7780 r22944: fix bug #4618:
rename private -> private_data

metze
(This used to be commit 58551f2f28)
2007-10-10 14:52:30 -05:00
Rafal Szczesniak
d02dc1b674 r22672: use composite_create calls instead of talloc_zero.
rafal
(This used to be commit 969b175c73)
2007-10-10 14:52:00 -05:00
Rafal Szczesniak
176d210ec7 r19937: fix sending monitor message (spotted by metze).
rafal
(This used to be commit 16f1f075fb)
2007-10-10 14:28:38 -05:00
Stefan Metzmacher
8ffc2d47ab r19933: something is really wrong here...
mimir: please take a look!

metze
(This used to be commit 0b4da84d70)
2007-10-10 14:28:38 -05:00
Andrew Bartlett
2ddd807979 r19759: Allow a join to occour against ncacn_ip_tcp again (useful for torture
tests).  The issue is that Win2k3 SP1 will not answer many LSA
requests on that port (I think this is as a security measure).

In this case, we need to skip ahead in the composite functions.

We were also checking the wrong variable to determine sucess/failure
of the LsaOpenPolicy2.

Andrew Bartlett
(This used to be commit 67c191305f)
2007-10-10 14:28:19 -05:00
Rafal Szczesniak
4e61cee33c r19587: Fix indentation and correctly set error string when completing
a composite call - don't leave it unset.

rafal
(This used to be commit 8bd57beca1)
2007-10-10 14:24:57 -05:00
Andrew Bartlett
57b8c5cd22 r19266: Add a target_hostname element to the binding struct. This allows us
to perform a lookup once, resolve the name to an IP, while still
communicating the full name to the lower layers, for kerberos etc.

This fixes 'net samdump', which was failing due to the schannel target
name being *smbserver.

Andrew Bartlett
(This used to be commit 0546f487f4)
2007-10-10 14:21:00 -05:00
Rafal Szczesniak
1f8fda717f r17670: 1) Refactor libnet context structure a bit, to have rpc connection
properties more consistently reflected.
2) Add domain open routine for lsa pipe - this is needed for ongoing
   name resolve function.

Tests (still neglected) and comments to follow.

rafal
(This used to be commit fe5652c2b8)
2007-10-10 14:16:21 -05:00
Rafal Szczesniak
5104e4e83f r17472: Remove unused variable.
rafal
(This used to be commit 04c94e4a52)
2007-10-10 14:15:27 -05:00
Rafal Szczesniak
45b64e394d r17079: Remove an attempt to connect on ncacn_ip_tcp transport after failure
on ncacn_np, as abartlet suggested. Also, named pipe remains the default
transport for all kinds of servers to be contacted.

rafal
(This used to be commit 76888c74a6)
2007-10-10 14:10:11 -05:00
Rafal Szczesniak
434087bb4b r17026: Make rpc connect routine a bit smarter. Try to connect again
using different transport and possibly address type, when
the first attempt fails (only if it makes any sense, of course).
This may be especially useful when connecting DCs and PDCs in
mixed environments.

Also, add monitor messages issuing.

rafal
(This used to be commit d69b31230d)
2007-10-10 14:10:09 -05:00
Rafal Szczesniak
5b19070ac7 r16694: Store lsa rpc pipe pointer in a right place.
rafal
(This used to be commit fa6b52dbf7)
2007-10-10 14:09:39 -05:00
Andrew Bartlett
345c9f043f r16226: Fixes for various segfault bugs found against a buggy Samba4. With
the current API we need to check both that the RPC didn't fault, and
that the query succeeded.

Also print the right things in debug messages.

Andrew Bartlett
(This used to be commit d18e515391)
2007-10-10 14:09:06 -05:00
Stefan Metzmacher
9ff4fcab36 r15858: - initialize s->r.out
- don't check for mem_ctx, ctx and r, we should crash when they're wrong
  as it's a programmer error!
- pass the error string to the caller

metze
(This used to be commit 5f65447f5d)
2007-10-10 14:08:33 -05:00
Rafal Szczesniak
16b5eac38d r15625: Partial commit of my current work. It makes libnet api functions
a bit more smart and more aware of what libnet_context can offer.
The context is a help when some of the arguments are not passed
(programmer counts on using sensible defaults) and stores some of
results so that similar subsequent calls don't need to reopen some
of policy handles, pipes, etc. again. It also helps to hide some
of details the library user don't really want to know much about.

Also, change domain open function to be part of public api, as
it is going to be used in ejsnet interface.

Note, this is work in progress. Comments are welcome.

rafal
(This used to be commit 1ed80c594c)
2007-10-10 14:07:24 -05:00
Rafal Szczesniak
4d8aaf5f1c r15487: More comments and a few minor changes (not even fixes).
rafal
(This used to be commit 12d0faf9bc)
2007-10-10 14:05:40 -05:00
Rafal Szczesniak
eff21e317e r15459: Add forgotten guid retrieval among other data and thus prevent
from returning uninitialised structure member. Thank heavens for build
farm and valgrind :)

rafal
(This used to be commit daca283990)
2007-10-10 14:05:38 -05:00
Rafal Szczesniak
ccf5696b97 r15439: Reorder the code a bit to be like in other calls. More comments
and comment-fixes.

rafal
(This used to be commit d35f1e07be)
2007-10-10 14:05:37 -05:00
Rafal Szczesniak
538adbf677 r15435: Turn libnet_RpcConnectDCInfo into another level of libnet_RpcConnect
and make it async. Also, update any other usages of old function.
Build goes fine and so do tests, comments to follow.

rafal
(This used to be commit aef0a2de9d)
2007-10-10 14:05:36 -05:00