1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-11 05:18:09 +03:00

s3-auth Rename smb_krb5_open_keytab to avoid a conflict with s3

The s3 function doesn't use the keytab_container concept.

Andrew Bartlett
This commit is contained in:
Andrew Bartlett 2011-04-14 15:42:42 +10:00
parent 4ba1375526
commit bbeba18b1c
2 changed files with 9 additions and 9 deletions

View File

@ -663,8 +663,8 @@ _PUBLIC_ int cli_credentials_set_keytab_name(struct cli_credentials *cred,
return ENOMEM;
}
ret = smb_krb5_open_keytab(mem_ctx, smb_krb5_context,
keytab_name, &ktc);
ret = smb_krb5_get_keytab_container(mem_ctx, smb_krb5_context,
keytab_name, &ktc);
if (ret) {
return ret;
}

View File

@ -489,14 +489,14 @@ krb5_error_code principal_from_credentials(TALLOC_CTX *parent_ctx,
return 0;
}
static krb5_error_code free_keytab(struct keytab_container *ktc)
static krb5_error_code free_keytab_container(struct keytab_container *ktc)
{
return krb5_kt_close(ktc->smb_krb5_context->krb5_context, ktc->keytab);
}
krb5_error_code smb_krb5_open_keytab(TALLOC_CTX *mem_ctx,
struct smb_krb5_context *smb_krb5_context,
const char *keytab_name, struct keytab_container **ktc)
krb5_error_code smb_krb5_get_keytab_container(TALLOC_CTX *mem_ctx,
struct smb_krb5_context *smb_krb5_context,
const char *keytab_name, struct keytab_container **ktc)
{
krb5_keytab keytab;
krb5_error_code ret;
@ -515,7 +515,7 @@ krb5_error_code smb_krb5_open_keytab(TALLOC_CTX *mem_ctx,
(*ktc)->smb_krb5_context = talloc_reference(*ktc, smb_krb5_context);
(*ktc)->keytab = keytab;
talloc_set_destructor(*ktc, free_keytab);
talloc_set_destructor(*ktc, free_keytab_container);
return 0;
}
@ -809,7 +809,7 @@ krb5_error_code smb_krb5_update_keytab(TALLOC_CTX *parent_ctx,
return ENOENT;
}
ret = smb_krb5_open_keytab(mem_ctx, smb_krb5_context, keytab_name, &keytab_container);
ret = smb_krb5_get_keytab_container(mem_ctx, smb_krb5_context, keytab_name, &keytab_container);
if (ret != 0) {
talloc_free(mem_ctx);
@ -879,7 +879,7 @@ krb5_error_code smb_krb5_create_memory_keytab(TALLOC_CTX *parent_ctx,
return ENOMEM;
}
ret = smb_krb5_open_keytab(mem_ctx, smb_krb5_context, keytab_name, keytab_container);
ret = smb_krb5_get_keytab_container(mem_ctx, smb_krb5_context, keytab_name, keytab_container);
if (ret) {
return ret;
}