1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-10 01:18:15 +03:00
Commit Graph

201 Commits

Author SHA1 Message Date
Andrew Bartlett
589a42e2da s4:auth Change auth_generate_session_info to take an auth context
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
2010-04-14 10:30:51 +10:00
Andrew Tridgell
b690fedef5 s4-waf: removed the AUTOGENERATED markers
we won't be using the mk -> wscript generator again
2010-04-06 20:27:16 +10:00
Andrew Tridgell
f9eae32f4b s4-waf: mark the wscript files as python so vim/emacs knows how to highlight them 2010-04-06 20:27:11 +10:00
Andrew Tridgell
844acb2260 build: waf quicktest nearly works
Rewrote wafsamba using a new dependency handling system, and started
adding the waf test code
2010-04-06 20:26:48 +10:00
Andrew Tridgell
845e0cbe6f build: commit all the waf build files in the tree 2010-04-06 20:26:48 +10:00
Stefan Metzmacher
25a89b7015 s4:ntlmssp: move sign/seal states to a private ntlmssp_crypt_state union
metze

Signed-off-by: Günther Deschner <gd@samba.org>
2010-03-24 17:34:54 +01:00
Stefan Metzmacher
598bfdcfd8 s4:ntlmssp: make use of dump_arc4_state()
metze

Signed-off-by: Günther Deschner <gd@samba.org>
2010-03-24 17:34:54 +01:00
Stefan Metzmacher
48d8157879 s4:ntlmssp: copy dump_arc4_state() from source3
metze

Signed-off-by: Günther Deschner <gd@samba.org>
2010-03-24 17:34:53 +01:00
Stefan Metzmacher
a69260642e s4:ntlmssp: avoid usage of calc_ntlmv2_key_talloc()
metze

Signed-off-by: Günther Deschner <gd@samba.org>
2010-03-24 17:34:53 +01:00
Stefan Metzmacher
00f99a3df5 s4:ntlmssp: make use of calc_ntlmv2_key() for seal keys
metze

Signed-off-by: Günther Deschner <gd@samba.org>
2010-03-24 17:34:53 +01:00
Stefan Metzmacher
fc120dd758 s4:ntlmssp: add calc_ntlmv2_key() from source3
metze

Signed-off-by: Günther Deschner <gd@samba.org>
2010-03-24 17:34:53 +01:00
Stefan Metzmacher
e0c7d9c8aa s4:ntlmssp: rename calc_ntlmv2_key => calc_ntlmv2_key_talloc
metze

Signed-off-by: Günther Deschner <gd@samba.org>
2010-03-24 17:34:53 +01:00
Stefan Metzmacher
c64e6e0a0f s4:ntlmssp: inline ntlmssp_weakend_keys()
metze

Signed-off-by: Günther Deschner <gd@samba.org>
2010-03-24 17:34:52 +01:00
Stefan Metzmacher
3220c84b72 s4:ntlmssp: use a 'bool ok' helper variable to make the code more readable
metze

Signed-off-by: Günther Deschner <gd@samba.org>
2010-03-24 17:34:52 +01:00
Stefan Metzmacher
e669ee4c9d s4:ntlmssp: fix some formating
metze

Signed-off-by: Günther Deschner <gd@samba.org>
2010-03-24 17:34:52 +01:00
Stefan Metzmacher
44ce126b84 s4:ntlmssp: move doing_ntlm2 to ntlmssp_server_auth_state
metze

Signed-off-by: Günther Deschner <gd@samba.org>
2010-03-24 17:34:52 +01:00
Stefan Metzmacher
40395eee5b s4:ntlmssp: move NTLM2 session_nonce to ntlmssp_server_auth_state
metze

Signed-off-by: Günther Deschner <gd@samba.org>
2010-03-24 17:34:52 +01:00
Stefan Metzmacher
1b20f7192a s4:ntlmssp: move encrypted_session_key to ntlmssp_server_auth_state
metze

Signed-off-by: Günther Deschner <gd@samba.org>
2010-03-24 17:34:52 +01:00
Stefan Metzmacher
a56ae60851 s4:ntlmssp: keep a ntlmssp_server_auth_state to transport variables from preauth to postauth hooks
metze

