summaryrefslogtreecommitdiff
path: root/source3/libsmb
AgeCommit message (Collapse)AuthorFilesLines
2011-08-12s3:smb2cli: pass more fields to smb2cli_req_create()/smb2cli_req_send()Stefan Metzmacher11-16/+80
The caller should take care of the global cli_state values. metze Autobuild-User: Stefan Metzmacher <metze@samba.org> Autobuild-Date: Fri Aug 12 19:38:27 CEST 2011 on sn-devel-104
2011-08-12s3:smb2cli: allow 32bit dyn_len in smb2cli_req_create()/smb2cli_req_send()Stefan Metzmacher2-5/+5
metze
2011-08-12s3:libsmb: keep a cli_smb_state->one_wayStefan Metzmacher1-12/+19
This moves the SMB1 specific stuff to cli_smb_req_create(), instead of having it in the core dispatching code. metze
2011-08-12s3:libsmb: abstract the incoming dispatch function via a function pointerStefan Metzmacher1-5/+6
This will allow handling of SMB2 in future. metze
2011-08-12s3:libsmb: split out cli_state_dispatch_smb1() from cli_smb_received()Stefan Metzmacher1-45/+66
metze
2011-08-12s3:libsmb: add missing TALLOC_FREE(frame) to cli_smb_received()Stefan Metzmacher1-0/+1
metze
2011-08-12s3:libsmb: keep the request order in cli_smb_req_unset_pending()Stefan Metzmacher1-1/+3
metze Autobuild-User: Stefan Metzmacher <metze@samba.org> Autobuild-Date: Fri Aug 12 12:36:03 CEST 2011 on sn-devel-104
2011-08-12s3:libsmb: use tevent_req_defer_callback() unless there's only one request ↵Stefan Metzmacher1-4/+41
in cli_smb_received() Callers of tevent_req_done() (or similar functions) have to return directly. Otherwise the callback could invalidate the current stack state, which is likely to trigger segfaults. If there was only one pending request and we just got the response for that one, we can use tevent_req_done() directly. Otherwise there're more pending requests and we need to call cli_state_receive_next() or we got the response for chained requests. Both means that we have to use tevent_req_defer_callback(). metze
2011-08-12s3:libsmb: make use of cli_state_receive_next() in cli_smb_received()Stefan Metzmacher1-17/+2
metze
2011-08-12s3:libsmb: notify all request about failures in cli_smb_req_set_pending()Stefan Metzmacher1-0/+7
It's up to the caller to notify the current request, but we have to notify all other pending requests if we're not able to read the next response from the server. metze
2011-08-12s3:libsmb: split out cli_state_receive_next() from cli_smb_req_set_pending()Stefan Metzmacher1-2/+25
metze
2011-08-12s3:libsmb: use talloc_stackframe() in cli_smb_received()Stefan Metzmacher1-8/+12
metze
2011-08-12s3:libsmb: call cli_smb_req_unset_pending() before tevent_req_done() also ↵Stefan Metzmacher1-0/+1
for chained requests metze
2011-08-12s3:libsmb: reset the destructor in cli_smb_req_unset_pending()Stefan Metzmacher1-1/+2
metze
2011-08-12s3:libsmb: add cli_state_notify_pending() and use itStefan Metzmacher1-25/+45
If we got a problem on the connection we need to notify every pending request. But we need to make use of tevent_req_defer_callback() before tevent_req_nterror(), otherwise the callback, triggered by tevent_req_nterror(), could invalidate the state of current caller, which will likely cause segfaults. metze
2011-08-10s3:libsmb: make cli_session_setup_spnego() staticStefan Metzmacher2-6/+4
metze Autobuild-User: Stefan Metzmacher <metze@samba.org> Autobuild-Date: Wed Aug 10 12:31:55 CEST 2011 on sn-devel-104
2011-08-10s3:libsmb: pass remote_realm to cli_session_setup_spnego() in ↵Stefan Metzmacher1-1/+3
cli_session_setup() metze
2011-08-10s3:libsmb: store the remote_realm on the cli_stateStefan Metzmacher3-1/+16
metze
2011-08-09s3:libsmb/cli*: use CLI_BUFFER_SIZE instead of cli->max_xmitStefan Metzmacher4-14/+14
The max_data parameter of trans2/nttrans calls are not bound to cli->max_xmit. Even with cli->max_xmit, which means the max size of the whole SMB pdu, we would get fragmented trans2/nttrans replies. That's why we can also use our maximum, which is CLI_BUFFER_SIZE. metze Autobuild-User: Stefan Metzmacher <metze@samba.org> Autobuild-Date: Tue Aug 9 18:14:38 CEST 2011 on sn-devel-104
2011-08-04s3-ntlmssp void function cannot return valueAndrew Bartlett1-3/+3
Removing the return is reasonable here because while no callers currently specify more than one flag at a time, the ntlmssp_want_feature code allows it. Autobuild-User: Andrew Bartlett <abartlet@samba.org> Autobuild-Date: Thu Aug 4 02:19:46 CEST 2011 on sn-devel-104
2011-08-03s3-ntlmssp Remove rudundent commentAndrew Bartlett1-1/+0
This is explained where SESSION_KEY maps to SIGN at the NTLMSSP layer Andrew Bartlett
2011-08-03s3-auth set session_info->sanitized_username in create_local_token()Andrew Bartlett1-9/+0
Rather than passing this value around the callers, and eventually setting it in register_existing_vuid(), we simply pass it to create_local_token(). This also removes the need for auth_ntlmssp_get_username(). Andrew Bartlett Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-08-03s3-ntlmssp Remove auth_ntlmssp_and_flags()Andrew Bartlett1-5/+0
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-03s3-ntlmssp Remove rpccli_get_pwd_hash and auth_ntlmssp_get_nt_hashAndrew Bartlett1-5/+0
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 f28f113d8e76824b080359c90efd9c92de533740 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-03s3-ntlmssp Remove auth_ntlmssp_or_flagsAndrew Bartlett2-6/+1
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-03s3-ntlmssp Remove calls to auth_ntlmssp_and_flags from the serverAndrew Bartlett1-3/+1
This is changed so that the callers ask for the additional flags that they need, starting with no additional flags. This helps to create a proper abstraction layer in ntlmssp_wrap/auth_ntlmssp. Andrew Bartlett Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-08-03s3-ntlmssp Add mem_ctx argument to auth_ntlmssp_updateAndrew Bartlett2-3/+11
This clarifies the lifetime of the returned token. Andrew Bartlett Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-08-03s3-ntlmssp NTLMSSP sealing implies signing, so set both flagsAndrew Bartlett1-0/+1
Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-08-03s3-ntlmssp Add hooks to optionally call into GENSEC in auth_ntlmsspAndrew Bartlett1-1/+52
This allows the current behaviour of the NTLMSSP code to be unchanged while adding a way to hook in an alternate implementation via an auth module. Andrew Bartlett Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-08-03s3-ntlmssp Add mem_ctx argument to auth_ntlmssp_get_session_key()Andrew Bartlett1-2/+2
2011-08-03s3-ntlmssp Use auth_ntlmssp_*() functions in more placesAndrew Bartlett4-24/+26
This allows auth_ntlmssp_get_ntlmssp_state() to be removed. Andrew Bartlett Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-08-03s3-ntlmssp Remove unused auth_ntlmssp_get_domain()Andrew Bartlett1-6/+1
Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-08-03s3-ntlmssp Remove unused auth_ntlmssp_get_clientAndrew Bartlett1-5/+0
Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-08-03s3:libsmb/clifile: make use of cli_set_timeout()Stefan Metzmacher1-12/+22
metze Autobuild-User: Stefan Metzmacher <metze@samba.org> Autobuild-Date: Wed Aug 3 10:16:18 CEST 2011 on sn-devel-104
2011-08-03s3:cli_np_tstream: make use of cli_set_timeout()Stefan Metzmacher1-1/+2
metze
2011-08-03s3:libsmb/clidfs: make use of cli_state_encryption_on()Stefan Metzmacher1-2/+2
metze
2011-08-02s3:libsmb/libsmb_server: make use of cli_set_timeout()Stefan Metzmacher1-1/+1
metze
2011-08-02s3:libsmb/cli*: make use of cli_state_protocol()Stefan Metzmacher4-14/+14
metze
2011-08-02s3:libsmb: add cli_state_protocol()Stefan Metzmacher2-0/+6
metze
2011-08-02s3:libsmb/cli*: make use of cli_state_capabilities()Stefan Metzmacher6-18/+18
metze
2011-08-02s3:libsmb/libsmb_*: make use of cli_state_capabilities()Stefan Metzmacher3-3/+3
metze
2011-08-02s3:libsmb: add cli_state_capabilities()Stefan Metzmacher2-0/+6
metze
2011-08-02s3:smb2cli_base: smb2cli_req_send() needs to call tevent_req_post() on errorStefan Metzmacher1-1/+1
metze
2011-08-02Fix bug #8341 - libsmbclient segfault when feed the root of a mounted share ↵Alban Browaeys1-1/+2
via an uri Fix null deref. Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Tue Aug 2 02:58:26 CEST 2011 on sn-devel-104
2011-07-30Added missing return. Not strictly neccessary, the following if ↵Jeremy Allison1-0/+1
(!NT_STATUS_EQUAL(status, NT_STATUS_NOT_SUPPORTED)) clause will catch this and use tevent_req_nterror(req, status); to set the status as NT_STATUS_OK, but it looks strange to do it that way. Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Sat Jul 30 01:34:24 CEST 2011 on sn-devel-104
2011-07-29s3: Add a fallback for missing open&x support in OS/X LionVolker Lendecke1-19/+68
Autobuild-User: Volker Lendecke <vlendec@samba.org> Autobuild-Date: Fri Jul 29 17:55:20 CEST 2011 on sn-devel-104
2011-07-28s3:libsmb: use lp_load_client() and lp_load_client_no_reinit() in libsmb_contextMichael Adam1-5/+3
2011-07-28s3:libsmb: fix a call to lp_load to reinit the globals in any caseMichael Adam1-1/+1
The potential previous lp_load of $HOME/.smb/smb.conf might have failed halfway through and might have left globals initialized in an unwanted state. So we should make sure to clean up before loading the dyn_CONFIGFILE()
2011-07-27Fix bug #8324 - smbclient cannot list directories from a big-endian machine.Jeremy Allison1-2/+2
Two uses of the setup array are not being correctly byte-swapped to little endian. Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Wed Jul 27 03:14:48 CEST 2011 on sn-devel-104
2011-07-27s3: Fix async smb handlingVolker Lendecke1-9/+21
In cli_echo with more than one response we ended up with more than one read_smb request. One from the call to cli_smb_req_set_pending called from cli_smb_received. The other one from cli_smb_received itself. I don't really see another way to deal with this than to hold the read_smb request in the cli_state. Metze, please check! Volker