diff options
author | Julian Pullen <Julian.Pullen@Sun.COM> | 2008-08-19 10:06:21 +0100 |
---|---|---|
committer | Julian Pullen <Julian.Pullen@Sun.COM> | 2008-08-19 10:06:21 +0100 |
commit | 3ee87bca47e74aa2719352485b80973ca6e079b7 (patch) | |
tree | a6ff61ef6b4dc533ceb00395c02e9ce543bcfb12 /usr/src/lib/libsec/common/acltext.c | |
parent | af061baf244254407655fdca7fd3d11aeb04f552 (diff) | |
download | illumos-joyent-3ee87bca47e74aa2719352485b80973ca6e079b7.tar.gz |
6727286 libidmap should cache ID mappings
Diffstat (limited to 'usr/src/lib/libsec/common/acltext.c')
-rw-r--r-- | usr/src/lib/libsec/common/acltext.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/usr/src/lib/libsec/common/acltext.c b/usr/src/lib/libsec/common/acltext.c index be2a417040..72d491a784 100644 --- a/usr/src/lib/libsec/common/acltext.c +++ b/usr/src/lib/libsec/common/acltext.c @@ -23,7 +23,6 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" /*LINTLIBRARY*/ #include <grp.h> @@ -140,19 +139,23 @@ prsidname(uid_t who, boolean_t user, char **sidp, int noresolve) */ if (user) - error = idmap_getwinnamebyuid(who, &name, &domain); + error = idmap_getwinnamebyuid(who, IDMAP_REQ_FLG_USE_CACHE, + &name, &domain); else - error = idmap_getwinnamebygid(who, &name, &domain); + error = idmap_getwinnamebygid(who, IDMAP_REQ_FLG_USE_CACHE, + &name, &domain); if (error) { if (idmap_init(&idmap_hdl) == 0 && idmap_get_create(idmap_hdl, &get_hdl) == 0) { if (user) error = idmap_get_sidbyuid(get_hdl, who, - 0, &domain, &rid, &status); + IDMAP_REQ_FLG_USE_CACHE, &domain, &rid, + &status); else error = idmap_get_sidbygid(get_hdl, who, - 0, &domain, &rid, &status); + IDMAP_REQ_FLG_USE_CACHE, &domain, &rid, + &status); if (error == 0) error = idmap_get_mappings(get_hdl); } |