Signed-off-by: Günther Deschner <gd@samba.org>
2010-03-24 17:34:52 +01:00
Stefan Metzmacher
a42cad635f s4:ntlmssp: remove unused server_multiple_authentications feature.
metze

Signed-off-by: Günther Deschner <gd@samba.org>
2010-03-24 17:34:52 +01:00
Stefan Metzmacher
d3e7266676 s4:ntlmssp: rename gensec_ntlmssp_state => ntlmssp_state
Inspired by the NTLMSSP merge work by Andrew Bartlett.

metze

Signed-off-by: Günther Deschner <gd@samba.org>
2010-03-24 17:34:51 +01:00
Stefan Metzmacher
706333856b s4:ntlmssp: split gensec_ntlmssp_unseal_packet() and ntlmssp_unseal_packet()
Inspired by the NTLMSSP merge work by Andrew Bartlett.

metze

Signed-off-by: Günther Deschner <gd@samba.org>
2010-03-24 17:34:51 +01:00
Stefan Metzmacher
d4c2f252da s4:ntlmssp: split gensec_ntlmssp_seal_packet() and ntlmssp_seal_packet()
Inspired by the NTLMSSP merge work by Andrew Bartlett.

metze

Signed-off-by: Günther Deschner <gd@samba.org>
2010-03-24 17:34:51 +01:00
Stefan Metzmacher
1564b2a94b s4:ntlmssp: split gensec_ntlmssp_check_packet() and ntlmssp_check_packet()
Inspired by the NTLMSSP merge work by Andrew Bartlett.

metze

Signed-off-by: Günther Deschner <gd@samba.org>
2010-03-24 17:34:51 +01:00
Stefan Metzmacher
23507c022f s4:ntlmssp: split gensec_ntlmssp_sign_packet() and ntlmssp_sign_packet()
Inspired by the NTLMSSP merge work by Andrew Bartlett.

metze

Signed-off-by: Günther Deschner <gd@samba.org>
2010-03-24 17:34:51 +01:00
Stefan Metzmacher
b47a849df2 s4:ntlmssp: make user a 'const char *' in (gensec_)ntlmssp_state
metze

Signed-off-by: Günther Deschner <gd@samba.org>
2010-03-24 17:34:51 +01:00
Stefan Metzmacher
36669bfcf1 s4:ntlmssp: remove server_name from (gensec_)ntlmssp_state and fill the server.* fields also for the client
Inspired by the NTLMSSP merge work by Andrew Bartlett.

metze

Signed-off-by: Günther Deschner <gd@samba.org>
2010-03-24 17:34:51 +01:00
Stefan Metzmacher
282a2d8591 s4:ntlmssp: calculate server names at startup and store them in (gensec_)ntlmssp_state->server.*
Inspired by the NTLMSSP merge work by Andrew Bartlett.

metze

Signed-off-by: Günther Deschner <gd@samba.org>
2010-03-24 17:34:50 +01:00
Stefan Metzmacher
133a3e4ce8 s4:ntlmssp: replace server_role by a server.is_standalone in (gensec_)ntlmssp_state
Inspired by the NTLMSSP merge work by Andrew Bartlett.

metze

Signed-off-by: Günther Deschner <gd@samba.org>
2010-03-24 17:34:50 +01:00
Stefan Metzmacher
c33e72b8c5 s4:ntlmssp: remove more whitespaces...
metze

Signed-off-by: Günther Deschner <gd@samba.org>
2010-03-24 17:34:50 +01:00
Stefan Metzmacher
4ab94f5836 s4:ntlmssp: add NTLMSSP_FEATURE_* flags from s3
metze

Signed-off-by: Günther Deschner <gd@samba.org>
2010-03-24 17:34:50 +01:00
Stefan Metzmacher
ee240799b6 s4:ntlmssp: keep struct gensec_ntlmssp_context in gensec_security->private_data
Inspired by the NTLMSSP merge work by Andrew Bartlett.

metze

