Lines Matching defs:sid
106 char *sid;
111 sizeof(*csid), &sid);
118 debug("sid: %s", sid);
120 err = sss_nss_getnamebysid(sid, name, &id_type);
127 /* FIXME: Map Samba Unix SIDs? (sid->id and use getpwuid)? */
134 static int sid_to_cifs_sid(struct sssd_ctx *ctx, const char *sid,
142 sid, &bsid, &length);
148 ctx_set_error(ctx, "too large sid length");
166 char *sid = NULL;
171 err = sss_nss_getsidbyname(name, &sid, &id_type);
182 if (sid_to_cifs_sid(ctx, sid, csid) != 0)
185 free(sid);
190 static int samba_unix_sid_to_id(const char *sid, struct cifs_uxid *cuxid)
195 if (sscanf(sid, "S-1-22-%hhu-%u", &type, &id) != 2)
215 static int sss_sid_to_id(struct sssd_ctx *ctx, const char *sid,
221 err = sss_nss_getidbysid(sid, (uint32_t *)&cuxid->id.uid, &id_type);
257 char *sid;
268 sizeof(csid[i]), &sid);
276 if (sss_sid_to_id(ctx, sid, &cuxid[i]) == 0 ||
277 samba_unix_sid_to_id(sid, &cuxid[i]) == 0) {
279 debug("setting uid of %s to %d", sid, cuxid[i].id.uid);
283 free(sid);
295 char *sid;
307 err = sss_nss_getsidbyid((uint32_t)cuxid[i].id.uid, &sid, &id_type);
316 if (sid_to_cifs_sid(ctx, sid, csid) == 0)
320 free(sid);