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

1492 Commits

Author SHA1 Message Date
Andrew Bartlett
c9d929af8b s4-lsarpc handle more info levels in SetInfoTrustedDomain calls
This uses the very helpful conversion functions written for the s3 lsa server
and places these in common.

Andrew Bartlett
2011-12-12 12:57:07 +01:00
Stefan Metzmacher
790c6b4027 s3:rpc_client: remove references to auth_ntlmssp_state
metze

Signed-off-by: Günther Deschner <gd@samba.org>

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Thu Oct 27 16:40:15 CEST 2011 on sn-devel-104
2011-10-27 16:40:15 +02:00
Simo Sorce
8870daeb8d idl: Improve MS-PAC IDL
Change some misleading variable names to reflect the actual function.
Add missing field name/types previously marked as unkown.

Signed-off-by: Günther Deschner <gd@samba.org>

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Mon Oct 24 19:19:28 CEST 2011 on sn-devel-104
2011-10-24 19:19:28 +02:00
Andrew Bartlett
0a0839821a s3-ntlmssp Remove auth_ntlmssp_session_key()
We now just call the gensec_session_key() directly.

Andrew Bartlett

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-10-21 08:43:38 +02:00
Andrew Bartlett
3f079885b2 s3-ntlmssp Remove auth_ntlmssp_want_feature()
We now just call the gensec_want_feature() directly.

Andrew Bartlett

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-10-21 08:43:33 +02:00
Andrew Bartlett
083025ccd5 s3-ntlmssp Remove auth_ntlmssp_update wrapper
We now just call gensec_update directly.

Andrew Bartlett

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-10-21 08:43:10 +02:00
Andrew Bartlett
f9b042641f s3-ntlmssp split auth_ntlmssp_client_start() into two parts
This will allow it to be a wrapper around a gensec module, which
requires that they options be set on a context, but before the
mechanism is started.

This also simplfies the callers, by moving the lp_*() calls
into one place.

Andrew Bartlett
2011-10-18 12:25:30 +02:00
Andrew Bartlett
f3333bdade s3-rpc_client remove cli_auth_ntlmssp_data_destructor
This can be an ordinary talloc child without causing any problem.

This seems to have been inherited from a time when ntlmssp_client_start()
returned malloc() based memory.

Andrew Bartlett
2011-10-18 12:25:30 +02:00
Andrew Bartlett
0c6e4adcb2 ntlmssp: Move ntlmssp code to auth/ntlmssp
This brings in the code from both libcli/auth and
source4/auth/ntlmssp.

Andrew Bartlett

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-10-18 13:13:31 +11:00
Gregor Beck
85b145d745 s3:utils change data_blob_dup_talloc() to take a DATA_BLOB by value
Signed-off-by: Michael Adam <obnox@samba.org>
2011-10-12 22:45:53 +02:00
Volker Lendecke
dea2bd5b9b s3: Fix two c++ warnings 2011-09-18 17:24:22 +02:00
Stefan Metzmacher
cc5f973884 s3:rpc_client: return NT_STATUS_CONNECTION_DISCONNECTED
We should return the same in all places
and don't mix NT_STATUS_INVALID_CONNECTION and NT_STATUS_CONNECTION_INVALID.

metze
2011-09-14 18:03:17 +02:00
Volker Lendecke
e63d0c5f0c s3: Fix Coverity ID 2613 -- UNINIT
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Tue Sep 13 12:39:10 CEST 2011 on sn-devel-104
2011-09-13 12:39:10 +02:00
Volker Lendecke
67605bfc55 s3: Fix Coverity ID 2614 -- UNINIT 2011-09-13 11:00:15 +02:00
Sumit Bose
456aee80f5 s3-lsa: Add conversion for auth info structs
struct lsa_TrustDomainInfoAuthInfo and struct
trustAuthInOutBlob can store the same information for different usage. The added
routines can convert one struct into the other.

Signed-off-by: Günther Deschner <gd@samba.org>

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Mon Sep 12 15:52:17 CEST 2011 on sn-devel-104
2011-09-12 15:52:17 +02:00
Stefan Metzmacher
56319cf1b7 s3:rpc_transport_tstream: only use tstream_cli_np_use_trans() for sync requests
Currently the caller doesn't cope with multiple async requests anyway,
so this is just protection for the future.

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Fri Aug  5 22:31:12 CEST 2011 on sn-devel-104
2011-08-05 22:31:12 +02:00
Andrew Bartlett
1231b784a1 s3-ntlmssp Remove auth_ntlmssp_and_flags()
There is no need to mask out these flags as they simply are not set
yet.

