Lines Matching refs:err
62 enum idmap_error_code err;
64 err = sss_idmap_init(idmap_talloc, global_talloc_context, idmap_talloc_free,
67 fail_unless(err == IDMAP_SUCCESS, "sss_idmap_init failed.");
73 enum idmap_error_code err;
75 err = sss_idmap_init(idmap_talloc, global_talloc_context, idmap_talloc_free,
78 fail_unless(err == IDMAP_SUCCESS, "sss_idmap_init failed.");
87 enum idmap_error_code err;
89 err = sss_idmap_free(idmap_ctx);
90 fail_unless(err == IDMAP_SUCCESS, "sss_idmap_free failed.");
95 enum idmap_error_code err;
98 err = sss_idmap_add_domain(idmap_ctx, "test.dom", "S-1-5-21-1-2-3", &range);
99 fail_unless(err == IDMAP_SUCCESS, "sss_idmap_add_domain failed.");
104 enum idmap_error_code err;
110 err = sss_idmap_add_auto_domain_ex(idmap_ctx, "test.dom", "S-1-5-21-1-2-3",
113 fail_unless(err == IDMAP_SUCCESS, "sss_idmap_add_auto_domain_ex failed.");
130 enum idmap_error_code err;
136 err = sss_idmap_add_auto_domain_ex(idmap_ctx, "test.dom", "S-1-5-21-1-2-3",
139 fail_unless(err == IDMAP_SUCCESS, "sss_idmap_add_auto_domain_ex failed.");
168 enum idmap_error_code err;
176 err = sss_idmap_add_auto_domain_ex(idmap_ctx, "test.dom", "S-1-5-21-1-2-3",
179 fail_unless(err == IDMAP_SUCCESS, "sss_idmap_add_auto_domain_ex failed.");
207 enum idmap_error_code err;
210 err = sss_idmap_init(NULL, NULL, NULL, &ctx);
212 fail_unless(err == IDMAP_SUCCESS, "sss_idmap_init failed.");
215 err = sss_idmap_free(ctx);
216 fail_unless(err == IDMAP_SUCCESS, "sss_idmap_free failed.");
222 enum idmap_error_code err;
225 err = sss_idmap_init(idmap_talloc, global_talloc_context, idmap_talloc_free,
228 fail_unless(err == IDMAP_SUCCESS, "sss_idmap_init failed.");
231 err = sss_idmap_free(ctx);
232 fail_unless(err == IDMAP_SUCCESS, "sss_idmap_free failed.");
244 enum idmap_error_code err;
248 err = sss_idmap_add_domain(idmap_ctx, "test.dom", "S-1-5-21-1-2-3", &range);
249 fail_unless(err == IDMAP_SUCCESS, "sss_idmap_add_domain failed.");
251 err = sss_idmap_add_domain(idmap_ctx, "test.dom", "S-1-5-21-1-2-4",
253 fail_unless(err == IDMAP_COLLISION,
256 err = sss_idmap_add_domain(idmap_ctx, "test.dom2", "S-1-5-21-1-2-3",
258 fail_unless(err == IDMAP_COLLISION,
261 err = sss_idmap_add_domain(idmap_ctx, "test.dom2", "S-1-5-21-1-2-4",
263 fail_unless(err == IDMAP_COLLISION,
266 err = sss_idmap_add_domain(idmap_ctx, "test.dom2", "S-1-5-21-1-2-4",
268 fail_unless(err == IDMAP_SUCCESS,
275 enum idmap_error_code err;
279 err = sss_idmap_add_domain_ex(idmap_ctx, "test.dom", "S-1-5-21-1-2-3",
281 fail_unless(err == IDMAP_SUCCESS, "sss_idmap_add_domain failed.");
283 err = sss_idmap_add_domain_ex(idmap_ctx, "test.dom", "S-1-5-21-1-2-4",
285 fail_unless(err == IDMAP_COLLISION,
288 err = sss_idmap_add_domain_ex(idmap_ctx, "test.dom2", "S-1-5-21-1-2-3",
290 fail_unless(err == IDMAP_COLLISION,
293 err = sss_idmap_add_domain_ex(idmap_ctx, "test.dom2", "S-1-5-21-1-2-4",
295 fail_unless(err == IDMAP_SUCCESS,
303 enum idmap_error_code err;
306 err = sss_idmap_sid_to_unix(idmap_ctx, "S-1-5-21-1-2-3333-1000", &id);
307 fail_unless(err == IDMAP_NO_DOMAIN, "sss_idmap_sid_to_unix did not detect "
310 err = sss_idmap_sid_to_unix(idmap_ctx, "S-1-5-21-1-2-3-10000", &id);
311 fail_unless(err == IDMAP_NO_RANGE, "sss_idmap_sid_to_unix did not detect "
314 err = sss_idmap_sid_to_unix(idmap_ctx, "S-1-5-21-1-2-3-1000", &id);
315 fail_unless(err == IDMAP_SUCCESS, "sss_idmap_sid_to_unix failed.");
324 enum idmap_error_code err;
329 err = sss_idmap_sid_to_unix(idmap_ctx, "S-1-5-21-1-2-3333-1000", &id);
330 fail_unless(err == IDMAP_NO_DOMAIN, "sss_idmap_sid_to_unix did not detect "
334 err = sss_idmap_sid_to_unix(idmap_ctx, "S-1-5-21-1-2-3-4000000", &id);
335 fail_unless(err == IDMAP_SUCCESS, "sss_idmap_sid_to_unix failed.");
340 err = sss_idmap_sid_to_unix(idmap_ctx, "S-1-5-21-1-2-3-1000", &id);
341 fail_unless(err == IDMAP_SUCCESS, "sss_idmap_sid_to_unix failed.");
346 err = sss_idmap_sid_to_unix(idmap_ctx, "S-1-5-21-1-2-3-210000", &id);
347 fail_unless(err == IDMAP_SUCCESS, "sss_idmap_sid_to_unix failed.");
356 enum idmap_error_code err;
361 err = sss_idmap_unix_to_sid(idmap_ctx, exp_id, &sid);
362 fail_unless(err == IDMAP_NO_DOMAIN, "sss_idmap_unix_to_sid did not detect "
366 err = sss_idmap_sid_to_unix(idmap_ctx, "S-1-5-21-1-2-3-4000000", &id);
367 fail_unless(err == IDMAP_SUCCESS, "sss_idmap_sid_to_unix failed.");
373 err = sss_idmap_unix_to_sid(idmap_ctx, exp_id, &sid);
374 fail_unless(err == IDMAP_SUCCESS, "sss_idmap_unix_to_sid failed.");
385 enum idmap_error_code err;
390 err = sss_idmap_unix_to_sid(idmap_ctx, exp_id, &sid);
391 fail_unless(err == IDMAP_NO_DOMAIN, "sss_idmap_unix_to_sid did not detect "
395 err = sss_idmap_sid_to_unix(idmap_ctx, "S-1-5-21-1-2-3-4000000", &id);
396 fail_unless(err == IDMAP_ERROR, "sss_idmap_sid_to_unix failed.");
402 enum idmap_error_code err;
408 err = sss_idmap_unix_to_sid(idmap_ctx, exp_id, &sid);
409 fail_unless(err == IDMAP_NO_DOMAIN, "sss_idmap_unix_to_sid did not detect "
413 err = sss_idmap_sid_to_unix(idmap_ctx, "S-1-5-21-1-2-3-4000000", &id);
414 fail_unless(err == IDMAP_SUCCESS, "sss_idmap_sid_to_unix failed.");
426 enum idmap_error_code err;
441 err = sss_idmap_sid_to_unix(idmap_ctx, sids[i], &ids[i]);
442 fail_unless(err == IDMAP_SUCCESS, "sss_idmap_sid_to_unix failed.");
448 err = sss_idmap_unix_to_sid(idmap_ctx, ids[i], &sid);
449 fail_unless(err == IDMAP_SUCCESS, "sss_idmap_sid_to_unix failed.");
463 enum idmap_error_code err;
468 err = sss_idmap_sid_to_bin_sid(idmap_ctx, "S-1-5-21-1-2-3-1000",
470 fail_unless(err == IDMAP_SUCCESS, "Failed to convert SID to binary SID");
472 err = sss_idmap_bin_sid_to_unix(idmap_ctx, bin_sid, length , &id);
473 fail_unless(err == IDMAP_SUCCESS, "sss_idmap_bin_sid_to_unix failed.");
484 enum idmap_error_code err;
488 err = sss_idmap_sid_to_dom_sid(idmap_ctx, "S-1-5-21-1-2-3-1000", &dom_sid);
489 fail_unless(err == IDMAP_SUCCESS, "Failed to convert SID to SID structure");
491 err = sss_idmap_dom_sid_to_unix(idmap_ctx, dom_sid, &id);
492 fail_unless(err == IDMAP_SUCCESS, "sss_idmap_dom_sid_to_unix failed.");
503 enum idmap_error_code err;
506 err = sss_idmap_unix_to_sid(idmap_ctx, 10000, &sid);
507 fail_unless(err == IDMAP_NO_DOMAIN, "sss_idmap_unix_to_sid did not detect "
510 err = sss_idmap_unix_to_sid(idmap_ctx, 2234, &sid);
511 fail_unless(err == IDMAP_SUCCESS, "sss_idmap_unix_to_sid failed.");
522 enum idmap_error_code err;
525 err = sss_idmap_unix_to_sid(idmap_ctx,
528 fail_unless(err == IDMAP_NO_DOMAIN, "sss_idmap_unix_to_sid did not detect "
531 err = sss_idmap_unix_to_sid(idmap_ctx, 2234, &sid);
532 fail_unless(err == IDMAP_SUCCESS, "sss_idmap_unix_to_sid failed.");
540 err = sss_idmap_unix_to_sid(idmap_ctx,
543 fail_unless(err == IDMAP_SUCCESS, "sss_idmap_unix_to_sid failed.");
554 enum idmap_error_code err;
558 err = sss_idmap_unix_to_dom_sid(idmap_ctx, 10000, &dom_sid);
559 fail_unless(err == IDMAP_NO_DOMAIN, "sss_idmap_unix_to_dom_sid did not detect "
562 err = sss_idmap_unix_to_dom_sid(idmap_ctx, 2234, &dom_sid);
563 fail_unless(err == IDMAP_SUCCESS, "sss_idmap_unix_to_dom_sid failed.");
565 err = sss_idmap_dom_sid_to_sid(idmap_ctx, dom_sid, &sid);
566 fail_unless(err == IDMAP_SUCCESS, "sss_idmap_dom_sid_to_sid failed.");
579 enum idmap_error_code err;
584 err = sss_idmap_unix_to_bin_sid(idmap_ctx, 10000, &bin_sid, &length);
585 fail_unless(err == IDMAP_NO_DOMAIN, "sss_idmap_unix_to_bin_sid did not detect "
588 err = sss_idmap_unix_to_bin_sid(idmap_ctx, 2234, &bin_sid, &length);
589 fail_unless(err == IDMAP_SUCCESS, "sss_idmap_unix_to_bin_sid failed.");
591 err = sss_idmap_bin_sid_to_sid(idmap_ctx, bin_sid, length, &sid);
592 fail_unless(err == IDMAP_SUCCESS, "sss_idmap_bin_sid_to_sid failed.");
606 enum idmap_error_code err;
610 err = sss_idmap_bin_sid_to_dom_sid(idmap_ctx, test_bin_sid,
613 fail_unless(err == IDMAP_SUCCESS,
616 err = sss_idmap_dom_sid_to_bin_sid(idmap_ctx, dom_sid, &new_bin_sid,
618 fail_unless(err == IDMAP_SUCCESS,
634 enum idmap_error_code err;
637 err = sss_idmap_sid_to_dom_sid(idmap_ctx, "S-1-5-21-1-2-3-1000", &dom_sid);
639 fail_unless(err == IDMAP_SUCCESS,
642 err = sss_idmap_dom_sid_to_sid(idmap_ctx, dom_sid, &new_sid);
643 fail_unless(err == IDMAP_SUCCESS,
660 enum idmap_error_code err;
663 err = sss_idmap_sid_to_dom_sid(idmap_ctx, large_sid, &dom_sid);
665 fail_unless(err == IDMAP_SUCCESS,
669 err = sss_idmap_dom_sid_to_sid(idmap_ctx, dom_sid, &new_sid);
670 fail_unless(err == IDMAP_SUCCESS,
680 err = sss_idmap_sid_to_dom_sid(idmap_ctx, too_large_sid, &dom_sid);
681 fail_unless(err == IDMAP_SID_INVALID,
692 enum idmap_error_code err;
696 err = sss_idmap_sid_to_bin_sid(idmap_ctx, test_sid, &bin_sid, &length);
697 fail_unless(err == IDMAP_SUCCESS,
711 enum idmap_error_code err;
714 err = sss_idmap_bin_sid_to_sid(idmap_ctx, test_bin_sid, test_bin_sid_length,
716 fail_unless(err == IDMAP_SUCCESS,
729 enum idmap_error_code err;
732 err = sss_idmap_smb_sid_to_dom_sid(idmap_ctx, &test_smb_sid, &dom_sid);
733 fail_unless(err == IDMAP_SUCCESS,
736 err = sss_idmap_dom_sid_to_smb_sid(idmap_ctx, dom_sid, &new_smb_sid);
737 fail_unless(err == IDMAP_SUCCESS,
750 enum idmap_error_code err;
754 err = sss_idmap_smb_sid_to_bin_sid(idmap_ctx, &test_smb_sid,
756 fail_unless(err == IDMAP_SUCCESS,
770 enum idmap_error_code err;
773 err = sss_idmap_bin_sid_to_smb_sid(idmap_ctx, test_bin_sid,
775 fail_unless(err == IDMAP_SUCCESS,
786 enum idmap_error_code err;
789 err = sss_idmap_smb_sid_to_sid(idmap_ctx, &test_smb_sid, &sid);
790 fail_unless(err == IDMAP_SUCCESS,
802 enum idmap_error_code err;
805 err = sss_idmap_sid_to_smb_sid(idmap_ctx, test_sid, &smb_sid);
806 fail_unless(err == IDMAP_SUCCESS,