Lines Matching defs:dom_sid
50 struct sss_dom_sid *dom_sid;
59 dom_sid = ctx->alloc_func(sizeof(struct sss_dom_sid), ctx->alloc_pvt);
60 if (dom_sid == NULL) {
63 memset(dom_sid, 0, sizeof(struct sss_dom_sid));
66 dom_sid->sid_rev_num = (uint8_t) *(bin_sid + p);
70 dom_sid->num_auths = (uint8_t) *(bin_sid + p);
76 if (dom_sid->num_auths > SID_SUB_AUTHS) {
83 dom_sid->id_auth[i] = (uint8_t) *(bin_sid + p);
88 for (i = 0; i < dom_sid->num_auths; i++) {
92 dom_sid->sub_auths[i] = le32toh(val);
95 *_dom_sid = dom_sid;
100 ctx->free_func(dom_sid, ctx->alloc_pvt);
106 struct sss_dom_sid *dom_sid,
119 if (dom_sid->num_auths > SID_SUB_AUTHS) {
123 length = 2 + SID_ID_AUTHS + dom_sid->num_auths * 4;
130 bin_sid[p] = dom_sid->sid_rev_num;
133 bin_sid[p] = dom_sid->num_auths;
137 bin_sid[p] = dom_sid->id_auth[i];
141 for (i = 0; i < dom_sid->num_auths; i++) {
146 val = htole32(dom_sid->sub_auths[i]);
162 struct sss_dom_sid *dom_sid,
173 if (dom_sid->num_auths > SID_SUB_AUTHS) {
177 sid_buf_len = 25 + dom_sid->num_auths * 11;
185 id_auth_val = (dom_sid->id_auth[2] << 24) +
186 (dom_sid->id_auth[3] << 16) +
187 (dom_sid->id_auth[4] << 8) +
188 (dom_sid->id_auth[5]);
190 nc = snprintf(sid_buf, sid_buf_len, "S-%u-%lu", dom_sid->sid_rev_num,
202 for (i = 0; i < dom_sid->num_auths ; i++) {
207 (unsigned long) dom_sid->sub_auths[i]);
233 struct sss_dom_sid *dom_sid;
241 dom_sid = ctx->alloc_func(sizeof(struct sss_dom_sid), ctx->alloc_pvt);
242 if (dom_sid == NULL) {
245 memset(dom_sid, 0, sizeof(struct sss_dom_sid));
258 dom_sid->sid_rev_num = (uint8_t) ul;
274 dom_sid->id_auth[0] = 0;
275 dom_sid->id_auth[1] = 0;
276 dom_sid->id_auth[2] = (ul & 0xff000000) >> 24;
277 dom_sid->id_auth[3] = (ul & 0x00ff0000) >> 16;
278 dom_sid->id_auth[4] = (ul & 0x0000ff00) >> 8;
279 dom_sid->id_auth[5] = (ul & 0x000000ff);
293 if (dom_sid->num_auths >= SID_SUB_AUTHS) {
312 dom_sid->sub_auths[dom_sid->num_auths++] = ul;
321 ctx->free_func(dom_sid, ctx->alloc_pvt);
323 *_dom_sid = dom_sid;
335 struct sss_dom_sid *dom_sid = NULL;
339 err = sss_idmap_sid_to_dom_sid(ctx, sid, &dom_sid);
344 err = sss_idmap_dom_sid_to_bin_sid(ctx, dom_sid, &bin_sid, &length);
354 ctx->free_func(dom_sid, ctx->alloc_pvt);
368 struct sss_dom_sid *dom_sid = NULL;
371 err = sss_idmap_bin_sid_to_dom_sid(ctx, bin_sid, length, &dom_sid);
376 err = sss_idmap_dom_sid_to_sid(ctx, dom_sid, &sid);
385 ctx->free_func(dom_sid, ctx->alloc_pvt);
395 struct dom_sid **_smb_sid)
398 struct sss_dom_sid *dom_sid = NULL;
399 struct dom_sid *smb_sid = NULL;
401 err = sss_idmap_sid_to_dom_sid(ctx, sid, &dom_sid);
406 err = sss_idmap_dom_sid_to_smb_sid(ctx, dom_sid, &smb_sid);
415 ctx->free_func(dom_sid, ctx->alloc_pvt);
424 struct dom_sid *smb_sid,
428 struct sss_dom_sid *dom_sid = NULL;
431 err = sss_idmap_smb_sid_to_dom_sid(ctx, smb_sid, &dom_sid);
436 err = sss_idmap_dom_sid_to_sid(ctx, dom_sid, &sid);
445 ctx->free_func(dom_sid, ctx->alloc_pvt);
454 struct sss_dom_sid *dom_sid,
455 struct dom_sid **_smb_sid)
457 struct dom_sid *smb_sid;
460 smb_sid = ctx->alloc_func(sizeof(struct dom_sid), ctx->alloc_pvt);
464 memset(smb_sid, 0, sizeof(struct dom_sid));
466 smb_sid->sid_rev_num = dom_sid->sid_rev_num;
467 smb_sid->num_auths = dom_sid->num_auths;
469 smb_sid->id_auth[c] = dom_sid->id_auth[c];
472 smb_sid->sub_auths[c] = dom_sid->sub_auths[c];
481 struct dom_sid *smb_sid,
484 struct sss_dom_sid *dom_sid;
487 dom_sid = ctx->alloc_func(sizeof(struct sss_dom_sid), ctx->alloc_pvt);
488 if (dom_sid == NULL) {
491 memset(dom_sid, 0, sizeof(struct sss_dom_sid));
493 dom_sid->sid_rev_num = smb_sid->sid_rev_num;
494 dom_sid->num_auths = smb_sid->num_auths;
496 dom_sid->id_auth[c] = smb_sid->id_auth[c];
499 dom_sid->sub_auths[c] = smb_sid->sub_auths[c];
502 *_dom_sid = dom_sid;
510 struct dom_sid **_smb_sid)
513 struct sss_dom_sid *dom_sid = NULL;
514 struct dom_sid *smb_sid = NULL;
516 err = sss_idmap_bin_sid_to_dom_sid(ctx, bin_sid, length, &dom_sid);
521 err = sss_idmap_dom_sid_to_smb_sid(ctx, dom_sid, &smb_sid);
530 ctx->free_func(dom_sid, ctx->alloc_pvt);
539 struct dom_sid *smb_sid,
544 struct sss_dom_sid *dom_sid = NULL;
548 err = sss_idmap_smb_sid_to_dom_sid(ctx, smb_sid, &dom_sid);
553 err = sss_idmap_dom_sid_to_bin_sid(ctx, dom_sid, &bin_sid, &length);
563 ctx->free_func(dom_sid, ctx->alloc_pvt);