Lines Matching defs:sid
32 /* Convert a sid to a string into a buffer. Return the string
35 int wbcSidToStringBuf(const struct wbcDomainSid *sid, char *buf, int buflen)
40 if (!sid) {
46 id_auth = (uint64_t)sid->id_auth[5] +
47 ((uint64_t)sid->id_auth[4] << 8) +
48 ((uint64_t)sid->id_auth[3] << 16) +
49 ((uint64_t)sid->id_auth[2] << 24) +
50 ((uint64_t)sid->id_auth[1] << 32) +
51 ((uint64_t)sid->id_auth[0] << 40);
53 ofs = snprintf(buf, buflen, "S-%hhu-", (unsigned char)sid->sid_rev_num);
62 for (i = 0; i < sid->num_auths; i++) {
64 (unsigned int)sid->sub_auths[i]);
70 wbcErr wbcSidToString(const struct wbcDomainSid *sid,
77 if (!sid) {
81 len = wbcSidToStringBuf(sid, buf, sizeof(buf));
101 struct wbcDomainSid *sid)
108 if (!sid) {
131 sid->sid_rev_num = (uint8_t)x;
144 sid->id_auth[5] = (x & 0x0000000000ffULL);
145 sid->id_auth[4] = (x & 0x00000000ff00ULL) >> 8;
146 sid->id_auth[3] = (x & 0x000000ff0000ULL) >> 16;
147 sid->id_auth[2] = (x & 0x0000ff000000ULL) >> 24;
148 sid->id_auth[1] = (x & 0x00ff00000000ULL) >> 32;
149 sid->id_auth[0] = (x & 0xff0000000000ULL) >> 40;
153 sid->num_auths = 0;
154 while (sid->num_auths < WBC_MAXSUBAUTHS) {
162 sid->sub_auths[sid->num_auths++] = x;