The correct abstraction is to ask for NTLMSSP features.

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-08-03 18:48:03 +10:00
Andrew Bartlett
da4345a8d1 s3-ntlmssp Remove rpccli_get_pwd_hash and auth_ntlmssp_get_nt_hash
The session key we want here (the only one that is availble to the
encryption layer) is the one obtained by cli_get_session_key(), as
NTLMSSP creates a per-session session key via key exchange and NTLMv2
negotiation.

The key was never directly the NT hash anyway (this is simply a
mistake, the extra MD4() was lost during my previous cleanup
f28f113d8e in 2008), but was MD4(NT
hash) in early implementations of NTLMSSP.

However, regardless this call is not available on domain trusts
between AD domains and Windows 2003 R2, making this less useful.

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-08-03 18:48:03 +10:00
Andrew Bartlett
bba5f0a641 s3-ntlmssp Remove auth_ntlmssp_or_flags
We now just use auth_ntlmssp_want_feature to get extra flags
on the NTLMSSP context

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-08-03 18:48:03 +10:00
Andrew Bartlett
6d7ac4f1ad s3-ntlmssp Add mem_ctx argument to auth_ntlmssp_update
This clarifies the lifetime of the returned token.

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-08-03 18:48:03 +10:00
Andrew Bartlett
dee845eb70 s3-ntlmssp Add mem_ctx argument to auth_ntlmssp_get_session_key() 2011-08-03 18:48:02 +10:00
Stefan Metzmacher
a833aaf52c s3:rpc_transport_tstream: call tstream_cli_np_use_trans() before tstream_writev_queue_send()
This will be needed when tstream_writev_queue_send() changes it's behavior and
avoids using an immediate event when the queue is empty.

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Mon Aug  1 14:55:00 CEST 2011 on sn-devel-104
2011-08-01 14:55:00 +02:00
Andreas Schneider
8831402596 s3-rpc_client: Fix memory context in winreg_enum_printer_dataex(). 2011-07-27 08:49:58 +02:00
Andreas Schneider
5045281e17 s3-rpc_client: Close policy handles before creating defaults.
We reopen the hive and key so close them before reopen.
2011-07-27 08:49:58 +02:00
Andreas Schneider
f8afaa76f2 s3-rpc_client: Close the hive handle before we open it again. 2011-07-27 08:49:58 +02:00
Andreas Schneider
a0597b75e6 s3-rpc_client: Close hive if opening of the key fails. 2011-07-27 08:49:58 +02:00
Stefan Metzmacher
49c8534ae4 s3:cli_pipe_schannel: make use of cli_state_remote_name()
metze
2011-07-22 17:06:09 +02:00
Stefan Metzmacher
efc2c3159e s3:cli_pipe: make use of cli_state_remote_name()
metze
2011-07-22 17:06:09 +02:00
Stefan Metzmacher
ef23fb3412 s3:cli_pipe: use result->desthost instead of cli->desthost
metze
2011-07-22 17:06:09 +02:00
Andrew Bartlett
9fcc617ff5 s3-auth Use the common auth_session_info
This patch finally has the same structure being used to describe the
authorization data of a user across the whole codebase.

This will allow of our session handling to be accomplished with common code.

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-20 09:17:13 +10:00
Andrew Bartlett
f16d8f4eb8 s3-auth Use struct auth3_session_info outside the auth subsystem
This seperation between the structure used inside the auth modules and
in the wider codebase allows for a gradual migration from struct
auth_serversupplied_info -> struct auth_session_info (from auth.idl)

The idea here is that we keep a clear seperation between the structure
before and after the local groups, local user lookup and the session
key modifications have been processed, as the lack of this seperation
has caused issues in the past.

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-20 09:17:10 +10:00
Vicentiu Ciorbaru
e858ec6e92 s3-rpc_server: Removed no longer used functions.
Removed winreg_printer_delete_subkeys().
Removed winreg_printer_enumvalues().

Signed-off-by: Andreas Schneider <asn@samba.org>

Autobuild-User: Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date: Wed Jul 13 12:42:02 CEST 2011 on sn-devel-104
2011-07-13 12:42:02 +02:00
Vicentiu Ciorbaru
0b1ba88f22 s3-rpc_client: Migrate to dcerpc_winreg_delete_subkeys_recursive().
Functions now use dcerpc_winreg_delete_subkeys_recursive() instead of the more
specific printer function winreg_printer_delete_subkeys().

