summaryrefslogtreecommitdiff
path: root/source3/librpc
diff options
context:
space:
mode:
authorSimo Sorce <idra@samba.org>2010-07-28 17:06:14 -0400
committerSimo Sorce <idra@samba.org>2010-07-28 17:12:57 -0400
commite8ac4a8b82798ef0691d384f59d880dc38b56592 (patch)
treed6107c4a3ec213622dc47352d6fd2784b6597dd9 /source3/librpc
parent7c9c075987e7cdb2d5cb6311876f088f907e46f2 (diff)
downloadsamba-e8ac4a8b82798ef0691d384f59d880dc38b56592.tar.gz
samba-e8ac4a8b82798ef0691d384f59d880dc38b56592.tar.bz2
samba-e8ac4a8b82798ef0691d384f59d880dc38b56592.zip
s3-dcerpc: Try to fix build when gssapi_ext.h is not available
Diffstat (limited to 'source3/librpc')
-rw-r--r--source3/librpc/rpc/dcerpc_gssapi.c82
1 files changed, 39 insertions, 43 deletions
diff --git a/source3/librpc/rpc/dcerpc_gssapi.c b/source3/librpc/rpc/dcerpc_gssapi.c
index 56f2a53c91..c9496ab290 100644
--- a/source3/librpc/rpc/dcerpc_gssapi.c
+++ b/source3/librpc/rpc/dcerpc_gssapi.c
@@ -20,12 +20,13 @@
/* We support only GSSAPI/KRB5 here */
#include "includes.h"
+#include "dcerpc_gssapi.h"
+
+#if defined(HAVE_GSSAPI_GSSAPI_EXT_H) && defined(HAVE_GSS_WRAP_IOV)
+
#include <gssapi/gssapi.h>
#include <gssapi/gssapi_krb5.h>
#include <gssapi/gssapi_ext.h>
-#include "dcerpc_gssapi.h"
-
-#ifdef HAVE_GSSAPI_H
static char *gse_errstr(TALLOC_CTX *mem_ctx, OM_uint32 maj, OM_uint32 min);
@@ -352,43 +353,6 @@ DATA_BLOB gse_get_session_key(struct gse_context *gse_ctx)
return gse_ctx->session_key;
}
-#else /* HAVE_GSSAPI_H */
-
-NTSTATUS gse_init_client(TALLOC_CTX *mem_ctx,
- enum dcerpc_AuthType auth_type,
- enum dcerpc_AuthLevel auth_level,
- const char *ccache_name,
- const char *server,
- const char *service,
- const char *username,
- const char *password,
- uint32_t add_gss_c_flags,
- struct pipe_auth_data **_auth)
-{
- return NT_STATUS_NOT_IMPLEMENTED;
-}
-
-NTSTATUS gse_gen_client_auth_token(TALLOC_CTX *mem_ctx,
- struct gse_context *gse_ctx,
- DATA_BLOB *auth_blob)
-{
- return NT_STATUS_NOT_IMPLEMENTED;
-}
-
-bool gse_require_more_processing(struct gse_context *gse_ctx)
-{
- return NT_STATUS_NOT_IMPLEMENTED;
-}
-
-DATA_BLOB gse_get_session_key(struct gse_context *gse_ctx)
-{
- return data_blob_null;
-}
-
-#endif /* HAVE_GSSAPI_H */
-
-#ifdef HAVE_GSS_WRAP_IOV
-
size_t gse_get_signature_length(struct gse_context *gse_ctx,
int seal, size_t payload_size)
{
@@ -574,12 +538,44 @@ done:
return status;
}
-#else /* HAVE_GSS_WRAP_IOV */
+#else
+
+NTSTATUS gse_init_client(TALLOC_CTX *mem_ctx,
+ enum dcerpc_AuthType auth_type,
+ enum dcerpc_AuthLevel auth_level,
+ const char *ccache_name,
+ const char *server,
+ const char *service,
+ const char *username,
+ const char *password,
+ uint32_t add_gss_c_flags,
+ struct gse_context **_gse_ctx)
+{
+ return NT_STATUS_NOT_IMPLEMENTED;
+}
+
+NTSTATUS gse_get_client_auth_token(TALLOC_CTX *mem_ctx,
+ struct gse_context *gse_ctx,
+ DATA_BLOB *token_in,
+ DATA_BLOB *token_out)
+{
+ return NT_STATUS_NOT_IMPLEMENTED;
+}
+
+bool gse_require_more_processing(struct gse_context *gse_ctx)
+{
+ return false;
+}
+
+DATA_BLOB gse_get_session_key(struct gse_context *gse_ctx)
+{
+ return data_blob_null;
+}
size_t gse_get_signature_length(struct gse_context *gse_ctx,
int seal, size_t payload_size)
{
- return NT_STATUS_NOT_IMPLEMENTED;
+ return 0;
}
NTSTATUS gse_seal(TALLOC_CTX *mem_ctx, struct gse_context *gse_ctx,
@@ -606,4 +602,4 @@ NTSTATUS gse_sigcheck(TALLOC_CTX *mem_ctx, struct gse_context *gse_ctx,
return NT_STATUS_NOT_IMPLEMENTED;
}
-#endif /* HAVE_GSS_WRAP_IOV */
+#endif /* HAVE_GSSAPI_EXT_H && HAVE_GSS_WRAP_IOV */