Rename private to opt_private.

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@16169 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Love Hörnquist Åstrand
2005-10-12 12:45:27 +00:00
parent 296d9d6457
commit e42d007ce9
2 changed files with 25 additions and 25 deletions

View File

@@ -40,7 +40,7 @@ krb5_get_init_creds_opt_init(krb5_get_init_creds_opt *opt)
{ {
memset (opt, 0, sizeof(*opt)); memset (opt, 0, sizeof(*opt));
opt->flags = 0; opt->flags = 0;
opt->private = NULL; opt->opt_private = NULL;
} }
krb5_error_code KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_FUNCTION
@@ -56,13 +56,13 @@ krb5_get_init_creds_opt_alloc(krb5_context context,
return ENOMEM; return ENOMEM;
} }
krb5_get_init_creds_opt_init(o); krb5_get_init_creds_opt_init(o);
o->private = calloc(1, sizeof(*o->private)); o->opt_private = calloc(1, sizeof(*o->opt_private));
if (o->private == NULL) { if (o->opt_private == NULL) {
krb5_set_error_string(context, "out of memory"); krb5_set_error_string(context, "out of memory");
free(o); free(o);
return ENOMEM; return ENOMEM;
} }
o->private->refcount = 1; o->opt_private->refcount = 1;
*opt = o; *opt = o;
return 0; return 0;
} }
@@ -82,16 +82,16 @@ _krb5_get_init_creds_opt_copy(krb5_context context,
} }
if (in) if (in)
*opt = *in; *opt = *in;
if(opt->private == NULL) { if(opt->opt_private == NULL) {
opt->private = calloc(1, sizeof(*opt->private)); opt->opt_private = calloc(1, sizeof(*opt->opt_private));
if (opt->private == NULL) { if (opt->opt_private == NULL) {
krb5_set_error_string(context, "out of memory"); krb5_set_error_string(context, "out of memory");
free(opt); free(opt);
return ENOMEM; return ENOMEM;
} }
opt->private->refcount = 1; opt->opt_private->refcount = 1;
} else } else
opt->private->refcount++; opt->opt_private->refcount++;
*out = opt; *out = opt;
return 0; return 0;
} }
@@ -99,13 +99,13 @@ _krb5_get_init_creds_opt_copy(krb5_context context,
void KRB5_LIB_FUNCTION void KRB5_LIB_FUNCTION
krb5_get_init_creds_opt_free(krb5_get_init_creds_opt *opt) krb5_get_init_creds_opt_free(krb5_get_init_creds_opt *opt)
{ {
if (opt->private == NULL) if (opt->opt_private == NULL)
return; return;
if (opt->private->refcount < 1) /* abort ? */ if (opt->opt_private->refcount < 1) /* abort ? */
return; return;
if (--opt->private->refcount == 0) { if (--opt->opt_private->refcount == 0) {
_krb5_get_init_creds_opt_free_pkinit(opt); _krb5_get_init_creds_opt_free_pkinit(opt);
free(opt->private); free(opt->opt_private);
} }
memset(opt, 0, sizeof(*opt)); memset(opt, 0, sizeof(*opt));
free(opt); free(opt);
@@ -293,7 +293,7 @@ require_ext_opt(krb5_context context,
krb5_get_init_creds_opt *opt, krb5_get_init_creds_opt *opt,
const char *type) const char *type)
{ {
if (opt->private == NULL) { if (opt->opt_private == NULL) {
krb5_set_error_string(context, "%s on non extendable opt", type); krb5_set_error_string(context, "%s on non extendable opt", type);
return EINVAL; return EINVAL;
} }
@@ -310,8 +310,8 @@ krb5_get_init_creds_opt_set_pa_password(krb5_context context,
ret = require_ext_opt(context, opt, "init_creds_opt_set_pa_password"); ret = require_ext_opt(context, opt, "init_creds_opt_set_pa_password");
if (ret) if (ret)
return ret; return ret;
opt->private->password = password; opt->opt_private->password = password;
opt->private->key_proc = key_proc; opt->opt_private->key_proc = key_proc;
return 0; return 0;
} }
@@ -324,7 +324,7 @@ krb5_get_init_creds_opt_set_pac_request(krb5_context context,
ret = require_ext_opt(context, opt, "init_creds_opt_set_pac_req"); ret = require_ext_opt(context, opt, "init_creds_opt_set_pac_req");
if (ret) if (ret)
return ret; return ret;
opt->private->req_pac = req_pac ? opt->opt_private->req_pac = req_pac ?
KRB5_PA_PAC_REQ_TRUE : KRB5_PA_PAC_REQ_TRUE :
KRB5_PA_PAC_REQ_FALSE; KRB5_PA_PAC_REQ_FALSE;
return 0; return 0;

View File

@@ -275,11 +275,11 @@ get_init_creds_common(krb5_context context,
options = &default_opt; options = &default_opt;
} }
if (options->private) { if (options->opt_private) {
ctx->password = options->private->password; ctx->password = options->opt_private->password;
ctx->key_proc = options->private->key_proc; ctx->key_proc = options->opt_private->key_proc;
ctx->req_pac = options->private->req_pac; ctx->req_pac = options->opt_private->req_pac;
ctx->pk_init_ctx = options->private->pk_init_ctx; ctx->pk_init_ctx = options->opt_private->pk_init_ctx;
} else } else
ctx->req_pac = KRB5_PA_PAC_DONT_CARE; ctx->req_pac = KRB5_PA_PAC_DONT_CARE;
@@ -1466,8 +1466,8 @@ krb5_get_init_creds_password(krb5_context context,
return ret; return ret;
if (password == NULL && if (password == NULL &&
options->private->password == NULL && options->opt_private->password == NULL &&
options->private->pk_init_ctx == NULL) options->opt_private->pk_init_ctx == NULL)
{ {
krb5_prompt prompt; krb5_prompt prompt;
krb5_data password_data; krb5_data password_data;
@@ -1495,7 +1495,7 @@ krb5_get_init_creds_password(krb5_context context,
password = password_data.data; password = password_data.data;
} }
if (options->private->password == NULL) { if (options->opt_private->password == NULL) {
ret = krb5_get_init_creds_opt_set_pa_password(context, options, ret = krb5_get_init_creds_opt_set_pa_password(context, options,
password, NULL); password, NULL);
if (ret) { if (ret) {