Commit 63378d6f authored by Gerald Carter's avatar Gerald Carter Committed by Gerald (Jerry) Carter
Browse files

r541: fixing segfault in winbindd caused -r527 -- looks like a bug in heimdal;...

r541: fixing segfault in winbindd caused -r527 -- looks like a bug in heimdal; also initialize some pointers
(This used to be commit be74e88d9a4b74fcaf25b0816e3fa8a487c91ab5)
parent 675ecdd5
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -56,9 +56,9 @@ kerb_prompter(krb5_context ctx, void *data,
*/
int kerberos_kinit_password(const char *principal, const char *password, int time_offset, time_t *expire_time)
{
	krb5_context ctx;
	krb5_context ctx = NULL;
	krb5_error_code code = 0;
	krb5_ccache cc;
	krb5_ccache cc = NULL;
	krb5_principal me;
	krb5_creds my_creds;

@@ -142,8 +142,8 @@ int ads_kinit_password(ADS_STRUCT *ads)
int ads_kdestroy(const char *cc_name)
{
	krb5_error_code code;
	krb5_context ctx;
	krb5_ccache cc;
	krb5_context ctx = NULL;
	krb5_ccache cc = NULL;

	if ((code = krb5_init_context (&ctx))) {
		DEBUG(3, ("ads_kdestroy: kdb5_init_context rc=%d\n", code));
+3 −3
Original line number Diff line number Diff line
@@ -463,12 +463,12 @@ ADS_STATUS ads_krb5_set_password(const char *kdc_host, const char *princ,

	ADS_STATUS aret;
	krb5_error_code ret;
	krb5_context context;
	krb5_context context = NULL;
	krb5_principal principal;
	char *princ_name;
	char *realm;
	krb5_creds creds, *credsp;
	krb5_ccache ccache;
	krb5_ccache ccache = NULL;

	ret = krb5_init_context(&context);
	if (ret) {
@@ -578,7 +578,7 @@ static ADS_STATUS ads_krb5_chg_password(const char *kdc_host,
{
    ADS_STATUS aret;
    krb5_error_code ret;
    krb5_context context;
    krb5_context context = NULL;
    krb5_principal princ;
    krb5_get_init_creds_opt opts;
    krb5_creds creds;
+1 −1
Original line number Diff line number Diff line
@@ -273,7 +273,7 @@ static ADS_STATUS ads_sasl_gssapi_bind(ADS_STRUCT *ads)
	unsigned sec_layer;
	ADS_STATUS status;
	krb5_principal principal;
	krb5_context ctx;
	krb5_context ctx = NULL;
	krb5_enctype enc_types[] = {
#ifdef ENCTYPE_ARCFOUR_HMAC
			ENCTYPE_ARCFOUR_HMAC,
+4 −1
Original line number Diff line number Diff line
@@ -359,7 +359,7 @@ int cli_krb5_get_ticket(const char *principal, time_t time_offset,
{
	krb5_error_code retval;
	krb5_data packet;
	krb5_context context;
	krb5_context context = NULL;
	krb5_ccache ccdef = NULL;
	krb5_auth_context auth_context = NULL;
	krb5_enctype enc_types[] = {
@@ -413,8 +413,11 @@ int cli_krb5_get_ticket(const char *principal, time_t time_offset,
failed:

	if ( context ) {
#if 0 	/* JERRY -- disabled since it causes heimdal 0.6.1rc3 to die 
	   SuSE 9.1 Pro */
		if (ccdef)
			krb5_cc_close(context, ccdef);
#endif
		if (auth_context)
			krb5_auth_con_free(context, auth_context);
		krb5_free_context(context);