Lines Matching refs:unixname

490 	"columns unixname, is_user, u2w_order are not unique"},
635 if (!EMPTY_STRING(rule->unixname)) {
637 "AND unixname = %Q AND is_user = %d ",
638 rule->unixname, rule->is_user ? 1 : 0);
761 get_namerule_order(char *winname, char *windomain, char *unixname,
770 * 2. winname@domain (or winname) to unixname
772 * 4. winname@* to unixname
775 * 7. *@domain (or *) to unixname
778 * 10. *@* to unixname
791 else if (unixname == NULL)
796 if (*unixname == '*')
798 else if (EMPTY_NAME(unixname))
800 else /* unixname == name */
803 if (*unixname == '*')
805 else if (EMPTY_NAME(unixname))
811 if (*unixname == '*')
813 else if (EMPTY_NAME(unixname))
819 if (*unixname == '*')
821 else if (EMPTY_NAME(unixname))
830 * 1. unixname to "", non-diagonal
831 * 2. unixname to winname@domain (or winname), non-diagonal
832 * 3. unixname to "", diagonal
833 * 4. unixname to winname@domain (or winname), diagonal
845 if (unixname == NULL || EMPTY_NAME(unixname))
851 else if (*unixname == '*') {
886 rule->unixname, rule->direction,
919 "unixname, w2u_order, u2w_order) "
922 name, rule->is_nt4 ? 1 : 0, rule->unixname,
969 EMPTY_STRING(rule->winname) && EMPTY_STRING(rule->unixname))
1160 const char *winname, const char *unixname, boolean_t is_user,
1187 if (rule->unixname == NULL || unixname == NULL ||
1188 strcmp(rule->unixname, unixname) != 0) {
1189 if (rule->unixname != NULL) {
1190 free(rule->unixname);
1191 rule->unixname = NULL;
1193 if (unixname != NULL)
1194 rule->unixname = strdup(unixname);
1542 "unixname, u2w, is_wuser, "
1556 "unixname, u2w, is_wuser, "
1674 res->info.how.idmap_how_u.rule.unixname =
1894 char **unixname;
1974 unixname = dn = attr = value = NULL;
1982 unixname = &req->id2name;
1986 unixname = &req->id2name;
1989 unixname = &req->id2name;
1992 if (unixname != NULL) {
2034 &req->id2.idtype, unixname,
2049 &req->id2.idtype, unixname,
2072 * we are not retrieving unixname from
2091 * we are not retrieving unixname from
2138 * No SID and no winname but we've unixname.
2139 * Lookup AD by unixname to get SID.
2331 * If AD lookup by unixname or pid
2489 * unixname found will be placed here.
2727 * this request for AD lookup if we don't have unixname and
2877 * Name service lookup by unixname to get pid
2930 * Name service lookup by pid to get unixname
2934 ns_lookup_bypid(uid_t pid, int is_user, char **unixname)
2953 *unixname = strdup(pwd.pw_name);
2965 *unixname = strdup(grp.gr_name);
2967 if (*unixname == NULL)
2977 * Case 2: If rule matches and unixname is "" then return no mapping.
2979 * Case 3: If rule matches and unixname is specified then lookup name
2980 * service using the unixname. If unixname not found then return no mapping.
2982 * Case 4: If rule matches and unixname is * then lookup name service
2983 * using winname as the unixname. If unixname not found then process
2986 * This allows us to specify a fallback unixname per _domain_ or no mapping
3012 const char *unixname, *windomain;
3024 assert(req->id2name == NULL); /* We don't have unixname */
3061 "SELECT unixname, u2w_order, winname_display, windomain, is_nt4 "
3120 unixname = winname;
3123 unixname = values[0];
3127 retcode = ns_lookup_byname(unixname, lower_unixname,
3135 unixname);
3140 "%s not found, error", unixname);
3151 unixname, retcode);
3178 req->id2name = strdup(unixname);
3446 * If directory-based name mapping is enabled then the unixname
3463 * request and (3) the unixname has been retrieved
3469 * config/ad_unixuser_attr = "unixname"
3470 * config/ad_unixgroup_attr = "unixname"
3475 * unixname: bob1234
3480 * unixname: unixadmins
3482 * In this example whether "unixname" refers to a unixuser
3487 * "ad_unixgroup_attr (i.e unixname)" for directory-based
3518 * means the unixname (req->id2name),
3542 * If we don't have unixname then evaluate local name-based
3605 * unixname, well, we'd like to have it now for the cache.
3642 map_unixname = res->info.how.idmap_how_u.rule.unixname;
3668 "(sidprefix, rid, windomain, canon_winname, pid, unixname, "
3798 map_unixname = res->info.how.idmap_how_u.rule.unixname;
3817 "(sidprefix, rid, windomain, canon_winname, pid, unixname, "
3899 /* SQL to lookup the cache by pid or by unixname */
3917 "unixname = %Q AND u2w = 1 AND is_user = %d AND "
4029 res->info.how.idmap_how_u.rule.unixname =
4192 char **unixname)
4239 rid, wintype, unixname, NULL, &rc);
4407 name_based_mapping_pid2sid(lookup_state_t *state, const char *unixname,
4424 assert(unixname != NULL); /* We have unixname */
4430 "is_wuser, unixname, is_nt4 "
4433 "(unixname = %Q OR unixname = '*') "
4434 "ORDER BY u2w_order ASC;", is_user, unixname);
4488 winname = unixname;
4596 * unixname if given otherwise unixname found will be placed
4730 * will need to lookup AD using unixname to get the
4734 /* Get unixname if only pid is given. */
4751 * unixname/pid to get the corresponding winname.
4836 /* Get unixname from name service */
4857 /* Use unixname to evaluate local name-based mapping rules */