Lines Matching defs:buf
35 int wbcSidToStringBuf(const struct wbcDomainSid *sid, char *buf, int buflen)
41 strncpy(buf, "(NULL SID)", buflen);
42 buf[buflen < 10 ? buflen :10] = '\0';
53 ofs = snprintf(buf, buflen, "S-%hhu-", (unsigned char)sid->sid_rev_num);
55 ofs += snprintf(buf + ofs, MAX(buflen - ofs, 0), "0x%llx",
58 ofs += snprintf(buf + ofs, MAX(buflen - ofs, 0), "%llu",
63 ofs += snprintf(buf + ofs, MAX(buflen - ofs, 0), "-%u",
73 char buf[WBC_SID_STRING_BUFLEN];
81 len = wbcSidToStringBuf(sid, buf, sizeof(buf));
83 if (len+1 > sizeof(buf)) {
91 memcpy(result, buf, len+1);