From 21fb9a47ea196087394a772c77687fa4aedd647f Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Wed, 21 Dec 2011 15:54:20 +1100 Subject: s3-librpc Use gensec_sig_size() instead of a fixed NTLMSSP_SIG_SIZE Signed-off-by: Stefan Metzmacher Autobuild-User: Stefan Metzmacher Autobuild-Date: Thu Dec 22 20:57:27 CET 2011 on sn-devel-104 --- source3/librpc/rpc/dcerpc_helpers.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'source3') diff --git a/source3/librpc/rpc/dcerpc_helpers.c b/source3/librpc/rpc/dcerpc_helpers.c index 206443434f..1e8edc3347 100644 --- a/source3/librpc/rpc/dcerpc_helpers.c +++ b/source3/librpc/rpc/dcerpc_helpers.c @@ -267,6 +267,7 @@ NTSTATUS dcerpc_guess_sizes(struct pipe_auth_data *auth, { size_t max_len; size_t mod_len; + struct gensec_security *gensec_security; struct schannel_state *schannel_auth; struct spnego_context *spnego_ctx; struct gse_context *gse_ctx; @@ -315,7 +316,9 @@ NTSTATUS dcerpc_guess_sizes(struct pipe_auth_data *auth, } switch (auth_type) { case SPNEGO_NTLMSSP: - *auth_len = NTLMSSP_SIG_SIZE; + gensec_security = talloc_get_type_abort(auth_ctx, + struct gensec_security); + *auth_len = gensec_sig_size(gensec_security, max_len); break; case SPNEGO_KRB5: @@ -334,7 +337,9 @@ NTSTATUS dcerpc_guess_sizes(struct pipe_auth_data *auth, break; case DCERPC_AUTH_TYPE_NTLMSSP: - *auth_len = NTLMSSP_SIG_SIZE; + gensec_security = talloc_get_type_abort(auth->auth_ctx, + struct gensec_security); + *auth_len = gensec_sig_size(gensec_security, max_len); break; case DCERPC_AUTH_TYPE_SCHANNEL: -- cgit