Signed-off-by: Günther Deschner <gd@samba.org>
2010-03-24 17:34:50 +01:00
Stefan Metzmacher
a0522a5b26 s4:ntlmssp: remove gensec_security from (gensec_)ntlmssp_state
Inspired by the NTLMSSP merge work by Andrew Bartlett.

metze

Signed-off-by: Günther Deschner <gd@samba.org>
2010-03-24 17:34:50 +01:00
Stefan Metzmacher
32d822af81 s4:ntlmssp: remove backend specifix stuff from (gensec_)ntlmssp_state
Inspired by the NTLMSSP merge work by Andrew Bartlett.

metze

Signed-off-by: Günther Deschner <gd@samba.org>
2010-03-24 17:34:50 +01:00
Stefan Metzmacher
83cc137d5e s4:ntlmssp: create a gensec_ntlmssp_context between gensec_security and ntlmssp_state
Inspired by the NTLMSSP merge work by Andrew Bartlett.

metze

Signed-off-by: Günther Deschner <gd@samba.org>
2010-03-24 17:34:49 +01:00
Stefan Metzmacher
8df01705bf s4:ntlmssp: add definition of gensec_ntlmssp_context
Inspired by the NTLMSSP merge work by Andrew Bartlett.

metze

Signed-off-by: Günther Deschner <gd@samba.org>
2010-03-24 17:34:49 +01:00
Stefan Metzmacher
bd550df322 s4:ntlmssp: add a callback_private pointer to gensec_ntlmssp_state
We'll remove any gensec specific stuff from gensec_ntlmssp_state
and rename it to ntlmssp_state again.

Inspired by the NTLMSSP merge work by Andrew Bartlett.

metze

Signed-off-by: Günther Deschner <gd@samba.org>
2010-03-24 17:34:48 +01:00
Andrew Bartlett
a2286bad67 s4:ntlmssp Ensure that we always negotiate signing if we negotiate sealing.
Without this, a sealed LDAP connection to windows does not work.

Andrew Bartlett
2010-03-24 19:28:37 +11:00
Karolin Seeger
340797f3fa Fix typo in comments. 2010-03-03 16:03:13 +01:00
Stefan Metzmacher
d5cbfbb93a s4:ntlmssp: remove mem_ctx from check_password() callback to match s3
metze
2009-12-29 17:06:25 +01:00
Stefan Metzmacher
f31d144e70 s4:ntlmssp_server: always call ntlmssp_server_postauth() and decide there if it's a noop
metze
2009-12-29 17:06:25 +01:00
Stefan Metzmacher
994d34b949 s4:ntlmssp_server: don't use a mem_ctx for ntlmssp_server_auth()
metze
2009-12-29 17:06:25 +01:00
Stefan Metzmacher
3f04b60fb9 s4:ntlmssp_server: don't use mem_ctx in auth_ntlmssp_check_password()
metze
2009-12-29 17:06:24 +01:00
Stefan Metzmacher
7d4692fa43 s4:ntlmssp_server: clear session key in ntlmssp_server_preauth()
metze
2009-12-29 17:06:24 +01:00
Stefan Metzmacher
dea456089a s4:ntlmssp: use data_blob_null in ntlmssp_server_auth()
metze
2009-12-29 17:06:24 +01:00
Stefan Metzmacher
60b9434492 s4:ntlmssp_server: remove unused variable
metze
2009-12-29 17:06:23 +01:00
Stefan Metzmacher
a8e61ac084 s4:auth/ntlmssp: let get_challenge() return a NTSTATUS and fill a stack buffer
metze
2009-12-29 17:06:23 +01:00
Stefan Metzmacher
8ab62799ed s4:ntlmssp: fix whitespaces in ntlmssp.h
metze
2009-12-29 08:18:52 +01:00
Andrew Bartlett
585900deb5 s4:gensec Don't give a warning when Windows client connects with NTLM
We have had the workaround for a long time, but at the time the log
warnings remained.

Andrew Bartlett
2009-12-22 17:30:05 +11:00
Andrew Bartlett
0809696dbf s4:auth Change 'get_challenge' API to be more like Samba3
It is just easier to fill in the known to be 8 byte challenge than
stuff about with allocated pointers.

Andrew Bartlett
2009-12-22 17:29:15 +11:00