Lines Matching defs:req

65 #define	DO_NOT_ALLOC_NEW_ID_MAPPING(req)\
66 (req->flag & IDMAP_REQ_FLG_NO_NEW_ID_ALLOC)
68 #define AVOID_NAMESERVICE(req)\
69 (req->flag & IDMAP_REQ_FLG_NO_NAMESERVICE)
71 #define ALLOW_WK_OR_LOCAL_SIDS_ONLY(req)\
72 (req->flag & IDMAP_REQ_FLG_WK_OR_LOCAL_SIDS_ONLY)
1224 lookup_wksids_sid2pid(idmap_mapping *req, idmap_id_res *res, int *is_wksid)
1230 assert(req->id1.idmap_id_u.sid.prefix != NULL ||
1231 req->id1name != NULL);
1233 if (req->id1.idmap_id_u.sid.prefix != NULL) {
1234 wksid = find_wksid_by_sid(req->id1.idmap_id_u.sid.prefix,
1235 req->id1.idmap_id_u.sid.rid, res->id.idtype);
1237 wksid = find_wksid_by_name(req->id1name, req->id1domain,
1246 if (req->id1name == NULL) {
1247 req->id1name = strdup(wksid->winname);
1248 if (req->id1name == NULL)
1253 if (req->id1.idmap_id_u.sid.prefix == NULL) {
1255 req->id1.idmap_id_u.sid.prefix =
1259 req->id1.idmap_id_u.sid.prefix =
1263 if (req->id1.idmap_id_u.sid.prefix == NULL)
1265 req->id1.idmap_id_u.sid.rid = wksid->rid;
1269 if (req->id1domain == NULL) {
1277 req->id1domain = strdup(dom);
1279 if (req->id1domain == NULL)
1284 req->direction |= _IDMAP_F_DONT_UPDATE_NAMECACHE;
1286 req->id1.idtype = wksid->is_wuser ? IDMAP_USID : IDMAP_GSID;
1340 lookup_wksids_pid2sid(idmap_mapping *req, idmap_id_res *res, int is_user)
1344 wksid = find_wksid_by_pid(req->id1.idmap_id_u.uid, is_user);
1369 if (req->id2name == NULL) {
1370 req->id2name = strdup(wksid->winname);
1371 if (req->id2name == NULL)
1376 if (req->id2domain == NULL) {
1384 req->id2domain = strdup(dom);
1386 if (req->id2domain == NULL)
1501 lookup_cache_sid2pid(sqlite *cache, idmap_mapping *req, idmap_id_res *res)
1540 if (req->id1.idmap_id_u.sid.prefix != NULL) {
1550 is_user_string, req->id1.idmap_id_u.sid.prefix,
1551 req->id1.idmap_id_u.sid.rid, curtime);
1552 } else if (req->id1name != NULL) {
1553 if ((lower_name = tolower_u8(req->id1name)) == NULL)
1554 lower_name = req->id1name;
1564 is_user_string, lower_name, req->id1domain,
1566 if (lower_name != req->id1name)
1610 if (!DO_NOT_ALLOC_NEW_ID_MAPPING(req) &&
1611 !AVOID_NAMESERVICE(req) &&
1617 req->direction |= is_user
1635 if (req->id2name != NULL)
1636 free(req->id2name);
1637 req->id2name = strdup(values[3]);
1638 if (req->id2name == NULL) {
1644 req->id1.idtype = strncmp(values[5], "0", 2) ?
1647 if (req->flag & IDMAP_REQ_FLG_MAPPING_INFO) {
1815 * Used when mapping win to unix i.e. req->id1 is windows id and
1816 * req->id2 is unix id
1820 lookup_name_cache(sqlite *cache, idmap_mapping *req, idmap_id_res *res)
1829 if (req->id1.idmap_id_u.sid.prefix != NULL && req->id1name != NULL) {
1834 if (req->id1.idmap_id_u.sid.prefix != NULL) {
1837 req->id1.idmap_id_u.sid.prefix,
1838 req->id1.idmap_id_u.sid.rid, &name, &domain, &type);
1841 retcode = lookup_cache_name2sid(cache, req->id1name,
1842 req->id1domain, &name, &sidprefix, &rid, &type);
1847 TRACE(req, res, "Not found in name cache");
1849 TRACE(req, res, "Name cache lookup error=%d", retcode);
1857 req->id1.idtype = type;
1859 req->direction |= _IDMAP_F_DONT_UPDATE_NAMECACHE;
1866 free(req->id1name);
1867 req->id1name = name;
1870 free(req->id1domain);
1871 req->id1domain = domain;
1874 if (req->id1.idmap_id_u.sid.prefix == NULL) {
1875 req->id1.idmap_id_u.sid.prefix = sidprefix;
1876 req->id1.idmap_id_u.sid.rid = rid;
1879 TRACE(req, res, "Found in name cache");
1895 idmap_mapping *req;
1904 * Since req->id2.idtype is unused, we will use it here
1907 * from mis-interpreting req->id2 when it tries to free
1911 * be an option if req->id2.idtype cannot be re-used in
1914 * Similarly, we use req->id2.idmap_id_u.uid to return
1917 * the query always puts the result in req->id2.idmap_id_u.uid,
1949 req = &batch->idmap_mapping_batch_val[i];
1954 req->id2.idtype = IDMAP_NONE;
1955 req->id2.idmap_id_u.uid = IDMAP_SENTINEL_PID;
1958 if (!(req->direction & _IDMAP_F_LOOKUP_AD))
1962 if (req->direction & _IDMAP_F_LOOKUP_OTHER_AD)
1969 if (IS_ID_SID(req->id1)) {
1978 req->id2name == NULL) {
1982 unixname = &req->id2name;
1986 unixname = &req->id2name;
1989 unixname = &req->id2name;
2012 pid = &req->id2.idmap_id_u.uid;
2024 if (req->id1.idmap_id_u.sid.prefix != NULL) {
2027 qs, req->id1.idmap_id_u.sid.prefix,
2028 &req->id1.idmap_id_u.sid.rid, esidtype,
2030 (req->id1name == NULL) ?
2031 &req->id1name : NULL,
2032 (req->id1domain == NULL) ?
2033 &req->id1domain : NULL,
2034 &req->id2.idtype, unixname,
2041 assert(req->id1name != NULL);
2043 qs, req->id1name, req->id1domain,
2046 &req->id1name,
2047 &req->id1.idmap_id_u.sid.prefix,
2048 &req->id1.idmap_id_u.sid.rid,
2049 &req->id2.idtype, unixname,
2056 } else if (IS_ID_UID(req->id1) || IS_ID_GID(req->id1)) {
2061 req->id2name != NULL) {
2081 &req->id2name,
2082 &req->id2domain, &req->id2.idtype,
2086 } else if (req->id2name != NULL) {
2095 qs, req->id2name, req->id2domain,
2100 &req->id2.idtype, NULL,
2108 assert(req->id1.idmap_id_u.uid !=
2110 is_user = IS_ID_UID(req->id1);
2126 qs, req->id1.idmap_id_u.uid, is_user,
2132 &req->id2name, &req->id2domain,
2133 &req->id2.idtype, &res->retcode);
2136 } else if (req->id1name != NULL) {
2141 is_user = (IS_ID_UID(req->id1)) ? 1 : 0;
2153 qs, req->id1name, is_user, is_wuser,
2159 &req->id2name, &req->id2domain,
2160 &req->id2.idtype, &res->retcode);
2167 req->direction |= _IDMAP_F_LOOKUP_OTHER_AD;
2196 req = &batch->idmap_mapping_batch_val[i];
2197 req->direction |= _IDMAP_F_LOOKUP_OTHER_AD;
2209 * 2. Reset req->id2.idtype to IDMAP_NONE
2219 req = &batch->idmap_mapping_batch_val[i];
2220 type = req->id2.idtype;
2221 req->id2.idtype = IDMAP_NONE;
2222 posix_id = req->id2.idmap_id_u.uid;
2223 req->id2.idmap_id_u.uid = IDMAP_SENTINEL_PID;
2229 if (!(req->direction & _IDMAP_F_LOOKUP_AD))
2236 if (req->direction & _IDMAP_F_LOOKUP_OTHER_AD) {
2237 req->direction &= ~_IDMAP_F_LOOKUP_OTHER_AD;
2245 req->direction &= ~(_IDMAP_F_LOOKUP_AD);
2262 if (IS_ID_SID(req->id1)) {
2264 TRACE(req, res, "Not found in AD");
2268 TRACE(req, res, "AD lookup error=%d",
2290 req->id1.idtype = IDMAP_USID;
2309 req->id1.idtype = IDMAP_GSID;
2316 TRACE(req, res, "Found in AD");
2318 req->id1name != NULL &&
2319 (req->id2name == NULL ||
2322 req->direction |= _IDMAP_F_LOOKUP_NLDAP;
2325 } else if (IS_ID_UID(req->id1) || IS_ID_GID(req->id1)) {
2329 req->id2name == NULL) {
2343 TRACE(req, res,
2346 TRACE(req, res,
2351 TRACE(req, res, "AD lookup error");
2367 TRACE(req, res, "Found in AD");
2385 idmap_mapping *req;
2394 req = &batch->idmap_mapping_batch_val[i];
2398 if (!(req->direction & _IDMAP_F_LOOKUP_AD) ||
2413 req = &batch->idmap_mapping_batch_val[i];
2415 if (!(req->direction & _IDMAP_F_LOOKUP_AD))
2417 req->direction &= ~(_IDMAP_F_LOOKUP_AD);
2451 req = &batch->idmap_mapping_batch_val[j];
2453 if (!(req->direction & _IDMAP_F_LOOKUP_AD))
2455 req->direction &= ~(_IDMAP_F_LOOKUP_AD);
2472 * req->id1name =
2475 * req->id1domain =
2478 * req->id1.idtype =
2484 * req->id1..sid.[prefix, rid] =
2488 * req->id2name =
2490 * req->id2domain =
2493 * Target type initialized from req->id2.idtype. If
2506 * req->direction =
2510 * req->id2.idtype =
2516 * mis-interpreting the contents of req->id2.
2517 * req->id2.idmap_id_u.uid =
2534 sid2pid_first_pass(lookup_state_t *state, idmap_mapping *req,
2541 res->id.idtype = req->id2.idtype;
2546 if (EMPTY_STRING(req->id1.idmap_id_u.sid.prefix)) {
2548 if (req->id1name == NULL) {
2554 free(req->id1.idmap_id_u.sid.prefix);
2555 req->id1.idmap_id_u.sid.prefix = NULL;
2558 if (req->id1domain == NULL) {
2560 p = strchr(req->id1name, '@');
2563 q = req->id1name;
2564 req->id1name = uu_strndup(q, p - req->id1name);
2565 req->id1domain = strdup(p+1);
2567 if (req->id1name == NULL ||
2568 req->id1domain == NULL) {
2577 retcode = lookup_wksids_sid2pid(req, res, &wksid);
2580 TRACE(req, res, "Hardwired mapping");
2583 TRACE(req, res,
2590 TRACE(req, res, "Well-known account");
2592 TRACE(req, res, "Not a well-known account");
2595 retcode = lookup_localsid2pid(req, res);
2597 TRACE(req, res, "Local SID");
2600 TRACE(req, res,
2604 TRACE(req, res, "Not a local SID");
2606 if (ALLOW_WK_OR_LOCAL_SIDS_ONLY(req)) {
2619 if (req->id1.idmap_id_u.sid.prefix == NULL &&
2620 req->id1name != NULL && req->id1domain == NULL) {
2625 req->id1domain = strdup(state->defdom);
2626 if (req->id1domain == NULL) {
2630 TRACE(req, res, "Added default domain");
2634 retcode = lookup_cache_sid2pid(state->cache, req, res);
2636 TRACE(req, res, "Found in mapping cache");
2639 TRACE(req, res, "Mapping cache lookup error=%d", retcode);
2642 TRACE(req, res, "Not found in mapping cache");
2644 if (DO_NOT_ALLOC_NEW_ID_MAPPING(req) || AVOID_NAMESERVICE(req)) {
2658 retcode = lookup_name_cache(state->cache, req, res);
2661 if (req->id1.idtype == IDMAP_USID)
2675 if (req->id1.idmap_id_u.sid.prefix != NULL &&
2676 req->id1name == NULL) {
2679 req->id1.idmap_id_u.sid.prefix,
2680 req->id1.idmap_id_u.sid.rid,
2681 &req->id1name, &req->id1domain, &req->id1.idtype);
2683 TRACE(req, res, "Found with LSA");
2685 TRACE(req, res, "Not found with LSA");
2687 TRACE(req, res, "LSA error %d", retcode);
2691 } else if (req->id1name != NULL &&
2692 req->id1.idmap_id_u.sid.prefix == NULL) {
2697 req->id1name, req->id1domain,
2698 &req->id1.idmap_id_u.sid.prefix,
2699 &req->id1.idmap_id_u.sid.rid,
2701 &req->id1.idtype);
2703 free(req->id1name);
2704 req->id1name = canonname;
2705 free(req->id1domain);
2706 req->id1domain = canondomain;
2707 TRACE(req, res, "Found with LSA");
2709 TRACE(req, res, "Not found with LSA");
2711 TRACE(req, res, "LSA error %d", retcode);
2723 req->direction |= _IDMAP_F_NOTDONE;
2733 (!wksid && req->id2name == NULL &&
2738 req->direction |= _IDMAP_F_LOOKUP_AD;
2741 req->direction |= _IDMAP_F_LOOKUP_NLDAP;
2752 if (ARE_WE_DONE(req->direction) && res->retcode != IDMAP_SUCCESS)
2764 generate_localsid(idmap_mapping *req, idmap_id_res *res, int is_user,
2781 req->id1.idmap_id_u.uid + LOCALRID_UID_MIN > LOCALRID_UID_MAX)
2798 (is_user) ? req->id1.idmap_id_u.uid + LOCALRID_UID_MIN :
2799 req->id1.idmap_id_u.gid + LOCALRID_GID_MIN;
2813 req->direction |= _IDMAP_F_DONT_UPDATE_NAMECACHE;
2819 lookup_localsid2pid(idmap_mapping *req, idmap_id_res *res)
2829 if ((sidprefix = req->id1.idmap_id_u.sid.prefix) == NULL)
2832 rid = req->id1.idmap_id_u.sid.rid;
3010 idmap_mapping *req, idmap_id_res *res)
3023 assert(req->id1name != NULL); /* We have winname */
3024 assert(req->id2name == NULL); /* We don't have unixname */
3026 winname = req->id1name;
3027 windomain = req->id1domain;
3029 switch (req->id1.idtype) {
3092 TRACE(req, res, "Matching rule: %s@%s -> %s",
3110 TRACE(req, res, "Mapping inhibited");
3133 TRACE(req, res,
3139 TRACE(req, res,
3150 TRACE(req, res, "Looking up %s error=%d",
3155 TRACE(req, res, "No matching rule");
3178 req->id2name = strdup(unixname);
3179 if (req->id2name == NULL) {
3183 TRACE(req, res, "UNIX name found");
3193 TRACE(req, res, "Rule processing error, code=%d", retcode);
3338 idmap_mapping *req, idmap_id_res *res)
3352 get_from_sid_history(state, req->id1.idmap_id_u.sid.prefix,
3353 req->id1.idmap_id_u.sid.rid, &next_pid)) {
3373 add_to_sid_history(state, req->id1.idmap_id_u.sid.prefix,
3374 req->id1.idmap_id_u.sid.rid);
3381 idmap_mapping *req, idmap_id_res *res)
3387 if (ARE_WE_DONE(req->direction))
3393 !EMPTY_STRING(req->id1.idmap_id_u.sid.prefix) &&
3394 EMPTY_STRING(req->id1name)) {
3401 if (req->id1.idtype == IDMAP_SID)
3402 req->id1.idtype = IDMAP_USID;
3405 TRACE(req, res, "Assume unresolvable SID is user");
3407 TRACE(req, res, "Must map unresolvable SID to user");
3409 TRACE(req, res, "Must map unresolvable SID to group");
3425 if (req->id2name == NULL) {
3433 res->id.idtype == IDMAP_UID, &req->id2name);
3435 TRACE(req, res,
3439 TRACE(req, res, "Found UNIX name");
3450 if (req->id2name != NULL) {
3502 ((req->id1.idtype == IDMAP_USID &&
3504 (req->id1.idtype == IDMAP_GSID &&
3506 TRACE(req, res, "Ignoring UNIX name found in AD");
3507 free(req->id2name);
3508 req->id2name = NULL;
3513 retcode = ns_lookup_byname(req->id2name,
3518 * means the unixname (req->id2name),
3527 TRACE(req, res,
3531 TRACE(req, res, "UNIX lookup");
3545 retcode = name_based_mapping_sid2pid(state, req, res);
3547 TRACE(req, res, "Rule-based mapping");
3550 TRACE(req, res, "Rule-based mapping error=%d", retcode);
3556 retcode = dynamic_ephemeral_mapping(state, req, res);
3558 TRACE(req, res, "Ephemeral mapping");
3561 TRACE(req, res, "Ephemeral mapping error=%d", retcode);
3568 req->direction = _IDMAP_F_DONE;
3571 if (!ARE_WE_DONE(req->direction))
3578 idmap_mapping *req, idmap_id_res *res)
3592 if (ARE_WE_DONE(req->direction))
3600 assert(req->id1.idmap_id_u.uid != IDMAP_SENTINEL_PID);
3616 if (req->id1name == NULL) {
3617 retcode2 = ns_lookup_bypid(req->id1.idmap_id_u.uid,
3618 req->id1.idtype == IDMAP_UID, &req->id1name);
3620 TRACE(req, res, "Found UNIX name");
3622 TRACE(req, res, "Getting UNIX name error=%d", retcode2);
3676 req->id2domain, req->id2name, req->id1.idmap_id_u.uid,
3677 req->id1name, (req->id1.idtype == IDMAP_UID) ? 1 : 0,
3699 if (req->direction & _IDMAP_F_DONT_UPDATE_NAMECACHE)
3702 if (req->id2name == NULL)
3709 req->id2name, req->id2domain,
3728 idmap_mapping *req, idmap_id_res *res)
3742 if (ARE_WE_DONE(req->direction))
3749 if (req->direction & _IDMAP_F_EXP_EPH_UID)
3751 else if (req->direction & _IDMAP_F_EXP_EPH_GID)
3762 req->id1.idmap_id_u.sid.prefix,
3763 req->id1.idmap_id_u.sid.rid,
3824 req->id1.idmap_id_u.sid.prefix, req->id1.idmap_id_u.sid.rid,
3825 (req->id1domain != NULL) ? req->id1domain : "", req->id1name,
3826 res->id.idmap_id_u.uid, req->id2name,
3828 (req->id1.idtype == IDMAP_USID) ? 1 : 0,
3849 if (req->direction & _IDMAP_F_DONT_UPDATE_NAMECACHE)
3852 if (EMPTY_STRING(req->id1name))
3858 req->id1.idmap_id_u.sid.prefix, req->id1.idmap_id_u.sid.rid,
3859 req->id1name, req->id1domain,
3860 req->id1.idtype, state->name_cache_timeout);
3878 lookup_cache_pid2sid(sqlite *cache, idmap_mapping *req, idmap_id_res *res,
3900 if (req->id1.idmap_id_u.uid != IDMAP_SENTINEL_PID) {
3910 req->id1.idmap_id_u.uid, is_user, curtime);
3911 } else if (req->id1name != NULL) {
3921 req->id1name, is_user, curtime);
3981 req->id2name = strdup(values[2]);
3982 if (req->id2name == NULL) {
3990 req->id2domain = strdup(values[3]);
3991 if (req->id2domain == NULL) {
4002 if (req->flag & IDMAP_REQ_FLG_MAPPING_INFO) {
4287 * *req Request (direction is updated)
4302 idmap_mapping *req,
4317 req->direction |= _IDMAP_F_DONT_UPDATE_NAMECACHE;
4327 req->direction |= _IDMAP_F_DONT_UPDATE_NAMECACHE;
4408 int is_user, idmap_mapping *req, idmap_id_res *res)
4425 assert(req->id2name == NULL); /* We don't have winname */
4458 TRACE(req, res, "Matching rule: %s -> %s@%s",
4482 TRACE(req, res, "Mapping inhibited");
4500 TRACE(req, res,
4505 TRACE(req, res,
4516 &res->id.idtype, req, 0);
4522 TRACE(req, res,
4527 TRACE(req, res,
4533 TRACE(req, res,
4547 TRACE(req, res, "No matching rule");
4568 req->id2name = canonname;
4569 req->id2domain = canondomain;
4575 TRACE(req, res, "Windows name found");
4595 * req->id1name =
4598 * req->id1domain =
4600 * req->id1.idtype =
4602 * req->id1..[uid or gid] =
4606 * req->id2name =
4608 * req->id2domain =
4611 * Target type initialized from req->id2.idtype. If
4614 * req->id..sid.[prefix, rid] =
4624 * req->direction =
4628 * req->id2.idtype =
4634 * mis-interpreting the contents of req->id2.
4635 * req->id2..[uid or gid or sid] =
4649 pid2sid_first_pass(lookup_state_t *state, idmap_mapping *req,
4657 res->id.idtype = req->id2.idtype;
4660 if (req->id2.idmap_id_u.sid.prefix != NULL) {
4662 free(req->id2.idmap_id_u.sid.prefix);
4663 req->id2.idmap_id_u.sid.prefix = NULL;
4667 if (req->id1.idmap_id_u.uid == IDMAP_SENTINEL_PID) {
4668 if (req->id1name == NULL) {
4673 retcode = ns_lookup_byname(req->id1name, NULL, &req->id1);
4675 TRACE(req, res, "Getting UNIX ID error=%d", retcode);
4679 TRACE(req, res, "Found UNIX ID");
4683 retcode = lookup_wksids_pid2sid(req, res, is_user);
4685 TRACE(req, res, "Hardwired mapping");
4688 TRACE(req, res,
4694 retcode = lookup_cache_pid2sid(state->cache, req, res, is_user);
4696 TRACE(req, res, "Found in mapping cache");
4699 TRACE(req, res,
4703 TRACE(req, res, "Not found in mapping cache");
4706 if (IDMAP_ID_IS_EPHEMERAL(req->id1.idmap_id_u.uid)) {
4708 TRACE(req, res, "Shouldn't have an ephemeral ID here");
4712 if (DO_NOT_ALLOC_NEW_ID_MAPPING(req)) {
4717 if (AVOID_NAMESERVICE(req)) {
4725 req->direction |= _IDMAP_F_LOOKUP_AD;
4727 } else if (AD_MODE(req->id1.idtype, state)) {
4733 if (req->id1name == NULL) {
4735 retcode = ns_lookup_bypid(req->id1.idmap_id_u.uid,
4736 is_user, &req->id1name);
4738 TRACE(req, res,
4743 TRACE(req, res, "Found UNIX name");
4745 req->direction |= _IDMAP_F_LOOKUP_AD;
4747 } else if (NLDAP_OR_MIXED_MODE(req->id1.idtype, state)) {
4753 req->direction |= _IDMAP_F_LOOKUP_NLDAP;
4762 req->direction |= _IDMAP_F_NOTDONE;
4767 if (ARE_WE_DONE(req->direction) && res->retcode != IDMAP_SUCCESS) {
4769 retcode2 = generate_localsid(req, res, is_user, TRUE);
4771 TRACE(req, res, "Generate local SID");
4773 TRACE(req, res,
4781 pid2sid_second_pass(lookup_state_t *state, idmap_mapping *req,
4789 if (ARE_WE_DONE(req->direction))
4807 if (req->id2name != NULL) {
4810 TRACE(req, res, "Windows name but no SID");
4816 else if (AD_MODE(req->id1.idtype, state))
4818 else if (NLDAP_MODE(req->id1.idtype, state))
4820 else if (MIXED_MODE(req->id1.idtype, state))
4835 if (req->id1name == NULL) {
4837 retcode = ns_lookup_bypid(req->id1.idmap_id_u.uid, is_user,
4838 &req->id1name);
4840 TRACE(req, res,
4844 TRACE(req, res, "Found UNIX name");
4845 } else if (req->id1.idmap_id_u.uid == IDMAP_SENTINEL_PID) {
4847 retcode = ns_lookup_byname(req->id1name, NULL, &req->id1);
4849 TRACE(req, res,
4854 TRACE(req, res, "Found UNIX ID");
4858 retcode = name_based_mapping_pid2sid(state, req->id1name, is_user,
4859 req, res);
4861 retcode = generate_localsid(req, res, is_user, FALSE);
4863 TRACE(req, res, "Generated local SID");
4865 TRACE(req, res,
4874 req->direction = _IDMAP_F_DONE;
4875 free(req->id2name);
4876 req->id2name = NULL;
4877 free(req->id2domain);
4878 req->id2domain = NULL;
4880 retcode2 = generate_localsid(req, res, is_user, TRUE);
4882 TRACE(req, res, "Generate local SID");
4884 TRACE(req, res,
4890 if (!ARE_WE_DONE(req->direction))