summaryrefslogtreecommitdiff
path: root/source3/libsmb
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2007-02-01 15:10:13 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:17:38 -0500
commit1898eaddb805e86d0c36bd289e7fa61d7bbd4810 (patch)
treecade1be0ada625eca2b76cfc3d725efbc1d78f13 /source3/libsmb
parent6b8fc040e56a9b3db6c060b9ab430112561f86bb (diff)
downloadsamba-1898eaddb805e86d0c36bd289e7fa61d7bbd4810.tar.gz
samba-1898eaddb805e86d0c36bd289e7fa61d7bbd4810.tar.bz2
samba-1898eaddb805e86d0c36bd289e7fa61d7bbd4810.zip
r21110: Fix kinit with Heimdal (Bug #4226).
Guenther (This used to be commit ea38e1f8362d75e7ac058a7c4aa06f1ca92ec108)
Diffstat (limited to 'source3/libsmb')
-rw-r--r--source3/libsmb/clikrb5.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/source3/libsmb/clikrb5.c b/source3/libsmb/clikrb5.c
index 4092b4b2b9..305139e1f4 100644
--- a/source3/libsmb/clikrb5.c
+++ b/source3/libsmb/clikrb5.c
@@ -1379,6 +1379,32 @@ done:
return ret;
}
+#ifndef HAVE_KRB5_GET_INIT_CREDS_OPT_ALLOC
+ krb5_error_code krb5_get_init_creds_opt_alloc(krb5_context context, krb5_get_init_creds_opt **opt)
+{
+ krb5_get_init_creds_opt *my_opt;
+
+ *opt = NULL;
+
+ if ((my_opt = SMB_MALLOC(sizeof(krb5_get_init_creds_opt))) == NULL) {
+ return ENOMEM;
+ }
+
+ krb5_get_init_creds_opt_init(my_opt);
+
+ *opt = my_opt;
+ return 0;
+}
+#endif
+
+#ifndef HAVE_KRB5_GET_INIT_CREDS_OPT_FREE
+ void krb5_get_init_creds_opt_free(krb5_get_init_creds_opt *opt)
+{
+ SAFE_FREE(opt);
+ opt = NULL;
+}
+#endif
+
#else /* HAVE_KRB5 */
/* this saves a few linking headaches */
int cli_krb5_get_ticket(const char *principal, time_t time_offset,