remove unused stuff
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@24213 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -38,13 +38,6 @@
|
|||||||
|
|
||||||
RCSID("$Id$");
|
RCSID("$Id$");
|
||||||
|
|
||||||
void KRB5_LIB_FUNCTION
|
|
||||||
krb5_get_init_creds_opt_init(krb5_get_init_creds_opt *opt)
|
|
||||||
__attribute__((deprecated))
|
|
||||||
{
|
|
||||||
memset (opt, 0, sizeof(*opt));
|
|
||||||
}
|
|
||||||
|
|
||||||
krb5_error_code KRB5_LIB_FUNCTION
|
krb5_error_code KRB5_LIB_FUNCTION
|
||||||
krb5_get_init_creds_opt_alloc(krb5_context context,
|
krb5_get_init_creds_opt_alloc(krb5_context context,
|
||||||
krb5_get_init_creds_opt **opt)
|
krb5_get_init_creds_opt **opt)
|
||||||
@@ -71,68 +64,6 @@ krb5_get_init_creds_opt_alloc(krb5_context context,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
krb5_error_code
|
|
||||||
_krb5_get_init_creds_opt_copy(krb5_context context,
|
|
||||||
const krb5_get_init_creds_opt *in,
|
|
||||||
krb5_get_init_creds_opt **out)
|
|
||||||
{
|
|
||||||
krb5_get_init_creds_opt *opt;
|
|
||||||
|
|
||||||
*out = NULL;
|
|
||||||
opt = calloc(1, sizeof(*opt));
|
|
||||||
if (opt == NULL) {
|
|
||||||
krb5_set_error_message(context, ENOMEM, N_("malloc: out of memory", ""));
|
|
||||||
return ENOMEM;
|
|
||||||
}
|
|
||||||
if (in)
|
|
||||||
*opt = *in;
|
|
||||||
if(opt->opt_private == NULL) {
|
|
||||||
opt->opt_private = calloc(1, sizeof(*opt->opt_private));
|
|
||||||
if (opt->opt_private == NULL) {
|
|
||||||
krb5_set_error_message(context, ENOMEM, N_("malloc: out of memory", ""));
|
|
||||||
free(opt);
|
|
||||||
return ENOMEM;
|
|
||||||
}
|
|
||||||
opt->opt_private->refcount = 1;
|
|
||||||
} else
|
|
||||||
opt->opt_private->refcount++;
|
|
||||||
*out = opt;
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
void KRB5_LIB_FUNCTION
|
|
||||||
_krb5_get_init_creds_opt_free_krb5_error(krb5_get_init_creds_opt *opt)
|
|
||||||
{
|
|
||||||
if (opt->opt_private == NULL || opt->opt_private->error == NULL)
|
|
||||||
return;
|
|
||||||
free_KRB_ERROR(opt->opt_private->error);
|
|
||||||
free(opt->opt_private->error);
|
|
||||||
opt->opt_private->error = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
void KRB5_LIB_FUNCTION
|
|
||||||
_krb5_get_init_creds_opt_set_krb5_error(krb5_context context,
|
|
||||||
krb5_get_init_creds_opt *opt,
|
|
||||||
const KRB_ERROR *error)
|
|
||||||
{
|
|
||||||
krb5_error_code ret;
|
|
||||||
|
|
||||||
if (opt->opt_private == NULL)
|
|
||||||
return;
|
|
||||||
|
|
||||||
_krb5_get_init_creds_opt_free_krb5_error(opt);
|
|
||||||
|
|
||||||
opt->opt_private->error = malloc(sizeof(*opt->opt_private->error));
|
|
||||||
if (opt->opt_private->error == NULL)
|
|
||||||
return;
|
|
||||||
ret = copy_KRB_ERROR(error, opt->opt_private->error);
|
|
||||||
if (ret) {
|
|
||||||
free(opt->opt_private->error);
|
|
||||||
opt->opt_private->error = NULL;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void KRB5_LIB_FUNCTION
|
void KRB5_LIB_FUNCTION
|
||||||
krb5_get_init_creds_opt_free(krb5_context context,
|
krb5_get_init_creds_opt_free(krb5_context context,
|
||||||
krb5_get_init_creds_opt *opt)
|
krb5_get_init_creds_opt *opt)
|
||||||
@@ -142,7 +73,6 @@ krb5_get_init_creds_opt_free(krb5_context context,
|
|||||||
if (opt->opt_private->refcount < 1) /* abort ? */
|
if (opt->opt_private->refcount < 1) /* abort ? */
|
||||||
return;
|
return;
|
||||||
if (--opt->opt_private->refcount == 0) {
|
if (--opt->opt_private->refcount == 0) {
|
||||||
_krb5_get_init_creds_opt_free_krb5_error(opt);
|
|
||||||
_krb5_get_init_creds_opt_free_pkinit(opt);
|
_krb5_get_init_creds_opt_free_pkinit(opt);
|
||||||
free(opt->opt_private);
|
free(opt->opt_private);
|
||||||
}
|
}
|
||||||
@@ -368,43 +298,6 @@ krb5_get_init_creds_opt_set_pac_request(krb5_context context,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Deprecated: use the new krb5_init_creds_init() and
|
|
||||||
* krb5_init_creds_get_error().
|
|
||||||
*
|
|
||||||
* @ingroup krb5_deprecated
|
|
||||||
*/
|
|
||||||
|
|
||||||
krb5_error_code KRB5_LIB_FUNCTION
|
|
||||||
krb5_get_init_creds_opt_get_error(krb5_context context,
|
|
||||||
krb5_get_init_creds_opt *opt,
|
|
||||||
KRB_ERROR **error)
|
|
||||||
__attribute__((deprecated))
|
|
||||||
{
|
|
||||||
krb5_error_code ret;
|
|
||||||
|
|
||||||
*error = NULL;
|
|
||||||
|
|
||||||
ret = require_ext_opt(context, opt, "init_creds_opt_get_error");
|
|
||||||
if (ret)
|
|
||||||
return ret;
|
|
||||||
|
|
||||||
if (opt->opt_private->error == NULL)
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
*error = malloc(sizeof(**error));
|
|
||||||
if (*error == NULL) {
|
|
||||||
krb5_set_error_message(context, ENOMEM, N_("malloc: out of memory", ""));
|
|
||||||
return ENOMEM;
|
|
||||||
}
|
|
||||||
|
|
||||||
ret = copy_KRB_ERROR(opt->opt_private->error, *error);
|
|
||||||
if (ret)
|
|
||||||
krb5_clear_error_message(context);
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
krb5_error_code KRB5_LIB_FUNCTION
|
krb5_error_code KRB5_LIB_FUNCTION
|
||||||
krb5_get_init_creds_opt_set_addressless(krb5_context context,
|
krb5_get_init_creds_opt_set_addressless(krb5_context context,
|
||||||
krb5_get_init_creds_opt *opt,
|
krb5_get_init_creds_opt *opt,
|
||||||
@@ -453,3 +346,37 @@ krb5_get_init_creds_opt_set_win2k(krb5_context context,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef HEIMDAL_SMALLER
|
||||||
|
|
||||||
|
void KRB5_LIB_FUNCTION
|
||||||
|
krb5_get_init_creds_opt_init(krb5_get_init_creds_opt *opt)
|
||||||
|
__attribute__((deprecated))
|
||||||
|
{
|
||||||
|
memset (opt, 0, sizeof(*opt));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Deprecated: use the new krb5_init_creds_init() and
|
||||||
|
* krb5_init_creds_get_error().
|
||||||
|
*
|
||||||
|
* @ingroup krb5_deprecated
|
||||||
|
*/
|
||||||
|
|
||||||
|
krb5_error_code KRB5_LIB_FUNCTION
|
||||||
|
krb5_get_init_creds_opt_get_error(krb5_context context,
|
||||||
|
krb5_get_init_creds_opt *opt,
|
||||||
|
KRB_ERROR **error)
|
||||||
|
__attribute__((deprecated))
|
||||||
|
{
|
||||||
|
krb5_error_code ret;
|
||||||
|
|
||||||
|
*error = calloc(sizeof(**error));
|
||||||
|
if (*error == NULL) {
|
||||||
|
krb5_set_error_message(context, ENOMEM, N_("malloc: out of memory", ""));
|
||||||
|
return ENOMEM;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif /* HEIMDAL_SMALLER */
|
||||||
|
Reference in New Issue
Block a user