summaryrefslogtreecommitdiff
path: root/source4/auth/kerberos
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2006-05-24 07:32:17 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:08:32 -0500
commitcdc64c448df49676c96f87d106af8de0c467651f (patch)
tree341b178e8bc20e6b132382f8fce05204978ddd9d /source4/auth/kerberos
parenta665cccd2ef81e704e90bb228bbd14c0afb031af (diff)
downloadsamba-cdc64c448df49676c96f87d106af8de0c467651f.tar.gz
samba-cdc64c448df49676c96f87d106af8de0c467651f.tar.bz2
samba-cdc64c448df49676c96f87d106af8de0c467651f.zip
r15853: started the process of removing the warnings now that
talloc_set_destructor() is type safe. The end result will be lots less use of void*, and less calls to talloc_get_type() (This used to be commit 6b4c085b862c0932b80b93e316396a53b993544c)
Diffstat (limited to 'source4/auth/kerberos')
-rw-r--r--source4/auth/kerberos/kerberos_util.c12
-rw-r--r--source4/auth/kerberos/krb5_init_context.c9
2 files changed, 9 insertions, 12 deletions
diff --git a/source4/auth/kerberos/kerberos_util.c b/source4/auth/kerberos/kerberos_util.c
index 113f41a35f..413bef822b 100644
--- a/source4/auth/kerberos/kerberos_util.c
+++ b/source4/auth/kerberos/kerberos_util.c
@@ -31,8 +31,8 @@ struct principal_container {
krb5_principal principal;
};
-static int free_principal(void *ptr) {
- struct principal_container *pc = ptr;
+static int free_principal(struct principal_container *pc)
+{
/* current heimdal - 0.6.3, which we need anyway, fixes segfaults here */
krb5_free_principal(pc->smb_krb5_context->krb5_context, pc->principal);
@@ -227,8 +227,8 @@ krb5_error_code principal_from_credentials(TALLOC_CTX *parent_ctx,
return 0;
}
-static int free_keytab(void *ptr) {
- struct keytab_container *ktc = ptr;
+static int free_keytab(struct keytab_container *ktc)
+{
krb5_kt_close(ktc->smb_krb5_context->krb5_context, ktc->keytab);
return 0;
@@ -265,8 +265,8 @@ struct enctypes_container {
krb5_enctype *enctypes;
};
-static int free_enctypes(void *ptr) {
- struct enctypes_container *etc = ptr;
+static int free_enctypes(struct enctypes_container *etc)
+{
free_kerberos_etypes(etc->smb_krb5_context->krb5_context, etc->enctypes);
return 0;
}
diff --git a/source4/auth/kerberos/krb5_init_context.c b/source4/auth/kerberos/krb5_init_context.c
index aefa8fbfbc..fa2975a647 100644
--- a/source4/auth/kerberos/krb5_init_context.c
+++ b/source4/auth/kerberos/krb5_init_context.c
@@ -47,21 +47,18 @@ struct smb_krb5_socket {
krb5_krbhst_info *hi;
};
-static int smb_krb5_context_destroy_1(void *ptr)
+static int smb_krb5_context_destroy_1(struct smb_krb5_context *ctx)
{
- struct smb_krb5_context *ctx = ptr;
krb5_free_context(ctx->krb5_context);
return 0;
}
-static int smb_krb5_context_destroy_2(void *ptr)
+static int smb_krb5_context_destroy_2(struct smb_krb5_context *ctx)
{
- struct smb_krb5_context *ctx = ptr;
-
/* Otherwise krb5_free_context will try and close what we have already free()ed */
krb5_set_warn_dest(ctx->krb5_context, NULL);
krb5_closelog(ctx->krb5_context, ctx->logf);
- smb_krb5_context_destroy_1(ptr);
+ smb_krb5_context_destroy_1(ctx);
return 0;
}