1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-25 23:21:54 +03:00
samba-mirror/source4/auth/gensec
Andreas Schneider 18692b060f s4-auth: Make sure we use the correct credential state.
If we create a copy of the credential state we miss updates to the
credentials.

To establish a netlogon schannel connection we create client credentials
and authenticate with them using

dcerpc_netr_ServerAuthenticate2()

For this we call netlogon_creds_client_authenticator() which increases
the sequence number and steps the credentials. Lets assume the sequence
number is 1002.

After a successful authentication we get the server credentials and we
send bind a auth request with the received creds. This sets up gensec
and the gensec schannel module created a copy of the client creds and
stores it in the schannel auth state. So the creds stored in gensec have
the sequence number 1002.

After that we continue and need the client credentials to call

dcerpc_netr_LogonGetCapabilities()

to verify the connection. So we need to increase the sequence number of
the credentials to 1004 and step the credentials to the next state. The
server always does the same and everything is just fine here.

The connection is established and we want to do another netlogon call.
So we get the creds from gensec and want to do a netlogon call e.g.

dcerpc_netr_SamLogonWithFlags.

We get the needed creds from gensec. The sequence number is 1002 and
we talk to the server. The server is already ahead cause we are already
at sequence number 1004 and the server expects it to be 1006. So the
server gives us ACCESS_DENIED cause we use a copy in gensec.

Signed-off-by: Günther Deschner <gd@samba.org>
2012-07-17 13:26:37 +02:00
..
cyrus_sasl.c s4-gensec: fix cyrus sasl module after update() protype change 2011-12-29 09:36:24 +11:00
gensec_gssapi.c gse: Use the smb_gss_oid_equal wrapper. 2012-05-23 17:51:51 +03:00
gensec_gssapi.h s4:auth/gensec_gssapi: remember the expire time 2012-05-17 20:04:31 +02:00
gensec_krb5_util.c s4-auth-krb: smb_rd_req_return_stuff is used only in gensec_krb5 2012-05-04 16:51:28 +02:00
gensec_krb5_util.h s4-auth-krb: smb_rd_req_return_stuff is used only in gensec_krb5 2012-05-04 16:51:28 +02:00
gensec_krb5.c s4:gensec: fix a comment typo 2012-06-12 07:21:45 +02:00
gensec_socket.h gensec: split GENSEC into mechanism-dependent and runtime functions 2011-08-03 18:48:01 +10:00
gensec_tstream.c gensec: split GENSEC into mechanism-dependent and runtime functions 2011-08-03 18:48:01 +10:00
gensec_tstream.h s4:gensec: add gensec_create_tstream() 2010-09-28 03:48:11 +02:00
pygensec.c pygensec: Fix init of variable if not specified. 2012-05-18 04:50:17 +02:00
schannel.c s4-auth: Make sure we use the correct credential state. 2012-07-17 13:26:37 +02:00
schannel.h gensec: split GENSEC into mechanism-dependent and runtime functions 2011-08-03 18:48:01 +10:00
socket.c auth/gensec: common helper functions should be in gensec_util.c 2012-01-13 04:58:41 +01:00
wscript_build Introduce system MIT krb5 build with --with-system-mitkrb5 option. 2012-05-23 17:51:50 +03:00