summaryrefslogtreecommitdiff
path: root/source4/auth
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2008-02-25 12:58:09 +0100
committerJelmer Vernooij <jelmer@samba.org>2008-02-25 12:58:09 +0100
commit584c4a518f4d18452b6515db132e4f75fba733a1 (patch)
treebbe367f36f092f233d7aefb61d75d5d1e1e85031 /source4/auth
parent03ab8f9d79f2a06b357b2f5d392ea8b5be263c5e (diff)
parent71943b209b181e1e4a65ab477b83780add7051ae (diff)
downloadsamba-584c4a518f4d18452b6515db132e4f75fba733a1.tar.gz
samba-584c4a518f4d18452b6515db132e4f75fba733a1.tar.bz2
samba-584c4a518f4d18452b6515db132e4f75fba733a1.zip
Merge branch 'v4-0-test' of ssh://git.samba.org/data/git/samba into v4-0-gmake3
Conflicts: source/build/smb_build/header.pm source/build/smb_build/makefile.pm source/lib/ldb/include/ldb_private.h (This used to be commit 1a646af0647f021d99473a8991c35e616a423ea6)
Diffstat (limited to 'source4/auth')
-rw-r--r--source4/auth/auth_anonymous.c2
-rw-r--r--source4/auth/auth_developer.c2
-rw-r--r--source4/auth/auth_sam.c2
-rw-r--r--source4/auth/auth_unix.c2
-rw-r--r--source4/auth/auth_util.c2
-rw-r--r--source4/auth/auth_winbind.c2
-rw-r--r--source4/auth/gensec/gensec_gssapi.c4
-rw-r--r--source4/auth/gensec/gensec_krb5.c6
-rw-r--r--source4/auth/gensec/schannel.c2
-rw-r--r--source4/auth/gensec/spnego.c2
-rw-r--r--source4/auth/kerberos/kerberos.h4
-rw-r--r--source4/auth/kerberos/kerberos_pac.c11
-rw-r--r--source4/auth/ntlmssp/ntlmssp.c2
13 files changed, 27 insertions, 16 deletions
diff --git a/source4/auth/auth_anonymous.c b/source4/auth/auth_anonymous.c
index bcab918347..38c13d4b65 100644
--- a/source4/auth/auth_anonymous.c
+++ b/source4/auth/auth_anonymous.c
@@ -63,7 +63,7 @@ static const struct auth_operations anonymous_auth_ops = {
.check_password = anonymous_check_password
};
-NTSTATUS auth_anonymous_init(void)
+_PUBLIC_ NTSTATUS auth_anonymous_init(void)
{
NTSTATUS ret;
diff --git a/source4/auth/auth_developer.c b/source4/auth/auth_developer.c
index 57eb752ac8..0da947b68d 100644
--- a/source4/auth/auth_developer.c
+++ b/source4/auth/auth_developer.c
@@ -186,7 +186,7 @@ static const struct auth_operations fixed_challenge_auth_ops = {
.check_password = fixed_challenge_check_password
};
-NTSTATUS auth_developer_init(void)
+_PUBLIC_ NTSTATUS auth_developer_init(void)
{
NTSTATUS ret;
diff --git a/source4/auth/auth_sam.c b/source4/auth/auth_sam.c
index 0885d8265a..9189640150 100644
--- a/source4/auth/auth_sam.c
+++ b/source4/auth/auth_sam.c
@@ -425,7 +425,7 @@ static const struct auth_operations sam_ops = {
.check_password = authsam_check_password
};
-NTSTATUS auth_sam_init(void)
+_PUBLIC_ NTSTATUS auth_sam_init(void)
{
NTSTATUS ret;
diff --git a/source4/auth/auth_unix.c b/source4/auth/auth_unix.c
index 62fb42935a..20e198701d 100644
--- a/source4/auth/auth_unix.c
+++ b/source4/auth/auth_unix.c
@@ -829,7 +829,7 @@ static const struct auth_operations unix_ops = {
.check_password = authunix_check_password
};
-NTSTATUS auth_unix_init(void)
+_PUBLIC_ NTSTATUS auth_unix_init(void)
{
NTSTATUS ret;
diff --git a/source4/auth/auth_util.c b/source4/auth/auth_util.c
index b1f0e60507..5d2bc6bac0 100644
--- a/source4/auth/auth_util.c
+++ b/source4/auth/auth_util.c
@@ -144,7 +144,7 @@ NTSTATUS encrypt_user_info(TALLOC_CTX *mem_ctx, struct auth_context *auth_contex
chall_blob = data_blob_talloc(mem_ctx, challenge, 8);
if (lp_client_ntlmv2_auth(auth_context->lp_ctx)) {
- DATA_BLOB names_blob = NTLMv2_generate_names_blob(mem_ctx, lp_netbios_name(auth_context->lp_ctx), lp_workgroup(auth_context->lp_ctx));
+ DATA_BLOB names_blob = NTLMv2_generate_names_blob(mem_ctx, lp_iconv_convenience(auth_context->lp_ctx), lp_netbios_name(auth_context->lp_ctx), lp_workgroup(auth_context->lp_ctx));
DATA_BLOB lmv2_response, ntlmv2_response, lmv2_session_key, ntlmv2_session_key;
if (!SMBNTLMv2encrypt_hash(user_info_temp,
diff --git a/source4/auth/auth_winbind.c b/source4/auth/auth_winbind.c
index 89ae3195df..2f8074d3cb 100644
--- a/source4/auth/auth_winbind.c
+++ b/source4/auth/auth_winbind.c
@@ -260,7 +260,7 @@ static const struct auth_operations winbind_ops = {
.check_password = winbind_check_password
};
-NTSTATUS auth_winbind_init(void)
+_PUBLIC_ NTSTATUS auth_winbind_init(void)
{
NTSTATUS ret;
diff --git a/source4/auth/gensec/gensec_gssapi.c b/source4/auth/gensec/gensec_gssapi.c
index 87fa47646b..d8cdb90197 100644
--- a/source4/auth/gensec/gensec_gssapi.c
+++ b/source4/auth/gensec/gensec_gssapi.c
@@ -1298,7 +1298,7 @@ static NTSTATUS gensec_gssapi_session_info(struct gensec_security *gensec_securi
}
/* decode and verify the pac */
- nt_status = kerberos_pac_logon_info(mem_ctx, &logon_info, pac_blob,
+ nt_status = kerberos_pac_logon_info(mem_ctx, lp_iconv_convenience(gensec_security->lp_ctx), &logon_info, pac_blob,
gensec_gssapi_state->smb_krb5_context->krb5_context,
NULL, keyblock, principal, authtime, NULL);
krb5_free_principal(gensec_gssapi_state->smb_krb5_context->krb5_context, principal);
@@ -1463,7 +1463,7 @@ static const struct gensec_security_ops gensec_gssapi_sasl_krb5_security_ops = {
.priority = GENSEC_GSSAPI
};
-NTSTATUS gensec_gssapi_init(void)
+_PUBLIC_ NTSTATUS gensec_gssapi_init(void)
{
NTSTATUS ret;
diff --git a/source4/auth/gensec/gensec_krb5.c b/source4/auth/gensec/gensec_krb5.c
index 5cd0de1ceb..88432c7f89 100644
--- a/source4/auth/gensec/gensec_krb5.c
+++ b/source4/auth/gensec/gensec_krb5.c
@@ -617,7 +617,9 @@ static NTSTATUS gensec_krb5_session_info(struct gensec_security *gensec_security
}
/* decode and verify the pac */
- nt_status = kerberos_pac_logon_info(gensec_krb5_state, &logon_info, pac,
+ nt_status = kerberos_pac_logon_info(gensec_krb5_state,
+ lp_iconv_convenience(gensec_security->lp_ctx),
+ &logon_info, pac,
gensec_krb5_state->smb_krb5_context->krb5_context,
NULL, gensec_krb5_state->keyblock,
client_principal,
@@ -775,7 +777,7 @@ static const struct gensec_security_ops gensec_krb5_security_ops = {
.priority = GENSEC_KRB5
};
-NTSTATUS gensec_krb5_init(void)
+_PUBLIC_ NTSTATUS gensec_krb5_init(void)
{
NTSTATUS ret;
diff --git a/source4/auth/gensec/schannel.c b/source4/auth/gensec/schannel.c
index 42db959380..96e3478982 100644
--- a/source4/auth/gensec/schannel.c
+++ b/source4/auth/gensec/schannel.c
@@ -274,7 +274,7 @@ static const struct gensec_security_ops gensec_schannel_security_ops = {
.priority = GENSEC_SCHANNEL
};
-NTSTATUS gensec_schannel_init(void)
+_PUBLIC_ NTSTATUS gensec_schannel_init(void)
{
NTSTATUS ret;
ret = gensec_register(&gensec_schannel_security_ops);
diff --git a/source4/auth/gensec/spnego.c b/source4/auth/gensec/spnego.c
index 782aa44c75..f593d17d4b 100644
--- a/source4/auth/gensec/spnego.c
+++ b/source4/auth/gensec/spnego.c
@@ -1042,7 +1042,7 @@ static const struct gensec_security_ops gensec_spnego_security_ops = {
.priority = GENSEC_SPNEGO
};
-NTSTATUS gensec_spnego_init(void)
+_PUBLIC_ NTSTATUS gensec_spnego_init(void)
{
NTSTATUS ret;
ret = gensec_register(&gensec_spnego_security_ops);
diff --git a/source4/auth/kerberos/kerberos.h b/source4/auth/kerberos/kerberos.h
index bafd58a048..8585aa321b 100644
--- a/source4/auth/kerberos/kerberos.h
+++ b/source4/auth/kerberos/kerberos.h
@@ -111,6 +111,7 @@ krb5_error_code principal_from_credentials(TALLOC_CTX *parent_ctx,
struct smb_krb5_context *smb_krb5_context,
krb5_principal *princ);
NTSTATUS kerberos_decode_pac(TALLOC_CTX *mem_ctx,
+ struct smb_iconv_convenience *iconv_convenience,
struct PAC_DATA **pac_data_out,
DATA_BLOB blob,
krb5_context context,
@@ -120,6 +121,7 @@ NTSTATUS kerberos_decode_pac(TALLOC_CTX *mem_ctx,
time_t tgs_authtime,
krb5_error_code *k5ret);
NTSTATUS kerberos_pac_logon_info(TALLOC_CTX *mem_ctx,
+ struct smb_iconv_convenience *iconv_convenience,
struct PAC_LOGON_INFO **logon_info,
DATA_BLOB blob,
krb5_context context,
@@ -129,12 +131,14 @@ NTSTATUS kerberos_decode_pac(TALLOC_CTX *mem_ctx,
time_t tgs_authtime,
krb5_error_code *k5ret);
krb5_error_code kerberos_encode_pac(TALLOC_CTX *mem_ctx,
+ struct smb_iconv_convenience *iconv_convenience,
struct PAC_DATA *pac_data,
krb5_context context,
const krb5_keyblock *krbtgt_keyblock,
const krb5_keyblock *service_keyblock,
DATA_BLOB *pac);
krb5_error_code kerberos_create_pac(TALLOC_CTX *mem_ctx,
+ struct smb_iconv_convenience *iconv_convenience,
struct auth_serversupplied_info *server_info,
krb5_context context,
const krb5_keyblock *krbtgt_keyblock,
diff --git a/source4/auth/kerberos/kerberos_pac.c b/source4/auth/kerberos/kerberos_pac.c
index c46e06bc72..e485f75302 100644
--- a/source4/auth/kerberos/kerberos_pac.c
+++ b/source4/auth/kerberos/kerberos_pac.c
@@ -66,6 +66,7 @@ static krb5_error_code check_pac_checksum(TALLOC_CTX *mem_ctx,
}
NTSTATUS kerberos_decode_pac(TALLOC_CTX *mem_ctx,
+ struct smb_iconv_convenience *iconv_convenience,
struct PAC_DATA **pac_data_out,
DATA_BLOB blob,
krb5_context context,
@@ -86,7 +87,6 @@ static krb5_error_code check_pac_checksum(TALLOC_CTX *mem_ctx,
struct PAC_LOGON_NAME *logon_name = NULL;
struct PAC_DATA *pac_data;
struct PAC_DATA_RAW *pac_data_raw;
- struct smb_iconv_convenience *iconv_convenience = lp_iconv_convenience(global_loadparm);
DATA_BLOB *srv_sig_blob = NULL;
DATA_BLOB *kdc_sig_blob = NULL;
@@ -340,6 +340,7 @@ static krb5_error_code check_pac_checksum(TALLOC_CTX *mem_ctx,
}
_PUBLIC_ NTSTATUS kerberos_pac_logon_info(TALLOC_CTX *mem_ctx,
+ struct smb_iconv_convenience *iconv_convenience,
struct PAC_LOGON_INFO **logon_info,
DATA_BLOB blob,
krb5_context context,
@@ -352,7 +353,9 @@ _PUBLIC_ NTSTATUS kerberos_pac_logon_info(TALLOC_CTX *mem_ctx,
NTSTATUS nt_status;
struct PAC_DATA *pac_data;
int i;
- nt_status = kerberos_decode_pac(mem_ctx, &pac_data,
+ nt_status = kerberos_decode_pac(mem_ctx,
+ iconv_convenience,
+ &pac_data,
blob,
context,
krbtgt_keyblock,
@@ -423,6 +426,7 @@ static krb5_error_code make_pac_checksum(TALLOC_CTX *mem_ctx,
}
krb5_error_code kerberos_encode_pac(TALLOC_CTX *mem_ctx,
+ struct smb_iconv_convenience *iconv_convenience,
struct PAC_DATA *pac_data,
krb5_context context,
const krb5_keyblock *krbtgt_keyblock,
@@ -437,7 +441,6 @@ static krb5_error_code make_pac_checksum(TALLOC_CTX *mem_ctx,
struct PAC_SIGNATURE_DATA *kdc_checksum = NULL;
struct PAC_SIGNATURE_DATA *srv_checksum = NULL;
int i;
- struct smb_iconv_convenience *iconv_convenience = lp_iconv_convenience(global_loadparm);
/* First, just get the keytypes filled in (and lengths right, eventually) */
for (i=0; i < pac_data->num_buffers; i++) {
@@ -528,6 +531,7 @@ static krb5_error_code make_pac_checksum(TALLOC_CTX *mem_ctx,
krb5_error_code kerberos_create_pac(TALLOC_CTX *mem_ctx,
+ struct smb_iconv_convenience *iconv_convenience,
struct auth_serversupplied_info *server_info,
krb5_context context,
const krb5_keyblock *krbtgt_keyblock,
@@ -640,6 +644,7 @@ static krb5_error_code make_pac_checksum(TALLOC_CTX *mem_ctx,
unix_to_nt_time(&LOGON_NAME->logon_time, tgs_authtime);
ret = kerberos_encode_pac(mem_ctx,
+ iconv_convenience,
pac_data,
context,
krbtgt_keyblock,
diff --git a/source4/auth/ntlmssp/ntlmssp.c b/source4/auth/ntlmssp/ntlmssp.c
index 4f5822567a..8901488004 100644
--- a/source4/auth/ntlmssp/ntlmssp.c
+++ b/source4/auth/ntlmssp/ntlmssp.c
@@ -425,7 +425,7 @@ static const struct gensec_security_ops gensec_ntlmssp_security_ops = {
};
-NTSTATUS gensec_ntlmssp_init(void)
+_PUBLIC_ NTSTATUS gensec_ntlmssp_init(void)
{
NTSTATUS ret;