kdc: Check unparse_flags() result differently
This commit is contained in:

committed by
Luke Howard

parent
90899b2361
commit
27d6526e3a
@@ -1581,10 +1581,11 @@ _log_astgs_req(astgs_request_t r, krb5_enctype setype)
|
|||||||
|
|
||||||
{
|
{
|
||||||
char fixedstr[128];
|
char fixedstr[128];
|
||||||
|
int result;
|
||||||
|
|
||||||
unparse_flags(KDCOptions2int(b->kdc_options), asn1_KDCOptions_units(),
|
result = unparse_flags(KDCOptions2int(b->kdc_options), asn1_KDCOptions_units(),
|
||||||
fixedstr, sizeof(fixedstr));
|
fixedstr, sizeof(fixedstr));
|
||||||
if (*fixedstr) {
|
if (result > 0) {
|
||||||
_kdc_r_log(r, 4, "Requested flags: %s", fixedstr);
|
_kdc_r_log(r, 4, "Requested flags: %s", fixedstr);
|
||||||
_kdc_audit_addkv((kdc_request_t)r, KDC_AUDIT_EATWHITE,
|
_kdc_audit_addkv((kdc_request_t)r, KDC_AUDIT_EATWHITE,
|
||||||
"flags", "%s", fixedstr);
|
"flags", "%s", fixedstr);
|
||||||
|
@@ -1428,6 +1428,8 @@ tgs_build_reply(astgs_request_t priv,
|
|||||||
Key *tkey_sign;
|
Key *tkey_sign;
|
||||||
int flags = HDB_F_FOR_TGS_REQ;
|
int flags = HDB_F_FOR_TGS_REQ;
|
||||||
|
|
||||||
|
int result;
|
||||||
|
|
||||||
memset(&sessionkey, 0, sizeof(sessionkey));
|
memset(&sessionkey, 0, sizeof(sessionkey));
|
||||||
memset(&adtkt, 0, sizeof(adtkt));
|
memset(&adtkt, 0, sizeof(adtkt));
|
||||||
memset(&enc_pa_data, 0, sizeof(enc_pa_data));
|
memset(&enc_pa_data, 0, sizeof(enc_pa_data));
|
||||||
@@ -1460,10 +1462,10 @@ tgs_build_reply(astgs_request_t priv,
|
|||||||
if (ret)
|
if (ret)
|
||||||
goto out;
|
goto out;
|
||||||
cpn = priv->cname;
|
cpn = priv->cname;
|
||||||
unparse_flags (KDCOptions2int(b->kdc_options),
|
result = unparse_flags(KDCOptions2int(b->kdc_options),
|
||||||
asn1_KDCOptions_units(),
|
asn1_KDCOptions_units(),
|
||||||
opt_str, sizeof(opt_str));
|
opt_str, sizeof(opt_str));
|
||||||
if(*opt_str)
|
if (result > 0)
|
||||||
kdc_log(context, config, 4,
|
kdc_log(context, config, 4,
|
||||||
"TGS-REQ %s from %s for %s [%s]",
|
"TGS-REQ %s from %s for %s [%s]",
|
||||||
cpn, from, spn, opt_str);
|
cpn, from, spn, opt_str);
|
||||||
|
Reference in New Issue
Block a user