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:
		| @@ -40,7 +40,7 @@ krb5_get_init_creds_opt_init(krb5_get_init_creds_opt *opt) | ||||
| { | ||||
|     memset (opt, 0, sizeof(*opt)); | ||||
|     opt->flags = 0; | ||||
|     opt->private = NULL; | ||||
|     opt->opt_private = NULL; | ||||
| } | ||||
|  | ||||
| krb5_error_code KRB5_LIB_FUNCTION | ||||
| @@ -56,13 +56,13 @@ krb5_get_init_creds_opt_alloc(krb5_context context, | ||||
| 	return ENOMEM; | ||||
|     } | ||||
|     krb5_get_init_creds_opt_init(o); | ||||
|     o->private = calloc(1, sizeof(*o->private)); | ||||
|     if (o->private == NULL) { | ||||
|     o->opt_private = calloc(1, sizeof(*o->opt_private)); | ||||
|     if (o->opt_private == NULL) { | ||||
| 	krb5_set_error_string(context, "out of memory"); | ||||
| 	free(o); | ||||
| 	return ENOMEM; | ||||
|     } | ||||
|     o->private->refcount = 1; | ||||
|     o->opt_private->refcount = 1; | ||||
|     *opt = o; | ||||
|     return 0; | ||||
| } | ||||
| @@ -82,16 +82,16 @@ _krb5_get_init_creds_opt_copy(krb5_context context, | ||||
|     } | ||||
|     if (in) | ||||
| 	*opt = *in; | ||||
|     if(opt->private == NULL) { | ||||
| 	opt->private = calloc(1, sizeof(*opt->private)); | ||||
| 	if (opt->private == NULL) { | ||||
|     if(opt->opt_private == NULL) { | ||||
| 	opt->opt_private = calloc(1, sizeof(*opt->opt_private)); | ||||
| 	if (opt->opt_private == NULL) { | ||||
| 	    krb5_set_error_string(context, "out of memory"); | ||||
| 	    free(opt); | ||||
| 	    return ENOMEM; | ||||
| 	} | ||||
| 	opt->private->refcount = 1; | ||||
| 	opt->opt_private->refcount = 1; | ||||
|     } else | ||||
| 	opt->private->refcount++; | ||||
| 	opt->opt_private->refcount++; | ||||
|     *out = opt; | ||||
|     return 0; | ||||
| } | ||||
| @@ -99,13 +99,13 @@ _krb5_get_init_creds_opt_copy(krb5_context context, | ||||
| void KRB5_LIB_FUNCTION | ||||
| krb5_get_init_creds_opt_free(krb5_get_init_creds_opt *opt) | ||||
| { | ||||
|     if (opt->private == NULL) | ||||
|     if (opt->opt_private == NULL) | ||||
| 	return; | ||||
|     if (opt->private->refcount < 1) /* abort ? */ | ||||
|     if (opt->opt_private->refcount < 1) /* abort ? */ | ||||
| 	return; | ||||
|     if (--opt->private->refcount == 0) { | ||||
|     if (--opt->opt_private->refcount == 0) { | ||||
| 	_krb5_get_init_creds_opt_free_pkinit(opt); | ||||
| 	free(opt->private); | ||||
| 	free(opt->opt_private); | ||||
|     } | ||||
|     memset(opt, 0, sizeof(*opt)); | ||||
|     free(opt); | ||||
| @@ -293,7 +293,7 @@ require_ext_opt(krb5_context context, | ||||
| 		krb5_get_init_creds_opt *opt, | ||||
| 		const char *type) | ||||
| { | ||||
|     if (opt->private == NULL) { | ||||
|     if (opt->opt_private == NULL) { | ||||
| 	krb5_set_error_string(context, "%s on non extendable opt", type); | ||||
| 	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"); | ||||
|     if (ret) | ||||
| 	return ret; | ||||
|     opt->private->password = password; | ||||
|     opt->private->key_proc = key_proc; | ||||
|     opt->opt_private->password = password; | ||||
|     opt->opt_private->key_proc = key_proc; | ||||
|     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"); | ||||
|     if (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_FALSE; | ||||
|     return 0; | ||||
|   | ||||
| @@ -275,11 +275,11 @@ get_init_creds_common(krb5_context context, | ||||
| 	options = &default_opt; | ||||
|     } | ||||
|  | ||||
|     if (options->private) { | ||||
| 	ctx->password = options->private->password; | ||||
| 	ctx->key_proc = options->private->key_proc; | ||||
| 	ctx->req_pac = options->private->req_pac; | ||||
| 	ctx->pk_init_ctx = options->private->pk_init_ctx; | ||||
|     if (options->opt_private) { | ||||
| 	ctx->password = options->opt_private->password; | ||||
| 	ctx->key_proc = options->opt_private->key_proc; | ||||
| 	ctx->req_pac = options->opt_private->req_pac; | ||||
| 	ctx->pk_init_ctx = options->opt_private->pk_init_ctx; | ||||
|     } else | ||||
| 	ctx->req_pac = KRB5_PA_PAC_DONT_CARE; | ||||
|  | ||||
| @@ -1466,8 +1466,8 @@ krb5_get_init_creds_password(krb5_context context, | ||||
| 	return ret; | ||||
|  | ||||
|     if (password == NULL && | ||||
| 	options->private->password == NULL && | ||||
| 	options->private->pk_init_ctx == NULL) | ||||
| 	options->opt_private->password == NULL && | ||||
| 	options->opt_private->pk_init_ctx == NULL) | ||||
|     { | ||||
| 	krb5_prompt prompt; | ||||
| 	krb5_data password_data; | ||||
| @@ -1495,7 +1495,7 @@ krb5_get_init_creds_password(krb5_context context, | ||||
| 	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, | ||||
| 						      password, NULL); | ||||
| 	if (ret) { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Love Hörnquist Åstrand
					Love Hörnquist Åstrand