summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2012-01-02 20:22:38 +1100
committerStefan Metzmacher <metze@samba.org>2012-01-18 16:23:22 +0100
commit1b6356298ceeb21ebcb125e239316fb29ff623fc (patch)
tree91b96570f2124fbd7c819abb5e3a3835be28cf0a
parentd95d59138c6dc255f433e4d3c88b8afbc9ea0b26 (diff)
downloadsamba-1b6356298ceeb21ebcb125e239316fb29ff623fc.tar.gz
samba-1b6356298ceeb21ebcb125e239316fb29ff623fc.tar.bz2
samba-1b6356298ceeb21ebcb125e239316fb29ff623fc.zip
s3-libsmb Use the gse_krb5 gensec module as client
Signed-off-by: Stefan Metzmacher <metze@samba.org>
-rw-r--r--source3/libsmb/auth_generic.c7
-rwxr-xr-xsource3/wscript_build2
2 files changed, 7 insertions, 2 deletions
diff --git a/source3/libsmb/auth_generic.c b/source3/libsmb/auth_generic.c
index 42669f7232..39d14f6fe0 100644
--- a/source3/libsmb/auth_generic.c
+++ b/source3/libsmb/auth_generic.c
@@ -25,6 +25,7 @@
#include "auth/credentials/credentials.h"
#include "librpc/rpc/dcerpc.h"
#include "lib/param/param.h"
+#include "librpc/crypto/gse.h"
NTSTATUS auth_generic_set_username(struct auth_generic_state *ans,
const char *user)
@@ -75,7 +76,7 @@ NTSTATUS auth_generic_client_prepare(TALLOC_CTX *mem_ctx, struct auth_generic_st
return NT_STATUS_NO_MEMORY;
}
- gensec_settings->backends = talloc_zero_array(gensec_settings, struct gensec_security_ops *, 2);
+ gensec_settings->backends = talloc_zero_array(gensec_settings, struct gensec_security_ops *, 3);
if (gensec_settings->backends == NULL) {
TALLOC_FREE(ans);
return NT_STATUS_NO_MEMORY;
@@ -83,6 +84,10 @@ NTSTATUS auth_generic_client_prepare(TALLOC_CTX *mem_ctx, struct auth_generic_st
gensec_settings->backends[0] = &gensec_ntlmssp3_client_ops;
+#if defined(HAVE_KRB5) && defined(HAVE_GSS_WRAP_IOV)
+ gensec_settings->backends[1] = &gensec_gse_krb5_security_ops;
+#endif
+
nt_status = gensec_client_start(ans, &ans->gensec_security, gensec_settings);
if (!NT_STATUS_IS_OK(nt_status)) {
diff --git a/source3/wscript_build b/source3/wscript_build
index 89e312e400..407dcc5ea1 100755
--- a/source3/wscript_build
+++ b/source3/wscript_build
@@ -833,7 +833,7 @@ bld.SAMBA3_SUBSYSTEM('LIBNTLMSSP',
bld.SAMBA3_SUBSYSTEM('auth_generic',
source='libsmb/auth_generic.c',
- deps='LIBNTLMSSP gensec',
+ deps='LIBNTLMSSP gse gensec',
vars=locals())
bld.SAMBA3_LIBRARY('libsmb',