Lines Matching defs:sib
47 static int smb_idmap_batch_binsid(smb_idmap_batch_t *sib);
72 smb_idmap_batch_t sib;
75 stat = smb_idmap_batch_create(&sib, 1, SMB_IDMAP_ID2SID);
79 stat = smb_idmap_batch_getsid(sib.sib_idmaph, &sib.sib_maps[0],
83 smb_idmap_batch_destroy(&sib);
87 stat = smb_idmap_batch_getmappings(&sib);
90 smb_idmap_batch_destroy(&sib);
94 *sid = smb_sid_dup(sib.sib_maps[0].sim_sid);
96 smb_idmap_batch_destroy(&sib);
109 smb_idmap_batch_t sib;
113 stat = smb_idmap_batch_create(&sib, 1, SMB_IDMAP_SID2ID);
117 sim = &sib.sib_maps[0];
119 stat = smb_idmap_batch_getid(sib.sib_idmaph, sim, sid, *id_type);
121 smb_idmap_batch_destroy(&sib);
125 stat = smb_idmap_batch_getmappings(&sib);
128 smb_idmap_batch_destroy(&sib);
133 smb_idmap_batch_destroy(&sib);
144 smb_idmap_batch_create(smb_idmap_batch_t *sib, uint16_t nmap, int flags)
148 if (!sib)
151 bzero(sib, sizeof (smb_idmap_batch_t));
152 stat = idmap_get_create(&sib->sib_idmaph);
159 sib->sib_flags = flags;
160 sib->sib_nmap = nmap;
161 sib->sib_size = nmap * sizeof (smb_idmap_t);
162 sib->sib_maps = malloc(sib->sib_size);
163 if (!sib->sib_maps)
166 bzero(sib->sib_maps, sib->sib_size);
176 smb_idmap_batch_destroy(smb_idmap_batch_t *sib)
180 if (sib == NULL)
183 if (sib->sib_idmaph) {
184 idmap_get_destroy(sib->sib_idmaph);
185 sib->sib_idmaph = NULL;
188 if (sib->sib_maps == NULL)
191 if (sib->sib_flags & SMB_IDMAP_ID2SID) {
196 for (i = 0; i < sib->sib_nmap; i++) {
197 smb_sid_free(sib->sib_maps[i].sim_sid);
198 free(sib->sib_maps[i].sim_domsid);
202 if (sib->sib_size && sib->sib_maps) {
203 free(sib->sib_maps);
204 sib->sib_maps = NULL;
339 smb_idmap_batch_getmappings(smb_idmap_batch_t *sib)
345 if ((stat = idmap_get_mappings(sib->sib_idmaph)) != IDMAP_SUCCESS) {
353 for (i = 0, sim = sib->sib_maps; i < sib->sib_nmap; i++, sim++) {
355 if (sib->sib_flags == SMB_IDMAP_SID2ID) {
363 if (smb_idmap_batch_binsid(sib) != 0)
377 smb_idmap_batch_binsid(smb_idmap_batch_t *sib)
383 if (sib->sib_flags & SMB_IDMAP_SID2ID)
387 sim = sib->sib_maps;
388 for (i = 0; i < sib->sib_nmap; sim++, i++) {