Lines Matching defs:sib

50 static int smb_idmap_batch_binsid(smb_idmap_batch_t *sib);
75 smb_idmap_batch_t sib;
78 stat = smb_idmap_batch_create(&sib, 1, SMB_IDMAP_ID2SID);
82 stat = smb_idmap_batch_getsid(sib.sib_idmaph, &sib.sib_maps[0],
86 smb_idmap_batch_destroy(&sib);
90 stat = smb_idmap_batch_getmappings(&sib);
93 smb_idmap_batch_destroy(&sib);
97 *sid = smb_sid_dup(sib.sib_maps[0].sim_sid);
99 smb_idmap_batch_destroy(&sib);
112 smb_idmap_batch_t sib;
116 stat = smb_idmap_batch_create(&sib, 1, SMB_IDMAP_SID2ID);
120 sim = &sib.sib_maps[0];
122 stat = smb_idmap_batch_getid(sib.sib_idmaph, sim, sid, *id_type);
124 smb_idmap_batch_destroy(&sib);
128 stat = smb_idmap_batch_getmappings(&sib);
131 smb_idmap_batch_destroy(&sib);
136 smb_idmap_batch_destroy(&sib);
147 smb_idmap_batch_create(smb_idmap_batch_t *sib, uint16_t nmap, int flags)
151 if (!sib)
154 bzero(sib, sizeof (smb_idmap_batch_t));
155 stat = idmap_get_create(&sib->sib_idmaph);
162 sib->sib_flags = flags;
163 sib->sib_nmap = nmap;
164 sib->sib_size = nmap * sizeof (smb_idmap_t);
165 sib->sib_maps = kmem_zalloc(sib->sib_size, KM_SLEEP);
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);
199 free(sib->sib_maps[i].sim_domsid);
203 if (sib->sib_size && sib->sib_maps) {
204 kmem_free(sib->sib_maps, sib->sib_size);
205 sib->sib_maps = NULL;
340 smb_idmap_batch_getmappings(smb_idmap_batch_t *sib)
346 if ((stat = idmap_get_mappings(sib->sib_idmaph)) != IDMAP_SUCCESS) {
354 for (i = 0, sim = sib->sib_maps; i < sib->sib_nmap; i++, sim++) {
356 if (sib->sib_flags == SMB_IDMAP_SID2ID) {
366 if (smb_idmap_batch_binsid(sib) != 0)
380 smb_idmap_batch_binsid(smb_idmap_batch_t *sib)
386 if (sib->sib_flags & SMB_IDMAP_SID2ID)
390 sim = sib->sib_maps;
391 for (i = 0; i < sib->sib_nmap; sim++, i++) {