Lines Matching refs:u8s
301 nfs_idmap_str_uid(utf8string *u8s, uid_t *uid, bool_t isserver) in nfs_idmap_str_uid() argument
317 if (!u8s || !u8s->utf8string_val || u8s->utf8string_len == 0 || in nfs_idmap_str_uid()
318 (u8s->utf8string_val[0] == '\0')) { in nfs_idmap_str_uid()
326 if (bcmp(u8s->utf8string_val, "nobody", 6) == 0) { in nfs_idmap_str_uid()
347 (!utf8_strchr(u8s, '@') && !isserver)) { in nfs_idmap_str_uid()
350 error = nfs_idmap_s2i_literal(u8s, uid, isserver); in nfs_idmap_str_uid()
362 if (nfs_idmap_cache_s2i_lkup(&nig->s2u_ci, u8s, &hashno, uid)) { in nfs_idmap_str_uid()
368 mapargp = kmem_alloc(MAPID_ARG_LEN(u8s->utf8string_len), KM_SLEEP); in nfs_idmap_str_uid()
370 mapargp->u_arg.len = u8s->utf8string_len; in nfs_idmap_str_uid()
371 (void) bcopy(u8s->utf8string_val, mapargp->str, mapargp->u_arg.len); in nfs_idmap_str_uid()
395 u8s, HQ_HASH_HINT, hashno); in nfs_idmap_str_uid()
437 kmem_free(mapargp, MAPID_ARG_LEN(u8s->utf8string_len)); in nfs_idmap_str_uid()
444 kmem_free(mapargp, MAPID_ARG_LEN(u8s->utf8string_len)); in nfs_idmap_str_uid()
514 nfs_idmap_uid_str(uid_t uid, utf8string *u8s, bool_t isserver) in nfs_idmap_uid_str() argument
536 (void) str_to_utf8("nobody", u8s); in nfs_idmap_uid_str()
556 nfs_idmap_i2s_literal(uid, u8s); in nfs_idmap_uid_str()
561 if (nfs_idmap_cache_i2s_lkup(&nig->u2s_ci, uid, &hashno, u8s)) { in nfs_idmap_uid_str()
591 (void) str_to_utf8(resp->str, u8s); in nfs_idmap_uid_str()
593 u8s, HQ_HASH_HINT, hashno); in nfs_idmap_uid_str()
670 nfs_idmap_i2s_literal(uid, u8s); in nfs_idmap_uid_str()
680 nfs_idmap_str_gid(utf8string *u8s, gid_t *gid, bool_t isserver) in nfs_idmap_str_gid() argument
696 if (!u8s || !u8s->utf8string_val || u8s->utf8string_len == 0 || in nfs_idmap_str_gid()
697 (u8s->utf8string_val[0] == '\0')) { in nfs_idmap_str_gid()
705 if (bcmp(u8s->utf8string_val, "nobody", 6) == 0) { in nfs_idmap_str_gid()
726 (!utf8_strchr(u8s, '@') && !isserver)) { in nfs_idmap_str_gid()
729 error = nfs_idmap_s2i_literal(u8s, gid, isserver); in nfs_idmap_str_gid()
741 if (nfs_idmap_cache_s2i_lkup(&nig->s2g_ci, u8s, &hashno, gid)) { in nfs_idmap_str_gid()
747 mapargp = kmem_alloc(MAPID_ARG_LEN(u8s->utf8string_len), KM_SLEEP); in nfs_idmap_str_gid()
749 mapargp->u_arg.len = u8s->utf8string_len; in nfs_idmap_str_gid()
750 (void) bcopy(u8s->utf8string_val, mapargp->str, mapargp->u_arg.len); in nfs_idmap_str_gid()
775 u8s, HQ_HASH_HINT, hashno); in nfs_idmap_str_gid()
817 kmem_free(mapargp, MAPID_ARG_LEN(u8s->utf8string_len)); in nfs_idmap_str_gid()
824 kmem_free(mapargp, MAPID_ARG_LEN(u8s->utf8string_len)); in nfs_idmap_str_gid()
894 nfs_idmap_gid_str(gid_t gid, utf8string *u8s, bool_t isserver) in nfs_idmap_gid_str() argument
916 (void) str_to_utf8("nobody", u8s); in nfs_idmap_gid_str()
936 nfs_idmap_i2s_literal(gid, u8s); in nfs_idmap_gid_str()
941 if (nfs_idmap_cache_i2s_lkup(&nig->g2s_ci, gid, &hashno, u8s)) { in nfs_idmap_gid_str()
971 (void) str_to_utf8(resp->str, u8s); in nfs_idmap_gid_str()
973 u8s, HQ_HASH_HINT, hashno); in nfs_idmap_gid_str()
1050 nfs_idmap_i2s_literal(gid, u8s); in nfs_idmap_gid_str()
1277 nfs_idmap_cache_s2i_lkup(idmap_cache_info_t *cip, utf8string *u8s, in nfs_idmap_cache_s2i_lkup() argument
1287 if ((rqst_c_str = utf8_to_str(u8s, &rqst_len, NULL)) == NULL) { in nfs_idmap_cache_s2i_lkup()
1359 nfs_idmap_cache_s2i_insert(idmap_cache_info_t *cip, uid_t id, utf8string *u8s, in nfs_idmap_cache_s2i_insert() argument
1375 if ((c_str = utf8_to_str(u8s, &c_len, NULL)) == NULL) in nfs_idmap_cache_s2i_insert()
1438 newp->id_len = u8s->utf8string_len; in nfs_idmap_cache_s2i_insert()
1439 newp->id_val = kmem_alloc(u8s->utf8string_len, KM_SLEEP); in nfs_idmap_cache_s2i_insert()
1440 bcopy(u8s->utf8string_val, newp->id_val, u8s->utf8string_len); in nfs_idmap_cache_s2i_insert()
1462 utf8string *u8s) in nfs_idmap_cache_i2s_lkup() argument
1501 ASSERT(u8s->utf8string_val == NULL); in nfs_idmap_cache_i2s_lkup()
1502 u8s->utf8string_len = p->id_len; in nfs_idmap_cache_i2s_lkup()
1503 u8s->utf8string_val = kmem_alloc(p->id_len, KM_SLEEP); in nfs_idmap_cache_i2s_lkup()
1504 bcopy(p->id_val, u8s->utf8string_val, p->id_len); in nfs_idmap_cache_i2s_lkup()
1533 nfs_idmap_cache_i2s_insert(idmap_cache_info_t *cip, uid_t id, utf8string *u8s, in nfs_idmap_cache_i2s_insert() argument
1581 if ((p->id_no == id) && (p->id_len == u8s->utf8string_len)) { in nfs_idmap_cache_i2s_insert()
1598 newp->id_len = u8s->utf8string_len; in nfs_idmap_cache_i2s_insert()
1599 newp->id_val = kmem_alloc(u8s->utf8string_len, KM_SLEEP); in nfs_idmap_cache_i2s_insert()
1600 bcopy(u8s->utf8string_val, newp->id_val, u8s->utf8string_len); in nfs_idmap_cache_i2s_insert()
1629 is_stringified_id(utf8string *u8s) in is_stringified_id() argument
1633 for (i = 0; i < u8s->utf8string_len; i++) in is_stringified_id()
1634 if (!isdigit(u8s->utf8string_val[i])) in is_stringified_id()
1640 nfs_idmap_s2i_literal(utf8string *u8s, uid_t *id, int isserver) in nfs_idmap_s2i_literal() argument
1656 if (!is_stringified_id(u8s)) in nfs_idmap_s2i_literal()
1664 if (u8s->utf8string_len >= _MAXIDSTRLEN) in nfs_idmap_s2i_literal()
1670 bcopy(u8s->utf8string_val, ids, u8s->utf8string_len); in nfs_idmap_s2i_literal()
1671 ids[u8s->utf8string_len] = '\0'; in nfs_idmap_s2i_literal()
1681 nfs_idmap_i2s_literal(uid_t id, utf8string *u8s) in nfs_idmap_i2s_literal() argument
1686 (void) str_to_utf8(ids, u8s); in nfs_idmap_i2s_literal()
1692 utf8_strchr(utf8string *u8s, const char c) in utf8_strchr() argument
1695 char *u8p = u8s->utf8string_val; in utf8_strchr()
1696 int len = u8s->utf8string_len; in utf8_strchr()