From 5e0f8cabee6ea9528e1bba6c0d3edc7014fb5922 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Wed, 20 Feb 2008 19:34:45 +0100 Subject: Make all auth module init functions public, since they are compiled with -fvisibility=hidden. Not doing this causes failures on Mac OS X. (This used to be commit 675bab738085cb5a9f17c1f159fbd97c4daafed2) --- source4/auth/auth_anonymous.c | 2 +- source4/auth/auth_developer.c | 2 +- source4/auth/auth_sam.c | 2 +- source4/auth/auth_unix.c | 2 +- source4/auth/auth_winbind.c | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) (limited to 'source4/auth') 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_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; -- cgit From 39a6495c86679d5e970012a0d1f5cd375e56450c Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Wed, 20 Feb 2008 19:40:20 +0100 Subject: Make more module init functions public, since they are compiled with -fvisibility=hidden. Not doing this causes failures on Mac OS X. (This used to be commit da1a9438bd89569077ef1eaa9dc977b5f9d62836) --- source4/auth/gensec/gensec_gssapi.c | 2 +- source4/auth/gensec/gensec_krb5.c | 2 +- source4/auth/gensec/schannel.c | 2 +- source4/auth/gensec/spnego.c | 2 +- source4/auth/ntlmssp/ntlmssp.c | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) (limited to 'source4/auth') diff --git a/source4/auth/gensec/gensec_gssapi.c b/source4/auth/gensec/gensec_gssapi.c index 87fa47646b..8361b115d7 100644 --- a/source4/auth/gensec/gensec_gssapi.c +++ b/source4/auth/gensec/gensec_gssapi.c @@ -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..d9addcaa3c 100644 --- a/source4/auth/gensec/gensec_krb5.c +++ b/source4/auth/gensec/gensec_krb5.c @@ -775,7 +775,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/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; -- cgit From 37deca2d41d74faa7abe060a21340263bd6d66f7 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Thu, 21 Feb 2008 14:16:02 +0100 Subject: Avoid use of global_loadparm. (This used to be commit c5a95bbe0ce55c29e135a9c6058bf192ec3bb546) --- source4/auth/gensec/gensec_gssapi.c | 2 +- source4/auth/gensec/gensec_krb5.c | 4 +++- source4/auth/kerberos/kerberos.h | 4 ++++ source4/auth/kerberos/kerberos_pac.c | 11 ++++++++--- 4 files changed, 16 insertions(+), 5 deletions(-) (limited to 'source4/auth') diff --git a/source4/auth/gensec/gensec_gssapi.c b/source4/auth/gensec/gensec_gssapi.c index 8361b115d7..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); diff --git a/source4/auth/gensec/gensec_krb5.c b/source4/auth/gensec/gensec_krb5.c index d9addcaa3c..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, 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, -- cgit From 263a77c5618daddb0c1e4f0ad0a922bca55faf0d Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Thu, 21 Feb 2008 15:45:32 +0100 Subject: Remove more uses of global_loadparm. (This used to be commit a1715b1f48ba44bd94844418cc9299649aaf1a5e) --- source4/auth/auth_util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source4/auth') 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, -- cgit