/sssd/src/sss_client/libwbclient/ |
H A D | wbc_idmap_common.c | 27 wbcErr wbcQuerySidToUid(const struct wbcDomainSid *sid, argument 35 struct wbcDomainSid *sid) 41 wbcErr wbcQuerySidToGid(const struct wbcDomainSid *sid, argument 50 struct wbcDomainSid *sid) 56 wbcErr wbcSetUidMapping(uid_t uid, const struct wbcDomainSid *sid) argument 62 wbcErr wbcSetGidMapping(gid_t gid, const struct wbcDomainSid *sid) argument 68 wbcErr wbcRemoveUidMapping(uid_t uid, const struct wbcDomainSid *sid) argument 74 wbcErr wbcRemoveGidMapping(gid_t gid, const struct wbcDomainSid *sid) argument 34 wbcQueryUidToSid(uid_t uid, struct wbcDomainSid *sid) argument 49 wbcQueryGidToSid(gid_t gid, struct wbcDomainSid *sid) argument
|
H A D | wbc_sid_common.c | 32 /* Convert a sid to a string into a buffer. Return the string 35 int wbcSidToStringBuf(const struct wbcDomainSid *sid, char *buf, int buflen) argument 40 if (!sid) { 46 id_auth = (uint64_t)sid->id_auth[5] + 47 ((uint64_t)sid->id_auth[4] << 8) + 48 ((uint64_t)sid->id_auth[3] << 16) + 49 ((uint64_t)sid->id_auth[2] << 24) + 50 ((uint64_t)sid->id_auth[1] << 32) + 51 ((uint64_t)sid->id_auth[0] << 40); 53 ofs = snprintf(buf, buflen, "S-%hhu-", (unsigned char)sid 70 wbcSidToString(const struct wbcDomainSid *sid, char **sid_string) argument 100 wbcStringToSid(const char *str, struct wbcDomainSid *sid) argument [all...] |
H A D | wbc_idmap_sssd.c | 30 wbcErr wbcSidToUid(const struct wbcDomainSid *sid, uid_t *puid) argument 38 wbc_status = wbcSidToString(sid, &sid_str); 59 wbcErr wbcUidToSid(uid_t uid, struct wbcDomainSid *sid) argument 76 wbc_status = wbcStringToSid(str_sid, sid); 87 * @param *sid Pointer to the domain SID to be resolved 94 wbcErr wbcSidToGid(const struct wbcDomainSid *sid, gid_t *pgid) argument 102 wbc_status = wbcSidToString(sid, &sid_str); 123 wbcErr wbcGidToSid(gid_t gid, struct wbcDomainSid *sid) argument 140 wbc_status = wbcStringToSid(str_sid, sid);
|
H A D | wbc_ctx_sssd.c | 59 struct wbcDomainSid *sid, 66 const struct wbcDomainSid *sid, 129 const struct wbcDomainSid *sid, 138 const struct wbcDomainSid *sid, 145 struct wbcDomainSid *sid) 151 const struct wbcDomainSid *sid, 158 struct wbcDomainSid *sid) 200 struct wbcDomainSid * sid, struct passwd **pwd) 56 wbcCtxLookupName(struct wbcContext *ctx, const char *dom_name, const char *name, struct wbcDomainSid *sid, enum wbcSidType *name_type) argument 65 wbcCtxLookupSid(struct wbcContext *ctx, const struct wbcDomainSid *sid, char **domain, char **name, enum wbcSidType *name_type) argument 128 wbcCtxGetDisplayName(struct wbcContext *ctx, const struct wbcDomainSid *sid, char **pdomain, char **pfullname, enum wbcSidType *pname_type) argument 137 wbcCtxSidToUid(struct wbcContext *ctx, const struct wbcDomainSid *sid, uid_t *puid) argument 144 wbcCtxUidToSid(struct wbcContext *ctx, uid_t uid, struct wbcDomainSid *sid) argument 150 wbcCtxSidToGid(struct wbcContext *ctx, const struct wbcDomainSid *sid, gid_t *pgid) argument 157 wbcCtxGidToSid(struct wbcContext *ctx, gid_t gid, struct wbcDomainSid *sid) argument 199 wbcCtxGetpwsid(struct wbcContext *ctx, struct wbcDomainSid * sid, struct passwd **pwd) argument
|
H A D | wbclient_sssd.h | 149 struct wbcDomainSid sid; member in struct:wbcSidWithAttr 183 struct wbcDomainSid sid; member in struct:wbcDomainInfo 360 * the 1st one is the account sid 361 * the 2nd one is the primary_group sid 574 * @brief Print a sid into a buffer 576 * @param sid Binary Security Identifier 582 int wbcSidToStringBuf(const struct wbcDomainSid *sid, char *buf, int buflen); 587 * @param sid Binary Security Identifier 592 wbcErr wbcSidToString(const struct wbcDomainSid *sid, 599 * @param sid Resultin [all...] |
H A D | wbc_sid_sssd.c | 60 struct wbcDomainSid *sid, 90 wbc_status = wbcStringToSid(str_sid, sid); 101 wbcErr wbcLookupSid(const struct wbcDomainSid *sid, argument 113 wbc_status = wbcSidToString(sid, &str_sid); 277 wbcErr wbcGetDisplayName(const struct wbcDomainSid *sid, argument 58 wbcLookupName(const char *domain, const char *name, struct wbcDomainSid *sid, enum wbcSidType *name_type) argument
|
/sssd/src/util/ |
H A D | well_known_sids.c | 54 const char *sid; member in struct:rid_sid_name 61 const char *sid; member in struct:special_map 142 static errno_t handle_special_sids(const char *sid, const char **dom, argument 147 if (!isdigit(sid[SPECIAL_SID_PREFIX_LEN]) 148 || sid[SPECIAL_SID_PREFIX_LEN + 1] != '-' 149 || !isdigit(sid[SPECIAL_SID_PREFIX_LEN + 2]) 150 || sid[SPECIAL_SID_PREFIX_LEN + 3] != '\0' ) { 155 if (sid[SPECIAL_SID_PREFIX_LEN] == sp_map[c].id_auth 156 && sid[SPECIAL_SID_PREFIX_LEN + 2] == sp_map[c].rid) { 167 const char **sid) 166 handle_special_names(const char *dom, const char *name, const char **sid) argument 182 handle_rid_to_name_map(const char *sid, size_t prefix_len, struct rid_sid_name *map, const char* dom_name, const char **dom, const char **name) argument 208 handle_name_to_sid_map(const char *name, struct rid_sid_name *map, const char **sid) argument 224 handle_nt_sids(const char *sid, const char **dom, const char **name) argument 231 handle_nt_names(const char *name, const char **sid) argument 236 handle_builtin_sids(const char *sid, const char **dom, const char **name) argument 243 handle_builtin_names(const char *name, const char **sid) argument 248 well_known_sid_to_name(const char *sid, const char **dom, const char **name) argument 281 name_to_well_known_sid(const char *dom, const char *name, const char **sid) argument [all...] |
/sssd/src/sss_client/idmap/ |
H A D | sss_nss_idmap.h | 49 * @param[out] sid String representation of the SID of the requested user 54 * - 0 (EOK): success, sid contains the requested SID 62 int sss_nss_getsidbyname(const char *fq_name, char **sid, 69 * @param[out] sid String representation of the SID of the requested user 76 int sss_nss_getsidbyid(uint32_t id, char **sid, enum sss_id_type *type); 81 * @param[in] sid String representation of the SID 89 int sss_nss_getnamebysid(const char *sid, char **fq_name, 95 * @param[in] sid String representation of the SID 102 int sss_nss_getidbysid(const char *sid, uint32_t *id, 115 * - 0 (EOK): success, sid contain [all...] |
H A D | sss_nss_idmap.c | 266 int sss_nss_getsidbyname(const char *fq_name, char **sid, argument 273 if (sid == NULL || fq_name == NULL || *fq_name == '\0') { 281 *sid = out.d.str; 288 int sss_nss_getsidbyid(uint32_t id, char **sid, enum sss_id_type *type) argument 294 if (sid == NULL) { 302 *sid = out.d.str; 309 int sss_nss_getnamebysid(const char *sid, char **fq_name, argument 316 if (fq_name == NULL || sid == NULL || *sid == '\0') { 320 inp.str = sid; 331 sss_nss_getidbysid(const char *sid, uint32_t *id, enum sss_id_type *id_type) argument [all...] |
/sssd/src/lib/cifs_idmap_sss/ |
H A D | cifs_idmap_sss.c | 106 char *sid; local 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, argument 142 sid, &bsid, &length); 148 ctx_set_error(ctx, "too large sid length"); 166 char *sid local 190 samba_unix_sid_to_id(const char *sid, struct cifs_uxid *cuxid) argument 215 sss_sid_to_id(struct sssd_ctx *ctx, const char *sid, struct cifs_uxid *cuxid) argument 257 char *sid; local 295 char *sid; local [all...] |
/sssd/src/responder/common/cache_req/plugins/ |
H A D | cache_req_object_by_sid.c | 34 return talloc_asprintf(mem_ctx, "SID:%s@%s", data->sid, domain->name); 42 return sss_ncache_check_sid(ncache, data->sid); 49 return sss_ncache_set_sid(ncache, false, data->sid); 59 return sysdb_search_object_by_sid(mem_ctx, domain, data->sid, data->attrs, 72 *_string = cr->data->sid; 106 const char *sid, 111 data = cache_req_data_sid(mem_ctx, CACHE_REQ_OBJECT_BY_SID, sid, attrs); 100 cache_req_object_by_sid_send(TALLOC_CTX *mem_ctx, struct tevent_context *ev, struct resp_ctx *rctx, struct sss_nc_ctx *ncache, int cache_refresh_percent, const char *domain, const char *sid, const char **attrs) argument
|
/sssd/src/lib/idmap/ |
H A D | sss_idmap.c | 37 /* Hold all parameters for unix<->sid mapping relevant for 50 char *sid; member in struct:idmap_domain_info 188 bool is_domain_sid(const char *sid) argument 195 if (sid == NULL || strncmp(sid, DOM_SID_PREFIX, DOM_SID_PREFIX_LEN) != 0) { 199 p = sid + DOM_SID_PREFIX_LEN; 304 ctx->free_func(dom->sid, ctx->alloc_pvt); 340 char *sid) 342 return sss_idmap_free_ptr(ctx, sid); 549 err = sss_idmap_check_collision_ex(dom->name, dom->sid, 339 sss_idmap_free_sid(struct sss_idmap_ctx *ctx, char *sid) argument 851 sss_idmap_sid_is_builtin(const char *sid) argument 860 parse_rid(const char *sid, size_t dom_prefix_len, long long *_rid) argument 876 is_sid_from_dom(const char *dom_sid, const char *sid, size_t *_dom_sid_len) argument 1016 add_dom_for_sid(struct sss_idmap_ctx *ctx, struct idmap_domain_info *matched_dom, const char *sid, uint32_t *_id) argument 1055 sss_idmap_sid_to_unix(struct sss_idmap_ctx *ctx, const char *sid, uint32_t *_id) argument 1106 sss_idmap_check_sid_unix(struct sss_idmap_ctx *ctx, const char *sid, uint32_t id) argument 1156 char *sid; local 1246 char *sid; local 1269 char *sid; local 1291 char *sid; local 1313 char *sid; local 1336 char *sid; local 1358 char *sid; local 1379 char *sid = NULL; local 1412 char *sid = NULL; local [all...] |
H A D | sss_idmap_conv.c | 226 const char *sid, 237 if (sid == NULL || (sid[0] != 'S' && sid[0] != 's') || sid[1] != '-') { 248 if (!isdigit(sid[2])) { 253 ul = strtoul(sid + 2, &r, 10); 330 const char *sid, 339 err = sss_idmap_sid_to_dom_sid(ctx, sid, &dom_sid); 369 char *sid local 225 sss_idmap_sid_to_dom_sid(struct sss_idmap_ctx *ctx, const char *sid, struct sss_dom_sid **_dom_sid) argument 329 sss_idmap_sid_to_bin_sid(struct sss_idmap_ctx *ctx, const char *sid, uint8_t **_bin_sid, size_t *_length) argument 393 sss_idmap_sid_to_smb_sid(struct sss_idmap_ctx *ctx, const char *sid, struct dom_sid **_smb_sid) argument 429 char *sid = NULL; local [all...] |
H A D | sss_idmap.h | 426 * @param[in] sid Zero-terminated string representation of the SID 437 const char *sid, 500 * @param[in] sid Zero-terminated string representation of the SID 511 const char *sid, 576 * @param[out] sid Zero-terminated string representation of the SID, must be 587 char **sid); 640 * @param[in] sid SID to be freed. 646 char *sid); 776 * @param[out] sid Zero-terminated string representation of the SID, 786 char **sid); [all...] |
/sssd/src/responder/common/cache_req/ |
H A D | cache_req_data.c | 85 if (input->sid == NULL) { 91 data->sid = talloc_strdup(data, input->sid); 92 if (data->sid == NULL) { 163 const char *sid, 168 input.sid = sid; 161 cache_req_data_sid(TALLOC_CTX *mem_ctx, enum cache_req_type type, const char *sid, const char **attrs) argument
|
H A D | cache_req_private.h | 69 const char *sid; member in struct:cache_req_data
|
/sssd/src/tests/cmocka/ |
H A D | test_sss_idmap.c | 93 const char *sid; local 101 sid = TEST_2_DOM_SID; 106 sid = TEST_DOM_SID; 110 err = sss_idmap_add_auto_domain_ex(test_ctx->idmap_ctx, name, sid, 114 err = sss_idmap_add_domain_ex(test_ctx->idmap_ctx, name, sid, &range, 123 err = sss_idmap_add_auto_domain_ex(test_ctx->idmap_ctx, name, sid, 127 err = sss_idmap_add_domain_ex(test_ctx->idmap_ctx, name, sid, &range, 140 const char *sid; local 147 sid = TEST_DOM_SID; 149 err = sss_idmap_calculate_range(test_ctx->idmap_ctx, sid, 315 char *sid = NULL; local 363 char *sid = NULL; local 408 char *sid = NULL; local 450 char *sid = NULL; local [all...] |
H A D | sss_nss_idmap-tests.c | 89 char *sid = NULL; local 111 ret = sss_nss_getsidbyname("", &sid, NULL); 113 free(sid); 114 sid = NULL; 119 ret = sss_nss_getsidbyname("test", &sid, &type); 122 assert_string_equal(sid, d[0].str); 125 free(sid); 126 sid = NULL;
|
H A D | test_utils.c | 221 char *sid; local 230 sid = talloc_asprintf(global_talloc_context, SID_TMPL, c); 231 assert_non_null(sid); 237 assert_string_equal(sid, dom->domain_id); 243 assert_string_equal(sid, dom->domain_id); 249 assert_string_equal(sid, dom->domain_id); 256 talloc_free(sid); 268 char *sid; local 289 sid = talloc_asprintf(global_talloc_context, SID_TMPL, c); 290 assert_non_null(sid); 339 char *sid; local 426 char *sid; local 458 char *sid; local 506 char *sid; local 981 const char *sid; local [all...] |
H A D | test_ipa_idmap.c | 42 char *sid; local 88 ret = get_idmap_data_from_range(&d[c].r, DOMAIN_NAME, &dom_name, &sid, 93 assert_null(sid); 95 assert_string_equal(sid, d[c].exp_sid);
|
/sssd/src/tests/ |
H A D | sss_idmap-tests.c | 358 char *sid; local 361 err = sss_idmap_unix_to_sid(idmap_ctx, exp_id, &sid); 373 err = sss_idmap_unix_to_sid(idmap_ctx, exp_id, &sid); 375 fail_unless(strcmp(sid, "S-1-5-21-1-2-3-4000000") == 0, 377 "expected [%s], got [%s].", "S-1-5-21-1-2-3-4000000", sid); 378 sss_idmap_free_sid(idmap_ctx, sid); 387 char *sid; local 390 err = sss_idmap_unix_to_sid(idmap_ctx, exp_id, &sid); 404 char *sid; local 408 err = sss_idmap_unix_to_sid(idmap_ctx, exp_id, &sid); 446 char *sid; local 453 "got [%s], expected [%s].", sid, sids[i]); local 504 char *sid; local 523 char *sid; local 556 char *sid = NULL; local 582 char *sid = NULL; local 712 char *sid = NULL; local 720 test_sid, sid); local 787 char *sid = NULL; local 794 test_sid, sid); local [all...] |
/sssd/src/python/ |
H A D | pysss_nss_idmap.c | 28 #define SSS_SID_KEY "sid" 88 char *sid = NULL; local 96 ret = sss_nss_getsidbyname(name, &sid, &id_type); 99 PyUnicode_FromString(sid), PYNUMBER_FROMLONG(id_type)); 101 free(sid); 109 const char *sid; local 113 sid = py_string_or_unicode_as_string(py_sid); 114 if (sid == NULL) { 118 ret = sss_nss_getnamebysid(sid, &name, &id_type); 133 char *sid local 194 const char *sid; local [all...] |
/sssd/src/lib/winbind_idmap_sss/ |
H A D | winbind_idmap_sss.c | 70 struct dom_sid *sid; local 111 err = sss_idmap_sid_to_smb_sid(ctx->idmap_ctx, sid_str, &sid); 117 memcpy(map[c]->sid, sid, sizeof(struct dom_sid)); 118 sss_idmap_free_smb_sid(ctx->idmap_ctx, sid); 151 err = sss_idmap_smb_sid_to_sid(ctx->idmap_ctx, map[c]->sid, &sid_str);
|
H A D | winbind_idmap_sss.h | 62 struct dom_sid *sid; member in struct:id_map
|
/sssd/src/responder/common/ |
H A D | negcache.h | 44 int sss_ncache_check_sid(struct sss_nc_ctx *ctx, const char *sid); 70 int sss_ncache_set_sid(struct sss_nc_ctx *ctx, bool permanent, const char *sid);
|