[33057] in Kerberos

home help back first fref pref prev next nref lref last post

Re: Clearing credentials question

daemon@ATHENA.MIT.EDU (Greg Hudson)
Thu Jan 6 18:56:09 2011

From: Greg Hudson <ghudson@mit.edu>
To: Markus Moeller <huaraz@moeller.plus.com>
In-Reply-To: <ig5kbp$gbc$1@dough.gmane.org>
Date: Thu, 06 Jan 2011 18:56:01 -0500
Message-ID: <1294358161.2456.336.camel@ray>
Mime-Version: 1.0
Cc: "kerberos@mit.edu" <kerberos@mit.edu>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: kerberos-bounces@mit.edu

On Thu, 2011-01-06 at 18:04 -0500, Markus Moeller wrote:
> Shouldn't 
> krb5_free_keyblock_contents check if the content is not zero ?

It does.

> int main() {
[...]
> krb5_creds  creds;
[...]
> code = krb5_parse_name(context, cclient, &creds.client);
> code = krb5_parse_name(context, cserver, &creds.server);
[...]
> krb5_free_cred_contents(context, &creds);

You declared creds as an automatic variable and didn't initialize it, so
all of its fields except for client and server contain stack garbage at
the time of the krb5_free_cred_contents call.


________________________________________________
Kerberos mailing list           Kerberos@mit.edu
https://mailman.mit.edu/mailman/listinfo/kerberos

home help back first fref pref prev next nref lref last post