summaryrefslogtreecommitdiff
path: root/source4/auth/credentials
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2006-11-07 00:48:36 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:25:00 -0500
commit13dbee3ffea6065a826f010e50c9b4eb2c6ad109 (patch)
treeeede29a3bff4c6de3432c16f5555dc9640267327 /source4/auth/credentials
parentc755bb5025ee60ae41de9cc32d3fa54e3671941d (diff)
downloadsamba-13dbee3ffea6065a826f010e50c9b4eb2c6ad109.tar.gz
samba-13dbee3ffea6065a826f010e50c9b4eb2c6ad109.tar.bz2
samba-13dbee3ffea6065a826f010e50c9b4eb2c6ad109.zip
r19598: Ahead of a merge to current lorikeet-heimdal:
Break up auth/auth.h not to include the world. Add credentials_krb5.h with the kerberos dependent prototypes. Andrew Bartlett (This used to be commit 2b569c42e0fbb596ea82484d0e1cb22e193037b9)
Diffstat (limited to 'source4/auth/credentials')
-rw-r--r--source4/auth/credentials/config.mk14
-rw-r--r--source4/auth/credentials/credentials.c3
-rw-r--r--source4/auth/credentials/credentials_files.c1
-rw-r--r--source4/auth/credentials/credentials_krb5.c8
-rw-r--r--source4/auth/credentials/credentials_krb5.h34
-rw-r--r--source4/auth/credentials/credentials_ntlm.c1
6 files changed, 55 insertions, 6 deletions
diff --git a/source4/auth/credentials/config.mk b/source4/auth/credentials/config.mk
index aa1fdf896d..5bf7aa891f 100644
--- a/source4/auth/credentials/config.mk
+++ b/source4/auth/credentials/config.mk
@@ -5,10 +5,20 @@ PUBLIC_PROTO_HEADER = credentials_proto.h
PUBLIC_HEADERS = credentials.h
OBJ_FILES = credentials.o \
credentials_files.o \
- credentials_krb5.o \
credentials_ntlm.o
PUBLIC_DEPENDENCIES = \
- LIBCLI_AUTH SECRETS LIBCRYPTO HEIMDAL_GSSAPI
+ LIBCLI_AUTH SECRETS LIBCRYPTO
+PRIVATE_DEPENDENCIES = CREDENTIALS_KRB5
# End SUBSYSTEM CREDENTIALS
#################################
+#################################
+# Start SUBSYSTEM CREDENTIALS
+[SUBSYSTEM::CREDENTIALS_KRB5]
+PUBLIC_PROTO_HEADER = credentials_krb5_proto.h
+PUBLIC_HEADERS = credentials_krb5.h
+OBJ_FILES = credentials_krb5.o
+PUBLIC_DEPENDENCIES = \
+ HEIMDAL_GSSAPI
+# End SUBSYSTEM CREDENTIALS
+#################################
diff --git a/source4/auth/credentials/credentials.c b/source4/auth/credentials/credentials.c
index caaef3e0c2..d4db0a0180 100644
--- a/source4/auth/credentials/credentials.c
+++ b/source4/auth/credentials/credentials.c
@@ -24,7 +24,8 @@
#include "includes.h"
#include "librpc/gen_ndr/samr.h" /* for struct samrPassword */
-#include "auth/gensec/gensec.h"
+#include "auth/credentials/credentials.h"
+#include "auth/credentials/credentials_krb5.h"
#include "libcli/auth/libcli_auth.h"
/**
diff --git a/source4/auth/credentials/credentials_files.c b/source4/auth/credentials/credentials_files.c
index 53a6f39cd4..ecd89d2259 100644
--- a/source4/auth/credentials/credentials_files.c
+++ b/source4/auth/credentials/credentials_files.c
@@ -29,6 +29,7 @@
#include "system/filesys.h"
#include "db_wrap.h"
#include "auth/credentials/credentials.h"
+#include "auth/credentials/credentials_krb5.h"
/**
* Read a file descriptor, and parse it for a password (eg from a file or stdin)
diff --git a/source4/auth/credentials/credentials_krb5.c b/source4/auth/credentials/credentials_krb5.c
index 7d53caddfa..f0305fd360 100644
--- a/source4/auth/credentials/credentials_krb5.c
+++ b/source4/auth/credentials/credentials_krb5.c
@@ -25,6 +25,8 @@
#include "includes.h"
#include "system/kerberos.h"
#include "auth/kerberos/kerberos.h"
+#include "auth/credentials/credentials.h"
+#include "auth/credentials/credentials_krb5.h"
int cli_credentials_get_krb5_context(struct cli_credentials *cred,
struct smb_krb5_context **smb_krb5_context)
@@ -333,9 +335,9 @@ int cli_credentials_get_client_gss_creds(struct cli_credentials *cred,
to the credentials system.
*/
- int cli_credentials_set_client_gss_creds(struct cli_credentials *cred,
- gss_cred_id_t gssapi_cred,
- enum credentials_obtained obtained)
+int cli_credentials_set_client_gss_creds(struct cli_credentials *cred,
+ gss_cred_id_t gssapi_cred,
+ enum credentials_obtained obtained)
{
int ret;
OM_uint32 maj_stat, min_stat;
diff --git a/source4/auth/credentials/credentials_krb5.h b/source4/auth/credentials/credentials_krb5.h
new file mode 100644
index 0000000000..2bd38af5c7
--- /dev/null
+++ b/source4/auth/credentials/credentials_krb5.h
@@ -0,0 +1,34 @@
+/*
+ samba -- Unix SMB/CIFS implementation.
+
+ Client credentials structure
+
+ Copyright (C) Jelmer Vernooij 2004-2006
+ Copyright (C) Andrew Bartlett <abartlet@samba.org> 2005
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*/
+
+struct EncryptionKey;
+
+#include "heimdal/lib/gssapi/gssapi.h"
+
+struct ccache_container;
+
+struct gssapi_creds_container {
+ gss_cred_id_t creds;
+};
+
+#include "auth/credentials/credentials_krb5_proto.h"
diff --git a/source4/auth/credentials/credentials_ntlm.c b/source4/auth/credentials/credentials_ntlm.c
index 23838da888..5317032683 100644
--- a/source4/auth/credentials/credentials_ntlm.c
+++ b/source4/auth/credentials/credentials_ntlm.c
@@ -26,6 +26,7 @@
#include "librpc/gen_ndr/samr.h" /* for struct samrPassword */
#include "lib/crypto/crypto.h"
#include "libcli/auth/libcli_auth.h"
+#include "auth/credentials/credentials.h"
void cli_credentials_get_ntlm_username_domain(struct cli_credentials *cred, TALLOC_CTX *mem_ctx,
const char **username,