summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/krb5_wrap/krb5_samba.c5
-rw-r--r--lib/krb5_wrap/krb5_samba.h2
-rw-r--r--source3/librpc/crypto/gse.c7
-rw-r--r--source3/libsmb/cliconnect.c7
4 files changed, 13 insertions, 8 deletions
diff --git a/lib/krb5_wrap/krb5_samba.c b/lib/krb5_wrap/krb5_samba.c
index e3199f0a839..b1299000fc0 100644
--- a/lib/krb5_wrap/krb5_samba.c
+++ b/lib/krb5_wrap/krb5_samba.c
@@ -2683,7 +2683,7 @@ static char *smb_krb5_get_realm_from_hostname(TALLOC_CTX *mem_ctx,
return realm;
}
-char *kerberos_get_principal_from_service_hostname(TALLOC_CTX *mem_ctx,
+char *smb_krb5_get_principal_from_service_hostname(TALLOC_CTX *mem_ctx,
const char *service,
const char *remote_name,
const char *default_realm)
@@ -2706,8 +2706,7 @@ char *kerberos_get_principal_from_service_hostname(TALLOC_CTX *mem_ctx,
if (!realm) {
return NULL;
}
- DEBUG(3,("kerberos_get_principal_from_service_hostname: "
- "cannot get realm from, "
+ DEBUG(3,("Cannot get realm from, "
"desthost %s or default ccache. Using default "
"smb.conf realm %s\n",
remote_name,
diff --git a/lib/krb5_wrap/krb5_samba.h b/lib/krb5_wrap/krb5_samba.h
index 7a8c7f65ec1..5c4b9bfff29 100644
--- a/lib/krb5_wrap/krb5_samba.h
+++ b/lib/krb5_wrap/krb5_samba.h
@@ -318,7 +318,7 @@ krb5_error_code smb_krb5_principal_set_realm(krb5_context context,
krb5_principal principal,
const char *realm);
-char *kerberos_get_principal_from_service_hostname(TALLOC_CTX *mem_ctx,
+char *smb_krb5_get_principal_from_service_hostname(TALLOC_CTX *mem_ctx,
const char *service,
const char *remote_name,
const char *default_realm);
diff --git a/source3/librpc/crypto/gse.c b/source3/librpc/crypto/gse.c
index 1d44fbe3ea9..7ec2ceccb1a 100644
--- a/source3/librpc/crypto/gse.c
+++ b/source3/librpc/crypto/gse.c
@@ -228,8 +228,11 @@ static NTSTATUS gse_init_client(TALLOC_CTX *mem_ctx,
realm in particular), possibly falling back to
GSS_C_NT_HOSTBASED_SERVICE
*/
- name_buffer.value = kerberos_get_principal_from_service_hostname(
- gse_ctx, service, server, lp_realm());
+ name_buffer.value =
+ smb_krb5_get_principal_from_service_hostname(gse_ctx,
+ service,
+ server,
+ lp_realm());
if (!name_buffer.value) {
status = NT_STATUS_NO_MEMORY;
goto err_out;
diff --git a/source3/libsmb/cliconnect.c b/source3/libsmb/cliconnect.c
index 9c8851f7656..e6deb9d17fe 100644
--- a/source3/libsmb/cliconnect.c
+++ b/source3/libsmb/cliconnect.c
@@ -1750,8 +1750,11 @@ static char *cli_session_setup_get_principal(
remote_name, realm);
TALLOC_FREE(realm);
} else {
- principal = kerberos_get_principal_from_service_hostname(
- talloc_tos(), "cifs", remote_name, lp_realm());
+ principal =
+ smb_krb5_get_principal_from_service_hostname(talloc_tos(),
+ "cifs",
+ remote_name,
+ lp_realm());
}
DEBUG(3, ("cli_session_setup_spnego: guessed server principal=%s\n",
principal ? principal : "<null>"));