add context argument to krb5_get_init_creds_opt_alloc
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@12783 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
		@@ -43,7 +43,7 @@ krb5_verify_password (POP *p)
 | 
				
			|||||||
    krb5_principal client, server;
 | 
					    krb5_principal client, server;
 | 
				
			||||||
    krb5_creds creds;
 | 
					    krb5_creds creds;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    ret = krb5_get_init_creds_opt_alloc (&get_options);
 | 
					    ret = krb5_get_init_creds_opt_alloc (p->context, &get_options);
 | 
				
			||||||
    if (ret) {
 | 
					    if (ret) {
 | 
				
			||||||
	pop_log(p, POP_PRIORITY, "krb5_get_init_creds_opt_init: %s",
 | 
						pop_log(p, POP_PRIORITY, "krb5_get_init_creds_opt_init: %s",
 | 
				
			||||||
		krb5_get_err_text (p->context, ret));
 | 
							krb5_get_err_text (p->context, ret));
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -517,7 +517,7 @@ get_creds(krb5_context context, krb5_ccache *cache)
 | 
				
			|||||||
			      "kadmin", HPROP_NAME, NULL);
 | 
								      "kadmin", HPROP_NAME, NULL);
 | 
				
			||||||
    if(ret) krb5_err(context, 1, ret, "krb5_make_principal");
 | 
					    if(ret) krb5_err(context, 1, ret, "krb5_make_principal");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    ret = krb5_get_init_creds_opt_alloc(&init_opts);
 | 
					    ret = krb5_get_init_creds_opt_alloc(context, &init_opts);
 | 
				
			||||||
    if(ret) krb5_err(context, 1, ret, "krb5_get_init_creds_opt_alloc");
 | 
					    if(ret) krb5_err(context, 1, ret, "krb5_get_init_creds_opt_alloc");
 | 
				
			||||||
    krb5_get_init_creds_opt_set_preauth_list(init_opts, &preauth, 1);
 | 
					    krb5_get_init_creds_opt_set_preauth_list(init_opts, &preauth, 1);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -95,7 +95,7 @@ generate_requests (const char *filename, unsigned nreq)
 | 
				
			|||||||
	krb5_data result_code_string, result_string;
 | 
						krb5_data result_code_string, result_string;
 | 
				
			||||||
	char *old_pwd, *new_pwd;
 | 
						char *old_pwd, *new_pwd;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	krb5_get_init_creds_opt_alloc (&opt);
 | 
						krb5_get_init_creds_opt_alloc (context, &opt);
 | 
				
			||||||
	krb5_get_init_creds_opt_set_tkt_life (opt, 300);
 | 
						krb5_get_init_creds_opt_set_tkt_life (opt, 300);
 | 
				
			||||||
	krb5_get_init_creds_opt_set_forwardable (opt, FALSE);
 | 
						krb5_get_init_creds_opt_set_forwardable (opt, FALSE);
 | 
				
			||||||
	krb5_get_init_creds_opt_set_proxiable (opt, FALSE);
 | 
						krb5_get_init_creds_opt_set_proxiable (opt, FALSE);
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -144,7 +144,7 @@ main (int argc, char **argv)
 | 
				
			|||||||
    if (ret)
 | 
					    if (ret)
 | 
				
			||||||
	errx (1, "krb5_init_context failed: %d", ret);
 | 
						errx (1, "krb5_init_context failed: %d", ret);
 | 
				
			||||||
  
 | 
					  
 | 
				
			||||||
    ret = krb5_get_init_creds_opt_alloc (&opt);
 | 
					    ret = krb5_get_init_creds_opt_alloc (context, &opt);
 | 
				
			||||||
    if (ret)
 | 
					    if (ret)
 | 
				
			||||||
	krb5_err(context, 1, ret, "krb5_get_init_creds_opt_alloc");
 | 
						krb5_err(context, 1, ret, "krb5_get_init_creds_opt_alloc");
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -415,7 +415,7 @@ get_new_tickets(krb5_context context,
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    memset(&cred, 0, sizeof(cred));
 | 
					    memset(&cred, 0, sizeof(cred));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    ret = krb5_get_init_creds_opt_alloc (&opt);
 | 
					    ret = krb5_get_init_creds_opt_alloc (context, &opt);
 | 
				
			||||||
    if (ret)
 | 
					    if (ret)
 | 
				
			||||||
	krb5_err(context, 1, ret, "krb5_get_init_creds_opt_alloc");
 | 
						krb5_err(context, 1, ret, "krb5_get_init_creds_opt_alloc");
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -81,7 +81,7 @@ main(int argc, char **argv)
 | 
				
			|||||||
    if (ret)
 | 
					    if (ret)
 | 
				
			||||||
	errx (1, "krb5_init_context failed: %d", ret);
 | 
						errx (1, "krb5_init_context failed: %d", ret);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    ret = krb5_get_init_creds_opt_alloc (&get_options);
 | 
					    ret = krb5_get_init_creds_opt_alloc (context, &get_options);
 | 
				
			||||||
    if (ret)
 | 
					    if (ret)
 | 
				
			||||||
	krb5_err(context, 1, ret, "krb5_get_init_creds_opt_alloc");
 | 
						krb5_err(context, 1, ret, "krb5_get_init_creds_opt_alloc");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -117,7 +117,7 @@ static OM_uint32 acquire_initiator_cred
 | 
				
			|||||||
	kret = get_keytab(&keytab);
 | 
						kret = get_keytab(&keytab);
 | 
				
			||||||
	if (kret)
 | 
						if (kret)
 | 
				
			||||||
	    goto end;
 | 
						    goto end;
 | 
				
			||||||
	kret = krb5_get_init_creds_opt_alloc(&opt);
 | 
						kret = krb5_get_init_creds_opt_alloc(gssapi_krb5_context, &opt);
 | 
				
			||||||
	if (ret)
 | 
						if (ret)
 | 
				
			||||||
	    goto end;
 | 
						    goto end;
 | 
				
			||||||
	kret = krb5_get_init_creds_keytab(gssapi_krb5_context, &cred,
 | 
						kret = krb5_get_init_creds_keytab(gssapi_krb5_context, &cred,
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -117,7 +117,7 @@ static OM_uint32 acquire_initiator_cred
 | 
				
			|||||||
	kret = get_keytab(&keytab);
 | 
						kret = get_keytab(&keytab);
 | 
				
			||||||
	if (kret)
 | 
						if (kret)
 | 
				
			||||||
	    goto end;
 | 
						    goto end;
 | 
				
			||||||
	kret = krb5_get_init_creds_opt_alloc(&opt);
 | 
						kret = krb5_get_init_creds_opt_alloc(gssapi_krb5_context, &opt);
 | 
				
			||||||
	if (ret)
 | 
						if (ret)
 | 
				
			||||||
	    goto end;
 | 
						    goto end;
 | 
				
			||||||
	kret = krb5_get_init_creds_keytab(gssapi_krb5_context, &cred,
 | 
						kret = krb5_get_init_creds_keytab(gssapi_krb5_context, &cred,
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -144,7 +144,7 @@ get_new_cache(krb5_context context,
 | 
				
			|||||||
    krb5_get_init_creds_opt *opt;
 | 
					    krb5_get_init_creds_opt *opt;
 | 
				
			||||||
    krb5_ccache id;
 | 
					    krb5_ccache id;
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
    ret = krb5_get_init_creds_opt_alloc (&opt);
 | 
					    ret = krb5_get_init_creds_opt_alloc (context, &opt);
 | 
				
			||||||
    if (ret)
 | 
					    if (ret)
 | 
				
			||||||
	return ret;
 | 
						return ret;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -89,7 +89,7 @@ get_creds(krb5_context context, const char *keytab_str,
 | 
				
			|||||||
				   KRB5_NT_SRV_HST, &client);
 | 
									   KRB5_NT_SRV_HST, &client);
 | 
				
			||||||
    if (ret) krb5_err(context, 1, ret, "krb5_sname_to_principal");
 | 
					    if (ret) krb5_err(context, 1, ret, "krb5_sname_to_principal");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    ret = krb5_get_init_creds_opt_alloc(&init_opts);
 | 
					    ret = krb5_get_init_creds_opt_alloc(context, &init_opts);
 | 
				
			||||||
    if (ret) krb5_err(context, 1, ret, "krb5_get_init_creds_opt_alloc");
 | 
					    if (ret) krb5_err(context, 1, ret, "krb5_get_init_creds_opt_alloc");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    asprintf (&server, "%s/%s", IPROP_NAME, host);
 | 
					    asprintf (&server, "%s/%s", IPROP_NAME, host);
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -139,7 +139,7 @@ verify_user_opt_int(krb5_context context,
 | 
				
			|||||||
    krb5_get_init_creds_opt *opt;
 | 
					    krb5_get_init_creds_opt *opt;
 | 
				
			||||||
    krb5_creds cred;
 | 
					    krb5_creds cred;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    ret = krb5_get_init_creds_opt_alloc (&opt);
 | 
					    ret = krb5_get_init_creds_opt_alloc (context, &opt);
 | 
				
			||||||
    if (ret)
 | 
					    if (ret)
 | 
				
			||||||
	return ret;
 | 
						return ret;
 | 
				
			||||||
    krb5_get_init_creds_opt_set_default_flags(context, NULL, 
 | 
					    krb5_get_init_creds_opt_set_default_flags(context, NULL, 
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user