* This really belongs in a utility library
*/
if ((packet->code > 0) && (packet->code < FR_MAX_PACKET_CODE)) {
- RDEBUG("%s %s packet %s host %s port %d, id=%d, length=%d",
+ RDEBUG("%s %s packet %s host %s port %i, id=%i, length=%zu",
received, fr_packet_codes[packet->code], from,
inet_ntop(ip->af, &ip->ipaddr, buffer, sizeof(buffer)),
port, packet->id, packet->data_len);
} else {
- RDEBUG("%s packet %s host %s port %d code=%d, id=%d, length=%d",
+ RDEBUG("%s packet %s host %s port %d code=%d, id=%d, length=%zu",
received, from,
inet_ntop(ip->af, &ip->ipaddr, buffer, sizeof(buffer)),
port,
(eap_msg->vp_octets[0] >= PW_EAP_MAX_CODES)) {
RDEBUG2("Unknown EAP packet");
} else {
- RDEBUG2("EAP packet type %s id %d length %d",
+ RDEBUG2("EAP packet type %s id %d length %zu",
eap_codes[eap_msg->vp_octets[0]],
eap_msg->vp_octets[1],
eap_msg->length);
* The format is very specific.
*/
if (vp->length != (17 + 34)) {
- RDEBUG2("Cisco-AVPair with leap:session-key has incorrect length %d: Expected %d",
+ RDEBUG2("Cisco-AVPair with leap:session-key has incorrect length %zu: Expected %d",
vp->length, 17 + 34);
return RLM_MODULE_NOOP;
}
if (vals) {
if (inst->access_positive) {
if (strncasecmp(vals[0], "false", 5) == 0) {
- RDEBUG("\"%s\" attribute exists but is set to 'false' - user locked out");
+ RDEBUG("\"%s\" attribute exists but is set to 'false' - user locked out",
+ inst->userobj_access_attr);
rcode = RLM_MODULE_USERLOCK;
}
/* RLM_MODULE_OK set above... */
pStepBuff, NULL);
if (status == eDSNoErr) {
if (pStepBuff->fBufferLength > 4) {
- uint32_t len;
+ size_t len;
memcpy(&len, pStepBuff->fBufferData, sizeof(len));
if (len == 40) {
*response->vp_strvalue,
"MS-CHAP2-Success",
mschap_reply, len+2);
- RDEBUG2("dsDoDirNodeAuth returns stepbuff: %s (len=%ld)\n", mschap_reply, len);
+ RDEBUG2("dsDoDirNodeAuth returns stepbuff: %s (len=%zu)\n", mschap_reply, len);
}
}
}
* if not, crypto has probably gone wrong
*/
if (passlen > 512) {
- RDEBUG2("Decrypted new password blob claims length %u > 512 - probably an invalid NT-Password", passlen);
+ RDEBUG2("Decrypted new password blob claims length %zu > 512 - probably an invalid NT-Password", passlen);
return -1;
}
if (c < 0x7f) {
/* ascii char */
if (new_pass->length >= 253) {
- RDEBUG("Ran out of room turning new password into utf8 at %d - cleartext will be truncated!", i);
+ RDEBUG("Ran out of room turning new password into utf8 at %zu - cleartext will be truncated!", i);
break;
}
x[new_pass->length++] = c;
} else if (c < 0x7ff) {
/* 2-byte */
if (new_pass->length >= 252) {
- RDEBUG("Ran out of room turning new password into utf8 at %d - cleartext will be truncated!", i);
+ RDEBUG("Ran out of room turning new password into utf8 at %zu - cleartext will be truncated!", i);
break;
}
x[new_pass->length++] = 0xc0 + (c >> 6);
} else {
/* 3-byte */
if (new_pass->length >= 251) {
- RDEBUG("Ran out of room turning new password into utf8 at %d - cleartext will be truncated!", i);
+ RDEBUG("Ran out of room turning new password into utf8 at %zu - cleartext will be truncated!", i);
break;
}
x[new_pass->length++] = 0xe0 + (c >> 12);
RDEBUG("MS-CHAPv2 password change request received");
if (cpw->length != 68) {
- RDEBUG2("MS-CHAP2-CPW has the wrong format - length %d!=68", cpw->length);
+ RDEBUG2("MS-CHAP2-CPW has the wrong format - length %zu != 68", cpw->length);
return RLM_MODULE_INVALID;
} else if (cpw->vp_octets[0]!=7) {
- RDEBUG2("MS-CHAP2-CPW has the wrong format - code %d!=7", cpw->vp_octets[0]);
+ RDEBUG2("MS-CHAP2-CPW has the wrong format - code %d != 7", cpw->vp_octets[0]);
return RLM_MODULE_INVALID;
}
curl_free(escaped);
- RDEBUG("\tLength : %i", len);
+ RDEBUG("\tLength : %zd", len);
RDEBUG("\tValue : %s", p);
p += len;
len = p - (char*)ptr;
RDEBUG2("POST Data: %s", (char*) ptr);
- RDEBUG2("Returning %i bytes of POST data", len);
+ RDEBUG2("Returning %zd bytes of POST data", len);
return len;
if (!len) {
REDEBUG("AVP exceeds buffer length or chunk");
} else {
- RDEBUG2("Returning %i bytes of POST data (buffer full or chunk exceeded)", len);
+ RDEBUG2("Returning %zd bytes of POST data (buffer full or chunk exceeded)", len);
}
return len;
/*
* Show actual value length minus quotes
*/
- RDEBUG2("\tLength : %i", (*p == '"') ? (len - 2) : len);
+ RDEBUG2("\tLength : %zu", (size_t) (*p == '"') ? (len - 2) : len);
RDEBUG2("\tValue : %s", p);
p += len;
len = p - (char*)ptr;
RDEBUG2("JSON Data: %s", (char*) ptr);
- RDEBUG2("Returning %i bytes of JSON data", len);
+ RDEBUG2("Returning %zd bytes of JSON data", len);
return len;
if (!len) {
REDEBUG("AVP exceeds buffer length or chunk");
} else {
- RDEBUG2("Returning %i bytes of JSON data (buffer full or chunk exceeded)", len);
+ RDEBUG2("Returning %zd bytes of JSON data (buffer full or chunk exceeded)", len);
}
return len;