summaryrefslogtreecommitdiffstats
path: root/source4/auth/ntlmssp
Commit message (Collapse)AuthorAgeFilesLines
* credentials: Rename library to samba-credentials to avoid name clashes.Jelmer Vernooij2011-08-181-1/+1
| | | | | Autobuild-User: Jelmer Vernooij <jelmer@samba.org> Autobuild-Date: Thu Aug 18 22:16:38 CEST 2011 on sn-devel-104
* ntlmssp: Add ntlmssp_blob_matches_magic()Andrew Bartlett2011-08-031-1/+1
| | | | | | | | | This avoids having the same check in 3 different parts of the code Andrew Bartlett Autobuild-User: Andrew Bartlett <abartlet@samba.org> Autobuild-Date: Wed Aug 3 12:45:04 CEST 2011 on sn-devel-104
* gensec: Don't keep a second copy of the auth4_context in gensec_ntlmssp_stateAndrew Bartlett2011-08-032-7/+4
| | | | | | | | | The auth4_context is already in the gensec_security structure, which is available by de-reference here anyway. Andrew Bartlett Signed-off-by: Andrew Tridgell <tridge@samba.org>
* gensec: clarify memory ownership for gensec_session_info() and ↵Andrew Bartlett2011-08-032-7/+9
| | | | | | | | | | | | | | | 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
* gensec: Remove mem_ctx from calls that do not return memoryAndrew Bartlett2011-08-031-2/+0
| | | | Signed-off-by: Andrew Tridgell <tridge@samba.org>
* s4:auth/ntlmssp/ntlmssp_server.c - add "const" in front of "dnsdomain"Matthias Dieter Wallnöfer2011-05-211-1/+1
| | | | Signed-off-by: Metze
* s4-auth Rename auth -> auth4 to avoid conflict with s3 authAndrew Bartlett2011-05-082-5/+5
|
* Remove strlower_m() and strupper_m() from source4 and common code.Andrew Bartlett2011-05-031-14/+14
| | | | | | | | | This function is problematic because a string may expand in size when changed into upper or lower case. This will then push characters off the end of the string in the s3 implementation, or panic in the former s4 implementation. Andrew Bartlett
* Fix inspired by work done by David Disseldorp for bug #8040 - smbclient ↵Jeremy Allison2011-03-281-4/+10
| | | | | | | | | segfaults when a Cyrillic netbios name or workgroup is configured. Change msrpc_gen to return NTSTATUS and ensure everywhere this is used it is correctly checked to return that status. Jeremy.
* build: moved libcli/auth/ntlmssp*.c into a common libcliauth.so libraryAndrew Tridgell2011-02-242-6/+3
| | | | Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
* s4-auth Rework auth subsystem to remove struct auth_serversupplied_infoAndrew Bartlett2011-02-092-11/+11
| | | | | | | | | | | | | This changes auth_serversupplied_info into the IDL-defined struct auth_user_info_dc. This then in turn contains a struct auth_user_info, which is the only part of the structure that is mainted into the struct session_info. The idea here is to avoid keeping the incomplete results of the authentication (such as session keys, lists of SID memberships etc) in a namespace where it may be confused for the finalised results. Andrew Barltett
* s4-gensec Add prototype for gensec_ntlmssp_init()Andrew Bartlett2011-01-201-0/+2
| | | | Andrew Bartlett
* libcli/auth move ntlmssp_wrap() and ntlmssp_unwrap() into common code.Andrew Bartlett2011-01-201-123/+12
| | | | | | | The idea here is to allow the source3/libads/sasl.c code to call this instead of the lower level ntlmssp_* functions. Andrew Bartlett
* s4:auth/ntlmssp/ntlmssp_server.c - remove unnecessary ";"Matthias Dieter Wallnöfer2010-11-291-1/+1
|
* credentials: Lowercase library name,Jelmer Vernooij2010-11-071-1/+1
| | | | | Autobuild-User: Jelmer Vernooij <jelmer@samba.org> Autobuild-Date: Sun Nov 7 01:48:44 UTC 2010 on sn-devel-104
* s4: Remove the old perl/m4/make/mk-based build system.Jelmer Vernooij2010-10-311-13/+0
| | | | | | | | The new waf-based build system now has all the same functionality, and the old build system has been broken for quite some time. Autobuild-User: Jelmer Vernooij <jelmer@samba.org> Autobuild-Date: Sun Oct 31 02:01:44 UTC 2010 on sn-devel-104
* libcli/auth/ntlmssp Be clear about talloc parents for session keysAndrew Bartlett2010-09-161-0/+5
| | | | | | | | | | The previous API was not clear as to who owned the returned session key. This fixes a valgrind-found use-after-free in the NTLMSSP key derivation code, and avoids making allocations - we steal and zero instead. Andrew Bartlett Signed-off-by: Andrew Tridgell <tridge@samba.org>
* s4:gensec Put the "NTLM" string for NTLMSSP's SASL name in a headerAndrew Bartlett2010-09-111-1/+1
|
* s4:auth Move struct auth_usersupplied_info to a common locationAndrew Bartlett2010-08-141-1/+1
| | | | | | | | | This also changes the calling convention slightly - we should always allocate this with talloc_zero() to allow some elements to be optional. Some elements may only make sense in Samba3, which I hope will use this common structure. Andrew Bartlett
* libcli/auth Make the source3/ implementation of the NTLMSSP server commonAndrew Bartlett2010-08-101-520/+1
| | | | | | | | | This means that the core logic (but not the initialisation) of the NTLMSSP server is in common, but uses different authentication backends. Andrew Bartlett Signed-off-by: Günther Deschner <gd@samba.org>
* libcli/auth Move some source3/ NTLMSSP functions to the common code.Andrew Bartlett2010-08-103-141/+6
| | | | | | | | libcli/auth Use true and false rather than True and False in common code Andrew Bartlett Signed-off-by: Günther Deschner <gd@samba.org>
* s4:ntlmssp Merge more aspects of the source3/ NTLMSSP layerAndrew Bartlett2010-08-071-20/+21
| | | | | | | | | | | | This changes the talloc treatment of the session keys to avoid memory duplication - the session key has always been allocated onto the ntlmssp_context by the auth subsystem callback. The remainder of the changes are cosmetics, such as avoiding using lm_session_key as a pointer (and avoiding then doing an if statement on something that is always true). Andrew Bartlett
* s4:ntlmssp Re-add gensec_ntlmssp wrapper to allow merge with source3/Andrew Bartlett2010-08-072-20/+54
| | | | | | | | | By re-adding this wrapper, the actual guts of these functions are now very similar to that found in source3/libsmb/ntlmssp.c This should make it easier to merge the implementations. Andrew Bartlett
* s4:ntlmssp Always setup the session keys and signing stateAndrew Bartlett2010-08-071-9/+1
| | | | | | | | | | While it would save some CPU to only setup the session key when requested (like windows does), this instead matches the implementation in source3/libsmb/ntlmssp.c We could re-add this later after the codebase is merged. Andrew Bartlett
* s4:ntlmssp Adjust Samba4 ntlmssp code to look more like the code in Samba3.Andrew Bartlett2010-08-062-71/+119
| | | | | | | | This does not change behaviour, and some of the whitespace isn't ideal, but at the moment making this code more similar, even in cosmetics, will assist later merge efforts. Andrew Bartlett
* s4-loadparm: 2nd half of lp_ to lpcfg_ conversionAndrew Tridgell2010-07-162-10/+10
| | | | | | | 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>
* s4:ntlmssp Use common code for ntlmssp_sign.cAndrew Bartlett2010-06-012-508/+2
| | | | | | | | | | The common code does not have a mem_ctx on ntlmssp_check_packet() and ntlmssp_unseal_packet(). We do however need some internal working of the code exposed, so some structures are moved to ntlmssp_sign.h Andrew Bartlett
* s4:ntlmssp Use the new common ntlmssp.hAndrew Bartlett2010-06-011-117/+1
|
* s4:ntlmssp Merge ntlmssp structures with version from source3/Andrew Bartlett2010-06-012-74/+21
| | | | | | | Use this as an excuse to get rid of ntlmssp_set_domain() etc, which don't do anything useful now that msrpc_parse() use talloc anyway. Andrew Bartlett
* Add in support for the NTLMSSP version reply.Jeremy Allison2010-05-242-4/+31
| | | | Jeremy.
* s4:auth Change auth_generate_session_info to take an auth contextAndrew Bartlett2010-04-141-5/+5
| | | | | | | | | | | | | | | | | | The auth context was in the past only for NTLM authentication, but we need a SAM, an event context and and loadparm context for calculating the local groups too, so re-use that infrustructure we already have in place. However, to avoid problems where we may not have an auth_context (in torture tests, for example), allow a simpler 'session_info' to be generated, by passing this via an indirection in gensec and an generate_session_info() function pointer in the struct auth_context. In the smb_server (for old-style session setups) we need to change the async context to a new 'struct sesssetup_context'. This allows us to use the auth_context in processing the authentication reply . Andrew Bartlett
* s4-waf: removed the AUTOGENERATED markersAndrew Tridgell2010-04-061-4/+0
| | | | we won't be using the mk -> wscript generator again
* s4-waf: mark the wscript files as python so vim/emacs knows how to highlight ↵Andrew Tridgell2010-04-061-0/+2
| | | | them
* build: waf quicktest nearly worksAndrew Tridgell2010-04-061-1/+1
| | | | | Rewrote wafsamba using a new dependency handling system, and started adding the waf test code
* build: commit all the waf build files in the treeAndrew Tridgell2010-04-061-0/+13
|
* s4:ntlmssp: move sign/seal states to a private ntlmssp_crypt_state unionStefan Metzmacher2010-03-242-76/+63
| | | | | | metze Signed-off-by: Günther Deschner <gd@samba.org>
* s4:ntlmssp: make use of dump_arc4_state()Stefan Metzmacher2010-03-241-8/+7
| | | | | | metze Signed-off-by: Günther Deschner <gd@samba.org>
* s4:ntlmssp: copy dump_arc4_state() from source3Stefan Metzmacher2010-03-241-0/+6
| | | | | | metze Signed-off-by: Günther Deschner <gd@samba.org>
* s4:ntlmssp: avoid usage of calc_ntlmv2_key_talloc()Stefan Metzmacher2010-03-242-29/+10
| | | | | | metze Signed-off-by: Günther Deschner <gd@samba.org>
* s4:ntlmssp: make use of calc_ntlmv2_key() for seal keysStefan Metzmacher2010-03-241-15/+16
| | | | | | metze Signed-off-by: Günther Deschner <gd@samba.org>
* s4:ntlmssp: add calc_ntlmv2_key() from source3Stefan Metzmacher2010-03-241-0/+11
| | | | | | metze Signed-off-by: Günther Deschner <gd@samba.org>
* s4:ntlmssp: rename calc_ntlmv2_key => calc_ntlmv2_key_tallocStefan Metzmacher2010-03-241-5/+5
| | | | | | metze Signed-off-by: Günther Deschner <gd@samba.org>
* s4:ntlmssp: inline ntlmssp_weakend_keys()Stefan Metzmacher2010-03-242-54/+41
| | | | | | metze Signed-off-by: Günther Deschner <gd@samba.org>
* s4:ntlmssp: use a 'bool ok' helper variable to make the code more readableStefan Metzmacher2010-03-241-6/+14
| | | | | | metze Signed-off-by: Günther Deschner <gd@samba.org>
* s4:ntlmssp: fix some formatingStefan Metzmacher2010-03-241-74/+110
| | | | | | metze Signed-off-by: Günther Deschner <gd@samba.org>
* s4:ntlmssp: move doing_ntlm2 to ntlmssp_server_auth_stateStefan Metzmacher2010-03-242-4/+3
| | | | | | metze Signed-off-by: Günther Deschner <gd@samba.org>
* s4:ntlmssp: move NTLM2 session_nonce to ntlmssp_server_auth_stateStefan Metzmacher2010-03-242-8/+7
| | | | | | metze Signed-off-by: Günther Deschner <gd@samba.org>
* s4:ntlmssp: move encrypted_session_key to ntlmssp_server_auth_stateStefan Metzmacher2010-03-242-29/+19
| | | | | | metze Signed-off-by: Günther Deschner <gd@samba.org>
* s4:ntlmssp: keep a ntlmssp_server_auth_state to transport variables from ↵Stefan Metzmacher2010-03-241-10/+23
| | | | | | | | preauth to postauth hooks metze Signed-off-by: Günther Deschner <gd@samba.org>
* s4:ntlmssp: remove unused server_multiple_authentications feature.Stefan Metzmacher2010-03-242-14/+1
| | | | | | metze Signed-off-by: Günther Deschner <gd@samba.org>