Signed-off-by: Andreas Schneider <asn@samba.org>
2011-07-13 11:31:22 +02:00
Vicentiu Ciorbaru
a336cc44d9 s3-rpc_client: Migrate to dcerpc_winreg_enumvals() function.
The functions that called winreg_printer_enumvalues() function now use
dcerpc_winreg_enumvals().

Signed-off-by: Andreas Schneider <asn@samba.org>
2011-07-13 11:30:55 +02:00
Vicentiu Ciorbaru
4558225cdd s3-rpc_client: Added dcerpc_winreg_delete_subkeys_recursive() function.
This function is set to replace the more specific printer function
winreg_printer_delete_subkeys().

Signed-off-by: Andreas Schneider <asn@samba.org>
2011-07-13 10:09:08 +02:00
Vicentiu Ciorbaru
8b3eff8b36 s3-rpc_client: Added dcerpc_winreg_enumvals() function.
The function is set to replace the more specific printer function
winreg_printer_enumvalues() function.

Signed-off-by: Andreas Schneider <asn@samba.org>
2011-07-13 10:08:56 +02:00
David Disseldorp
2a02f1c4af winreg: Ensure server return status is set on success
Currently cli_winreg.c functions only set the returned server werror
status on failure, if the server request succeeds the value remains
uninitialised.

Signed-off-by: Andreas Schneider <asn@samba.org>

Autobuild-User: Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date: Fri Jul  8 16:32:39 CEST 2011 on sn-devel-104
2011-07-08 16:32:39 +02:00
David Disseldorp
1271066200 winreg: Use the ntstatus return code for client side errors
cli_winreg.c functions indicate status to the caller in two ways. The
ntstatus return code indicates client side errors, the pwerr argument
carries the server response error code.

Many functions are filling the pwerr argument on client side error, this
change removes these cases.

Signed-off-by: Andreas Schneider <asn@samba.org>
2011-07-08 15:22:27 +02:00
Günther Deschner
f2be8378b9 s3-printing: add rpc_client/cli_winreg_spoolss.c
Guenther

Pair-Programmed-With: David Disseldorp <ddiss@suse.de>
2011-07-07 18:06:01 +02:00
Günther Deschner
43cf3a28dc s3-printing: move spoolss_create_default_devmode/secdesc to init_spoolss.h
Guenther

Pair-Programmed-With: David Disseldorp <ddiss@suse.de>
2011-07-07 18:06:01 +02:00
Günther Deschner
74e416031b s3-printing: move driver_info_ctr_to_info8 to init_spoolss.h
Guenther

Pair-Programmed-With: David Disseldorp <ddiss@suse.de>
2011-07-07 18:06:01 +02:00
Andreas Schneider
541f3cf639 s3-rpc_server: Migrate rpc function to tsocket_address.
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2011-07-04 18:27:58 +10:00
Andreas Schneider
a45120aea7 s3-rpc_client: Fix some valgrind warnings.
These are in/out values and need to be initialized.

Signed-off-by: Günther Deschner <gd@samba.org>
2011-06-21 17:46:37 +02:00
Günther Deschner
cd16a1be93 source3/rpc_client/util_netlogon.h: fix licence/copyright
Guenther

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Fri Jun 10 16:27:24 CEST 2011 on sn-devel-104
2011-06-10 16:27:23 +02:00
Günther Deschner
4942aeb9b5 source3/rpc_client/init_spoolss.h: fix licence/copyright
Guenther
2011-06-10 15:12:46 +02:00
Günther Deschner
054e54e881 source3/rpc_client/init_samr.h: fix licence/copyright
Guenther
2011-06-10 15:12:45 +02:00
Günther Deschner
f3ca8ff2bf source3/rpc_client/init_netlogon.h: fix licence/copyright
Guenther
2011-06-10 15:12:43 +02:00
Günther Deschner
9284036ce1 source3/rpc_client/init_lsa.h: fix licence/copyright
Guenther
2011-06-10 15:12:41 +02:00
Günther Deschner
b95b1813b9 source3/rpc_client/cli_spoolss.h: fix licence/copyright
Guenther
2011-06-10 15:12:39 +02:00
Günther Deschner
2d10c48259 source3/rpc_client/cli_netlogon.h: fix licence/copyright
Guenther
2011-06-10 15:12:37 +02:00