diff options
author | Andrew Bartlett <abartlet@samba.org> | 2008-08-27 11:01:55 +1000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2008-08-27 11:01:55 +1000 |
commit | 8b94f7bcd70b1196487b433e355127a4f84bf5a5 (patch) | |
tree | 940c1838cd0fa4033fef7945e97b530341f99ecf /source4/heimdal/lib/krb5/rd_priv.c | |
parent | ca20c56b260e2799c40b0c7c0e3ef5f7308b586e (diff) | |
parent | 9430420ba246c26489ad51e8b52e13d891436bb3 (diff) | |
download | samba-8b94f7bcd70b1196487b433e355127a4f84bf5a5.tar.gz samba-8b94f7bcd70b1196487b433e355127a4f84bf5a5.tar.bz2 samba-8b94f7bcd70b1196487b433e355127a4f84bf5a5.zip |
Merge branch 'v4-0-test' of ssh://git.samba.org/data/git/samba into pac-verify
(This used to be commit 32143287c7eb452c6ed9ccd15e8cd4e5a907b437)
Diffstat (limited to 'source4/heimdal/lib/krb5/rd_priv.c')
-rw-r--r-- | source4/heimdal/lib/krb5/rd_priv.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/source4/heimdal/lib/krb5/rd_priv.c b/source4/heimdal/lib/krb5/rd_priv.c index ed7a2ccc52..da8f44febb 100644 --- a/source4/heimdal/lib/krb5/rd_priv.c +++ b/source4/heimdal/lib/krb5/rd_priv.c @@ -33,7 +33,7 @@ #include <krb5_locl.h> -RCSID("$Id: rd_priv.c 21751 2007-07-31 20:42:20Z lha $"); +RCSID("$Id$"); krb5_error_code KRB5_LIB_FUNCTION krb5_rd_priv(krb5_context context, @@ -50,14 +50,18 @@ krb5_rd_priv(krb5_context context, krb5_keyblock *key; krb5_crypto crypto; - if (outbuf) - krb5_data_zero(outbuf); + krb5_data_zero(outbuf); if ((auth_context->flags & - (KRB5_AUTH_CONTEXT_RET_TIME | KRB5_AUTH_CONTEXT_RET_SEQUENCE)) && - outdata == NULL) { - krb5_clear_error_string (context); - return KRB5_RC_REQUIRED; /* XXX better error, MIT returns this */ + (KRB5_AUTH_CONTEXT_RET_TIME | KRB5_AUTH_CONTEXT_RET_SEQUENCE))) + { + if (outdata == NULL) { + krb5_clear_error_string (context); + return KRB5_RC_REQUIRED; /* XXX better error, MIT returns this */ + } + /* if these fields are not present in the priv-part, silently + return zero */ + memset(outdata, 0, sizeof(*outdata)); } memset(&priv, 0, sizeof(priv)); @@ -165,9 +169,6 @@ krb5_rd_priv(krb5_context context, if ((auth_context->flags & (KRB5_AUTH_CONTEXT_RET_TIME | KRB5_AUTH_CONTEXT_RET_SEQUENCE))) { - /* if these fields are not present in the priv-part, silently - return zero */ - memset(outdata, 0, sizeof(*outdata)); if(part.timestamp) outdata->timestamp = *part.timestamp; if(part.usec) |