(siad_ses_init): handle krb5_init_context failure consistently
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@9438 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 1995-1999 Kungliga Tekniska H<>gskolan
|
* Copyright (c) 1995-2000 Kungliga Tekniska H<>gskolan
|
||||||
* (Royal Institute of Technology, Stockholm, Sweden).
|
* (Royal Institute of Technology, Stockholm, Sweden).
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
@@ -51,13 +51,17 @@ siad_chk_invoker(void)
|
|||||||
int
|
int
|
||||||
siad_ses_init(SIAENTITY *entity, int pkgind)
|
siad_ses_init(SIAENTITY *entity, int pkgind)
|
||||||
{
|
{
|
||||||
|
krb5_error_code ret;
|
||||||
struct state *s = malloc(sizeof(*s));
|
struct state *s = malloc(sizeof(*s));
|
||||||
|
|
||||||
SIA_DEBUG(("DEBUG", "siad_ses_init"));
|
SIA_DEBUG(("DEBUG", "siad_ses_init"));
|
||||||
if(s == NULL)
|
if(s == NULL)
|
||||||
return SIADFAIL;
|
return SIADFAIL;
|
||||||
memset(s, 0, sizeof(*s));
|
memset(s, 0, sizeof(*s));
|
||||||
#ifdef SIA_KRB5
|
#ifdef SIA_KRB5
|
||||||
krb5_init_context(&s->context);
|
ret = krb5_init_context(&s->context);
|
||||||
|
if (ret)
|
||||||
|
return SIADFAIL;
|
||||||
#endif
|
#endif
|
||||||
entity->mech[pkgind] = (int*)s;
|
entity->mech[pkgind] = (int*)s;
|
||||||
return SIADSUCCESS;
|
return SIADSUCCESS;
|
||||||
|
Reference in New Issue
Block a user