Skip to content

Commit

Permalink
s4-kdc: Remove unused etypes from sdb structure
Browse files Browse the repository at this point in the history
Signed-off-by: Andreas Schneider <[email protected]>
eviewed-by: Guenther Deschner <[email protected]>

Autobuild-User(master): Andreas Schneider <[email protected]>
Autobuild-Date(master): Mon Sep 26 06:08:09 CEST 2016 on sn-devel-144
  • Loading branch information
cryptomilk committed Sep 26, 2016
1 parent b9f9936 commit 5ab88dd
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 46 deletions.
36 changes: 0 additions & 36 deletions source4/kdc/db-glue.c
Original file line number Diff line number Diff line change
Expand Up @@ -736,7 +736,6 @@ static krb5_error_code samba_kdc_message2entry(krb5_context context,
struct loadparm_context *lp_ctx = kdc_db_ctx->lp_ctx;
uint32_t userAccountControl;
uint32_t msDS_User_Account_Control_Computed;
unsigned int i;
krb5_error_code ret = 0;
krb5_boolean is_computer = FALSE;

Expand Down Expand Up @@ -1088,24 +1087,6 @@ static krb5_error_code samba_kdc_message2entry(krb5_context context,
goto out;
}

entry_ex->entry.etypes = malloc(sizeof(*(entry_ex->entry.etypes)));
if (entry_ex->entry.etypes == NULL) {
krb5_clear_error_message(context);
ret = ENOMEM;
goto out;
}
entry_ex->entry.etypes->len = entry_ex->entry.keys.len;
entry_ex->entry.etypes->val = calloc(entry_ex->entry.etypes->len, sizeof(int));
if (entry_ex->entry.etypes->val == NULL) {
krb5_clear_error_message(context);
ret = ENOMEM;
goto out;
}
for (i=0; i < entry_ex->entry.etypes->len; i++) {
entry_ex->entry.etypes->val[i] = KRB5_KEY_TYPE(&entry_ex->entry.keys.val[i].key);
}


p->msg = talloc_steal(p, msg);

out:
Expand Down Expand Up @@ -1499,23 +1480,6 @@ static krb5_error_code samba_kdc_trust_message2entry(krb5_context context,
goto out;
}

entry_ex->entry.etypes = malloc(sizeof(*(entry_ex->entry.etypes)));
if (entry_ex->entry.etypes == NULL) {
krb5_clear_error_message(context);
ret = ENOMEM;
goto out;
}
entry_ex->entry.etypes->len = entry_ex->entry.keys.len;
entry_ex->entry.etypes->val = calloc(entry_ex->entry.etypes->len, sizeof(int));
if (entry_ex->entry.etypes->val == NULL) {
krb5_clear_error_message(context);
ret = ENOMEM;
goto out;
}
for (i=0; i < entry_ex->entry.etypes->len; i++) {
entry_ex->entry.etypes->val[i] = KRB5_KEY_TYPE(&entry_ex->entry.keys.val[i].key);
}

p->msg = talloc_steal(p, msg);

out:
Expand Down
6 changes: 0 additions & 6 deletions source4/kdc/sdb.c
Original file line number Diff line number Diff line change
Expand Up @@ -92,12 +92,6 @@ void free_sdb_entry(struct sdb_entry *s)
SAFE_FREE(s->valid_start);
SAFE_FREE(s->valid_end);
SAFE_FREE(s->pw_end);
if (s->etypes) {
if (s->etypes->len) {
free(s->etypes->val);
}
free(s->etypes);
}

ZERO_STRUCTP(s);
}
Expand Down
4 changes: 0 additions & 4 deletions source4/kdc/sdb.h
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,6 @@ struct sdb_entry {
unsigned int *max_life;
unsigned int *max_renew;
struct SDBFlags flags;
struct sdb_entry_etypes {
unsigned int len;
unsigned int *val;
} *etypes;
};

struct sdb_entry_ex {
Expand Down

0 comments on commit 5ab88dd

Please sign in to comment.