[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Memory caches




I have an application in which I want to setup a memory credentials
cache. The application uses Cyrus SASL, so there's no easy way to
set the initiator identity at the API level.

Will the following work?

	char ccacheName[64];
	krb5_creds cred;
	krb5_ccache ccache;

	...
	/* Acquire initial credentials... */
	ret = krb5_cc_store_cred(context, ccache, &cred);
	...
	snprintf(ccacheName, sizeof(ccacheName), "%s:%s",
		krb5_cc_get_type(context, ccache),
		krb5_cc_get_name(context, ccache));

	setenv("KRB5CCNAME", ccacheName, 1); 

cheers,

-- Luke

--
Luke Howard | PADL Software Pty Ltd | www.padl.com