mirror of
https://github.com/samba-team/samba.git
synced 2025-01-08 21:18:16 +03:00
s3:libads: Use the TRACE SUPPORT for keys operations
BUG: https://bugzilla.samba.org/show_bug.cgi?id=6750 Signed-off-by: Pavel Filipenský <pfilipensky@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
This commit is contained in:
parent
1185b03b27
commit
b007fb89d5
@ -1808,7 +1808,7 @@ krb5_error_code smb_krb5_kt_seek_and_delete_old_entries(krb5_context context,
|
||||
}
|
||||
|
||||
DEBUG(3, (__location__ ": Will try to delete old keytab entries\n"));
|
||||
while (!krb5_kt_next_entry(context, keytab, &kt_entry, &cursor)) {
|
||||
while (!samba_krb5_kt_next_entry(context, keytab, &kt_entry, &cursor)) {
|
||||
bool name_ok = false;
|
||||
krb5_enctype kt_entry_enctype =
|
||||
smb_krb5_kt_get_enctype_from_entry(&kt_entry);
|
||||
@ -1898,7 +1898,7 @@ krb5_error_code smb_krb5_kt_seek_and_delete_old_entries(krb5_context context,
|
||||
"failed (%s)\n", error_message(ret)));
|
||||
goto out;
|
||||
}
|
||||
ret = krb5_kt_remove_entry(context, keytab, &kt_entry);
|
||||
ret = samba_krb5_kt_remove_entry(context, keytab, &kt_entry);
|
||||
if (ret) {
|
||||
DEBUG(1, (__location__ ": krb5_kt_remove_entry() "
|
||||
"failed (%s)\n", error_message(ret)));
|
||||
@ -2029,7 +2029,7 @@ krb5_error_code smb_krb5_kt_add_password(krb5_context context,
|
||||
DEBUG(3, (__location__ ": adding keytab entry for (%s) with "
|
||||
"encryption type (%d) and version (%d)\n",
|
||||
princ_s, enctype, kt_entry.vno));
|
||||
ret = krb5_kt_add_entry(context, keytab, &kt_entry);
|
||||
ret = samba_krb5_kt_add_entry(context, keytab, &kt_entry);
|
||||
krb5_free_keyblock_contents(context, keyp);
|
||||
ZERO_STRUCT(kt_entry);
|
||||
if (ret) {
|
||||
|
@ -805,8 +805,9 @@ int ads_keytab_create_default(ADS_STRUCT *ads)
|
||||
|
||||
ret = krb5_kt_start_seq_get(context, keytab, &cursor);
|
||||
if (ret != KRB5_KT_END && ret != ENOENT ) {
|
||||
while ((ret = krb5_kt_next_entry(context, keytab,
|
||||
&kt_entry, &cursor)) == 0) {
|
||||
while ((ret = samba_krb5_kt_next_entry(
|
||||
context, keytab, &kt_entry, &cursor)) == 0)
|
||||
{
|
||||
smb_krb5_kt_free_entry(context, &kt_entry);
|
||||
ZERO_STRUCT(kt_entry);
|
||||
found++;
|
||||
@ -840,13 +841,16 @@ int ads_keytab_create_default(ADS_STRUCT *ads)
|
||||
goto done;
|
||||
}
|
||||
|
||||
while (krb5_kt_next_entry(context, keytab, &kt_entry, &cursor) == 0) {
|
||||
while (samba_krb5_kt_next_entry(context, keytab, &kt_entry, &cursor) ==
|
||||
0)
|
||||
{
|
||||
if (kt_entry.vno != kvno) {
|
||||
char *ktprinc = NULL;
|
||||
char *p;
|
||||
|
||||
/* This returns a malloc'ed string in ktprinc. */
|
||||
ret = smb_krb5_unparse_name(oldEntries, context,
|
||||
ret = smb_krb5_unparse_name(oldEntries,
|
||||
context,
|
||||
kt_entry.principal,
|
||||
&ktprinc);
|
||||
if (ret) {
|
||||
@ -963,7 +967,9 @@ int ads_keytab_list(const char *keytab_name)
|
||||
|
||||
printf("Vno Type Principal\n");
|
||||
|
||||
while (krb5_kt_next_entry(context, keytab, &kt_entry, &cursor) == 0) {
|
||||
while (samba_krb5_kt_next_entry(context, keytab, &kt_entry, &cursor) ==
|
||||
0)
|
||||
{
|
||||
|
||||
char *princ_s = NULL;
|
||||
char *etype_s = NULL;
|
||||
|
Loading…
Reference in New Issue
Block a user