summaryrefslogtreecommitdiff
path: root/source3/librpc
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2011-12-21 15:54:20 +1100
committerStefan Metzmacher <metze@samba.org>2011-12-22 20:57:27 +0100
commit21fb9a47ea196087394a772c77687fa4aedd647f (patch)
tree167ed7cd7b836c701467cf920214ede715650f2c /source3/librpc
parent06498637bb4d71787f6e903e7dc58466b1d660d2 (diff)
downloadsamba-21fb9a47ea196087394a772c77687fa4aedd647f.tar.gz
samba-21fb9a47ea196087394a772c77687fa4aedd647f.tar.bz2
samba-21fb9a47ea196087394a772c77687fa4aedd647f.zip
s3-librpc Use gensec_sig_size() instead of a fixed NTLMSSP_SIG_SIZE
Signed-off-by: Stefan Metzmacher <metze@samba.org> Autobuild-User: Stefan Metzmacher <metze@samba.org> Autobuild-Date: Thu Dec 22 20:57:27 CET 2011 on sn-devel-104
Diffstat (limited to 'source3/librpc')
-rw-r--r--source3/librpc/rpc/dcerpc_helpers.c9
1 files changed, 7 insertions, 2 deletions
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: