summaryrefslogtreecommitdiff
path: root/usr/src
diff options
context:
space:
mode:
authorGordon Ross <Gordon.Ross@Sun.COM>2009-09-25 12:11:50 -0400
committerGordon Ross <Gordon.Ross@Sun.COM>2009-09-25 12:11:50 -0400
commitdea83360607af241eb793e94f19278029f3a8a97 (patch)
tree58edd6bf1c39e57f8399095926381fe0b29727df /usr/src
parentfbb8dc2c3d5adc161fd7801c9c61776528ca600b (diff)
downloadillumos-joyent-dea83360607af241eb793e94f19278029f3a8a97.tar.gz
6884443 idmap in-kernel API does not save sid_prefix strings
Diffstat (limited to 'usr/src')
-rw-r--r--usr/src/uts/common/idmap/idmap_kapi.c20
1 files changed, 17 insertions, 3 deletions
diff --git a/usr/src/uts/common/idmap/idmap_kapi.c b/usr/src/uts/common/idmap/idmap_kapi.c
index 0ae909f670..e3152a5745 100644
--- a/usr/src/uts/common/idmap/idmap_kapi.c
+++ b/usr/src/uts/common/idmap/idmap_kapi.c
@@ -890,7 +890,9 @@ kidmap_get_extend(idmap_get_handle_t *get_handle)
* stat - status of the get request
* uid - POSIX UID if stat == IDMAP_SUCCESS
*
- * Note: The output parameters will be set by idmap_get_mappings()
+ * Notes:
+ * The output parameters will be set by idmap_get_mappings()
+ * The sid_prefix is copied.
*/
idmap_stat
kidmap_batch_getuidbysid(idmap_get_handle_t *get_handle, const char *sid_prefix,
@@ -909,6 +911,9 @@ kidmap_batch_getuidbysid(idmap_get_handle_t *get_handle, const char *sid_prefix,
return (IDMAP_SUCCESS);
}
+ /* Get a copy of sid_prefix */
+ sid_prefix = kidmap_find_sid_prefix(sid_prefix);
+
if (get_handle->mapping_num >= get_handle->mapping_size)
kidmap_get_extend(get_handle);
@@ -946,7 +951,9 @@ kidmap_batch_getuidbysid(idmap_get_handle_t *get_handle, const char *sid_prefix,
* stat - status of the get request
* gid - POSIX GID if stat == IDMAP_SUCCESS
*
- * Note: The output parameters will be set by idmap_get_mappings()
+ * Notes:
+ * The output parameters will be set by idmap_get_mappings()
+ * The sid_prefix is copied.
*/
idmap_stat
kidmap_batch_getgidbysid(idmap_get_handle_t *get_handle, const char *sid_prefix,
@@ -965,6 +972,9 @@ kidmap_batch_getgidbysid(idmap_get_handle_t *get_handle, const char *sid_prefix,
return (IDMAP_SUCCESS);
}
+ /* Get a copy of sid_prefix */
+ sid_prefix = kidmap_find_sid_prefix(sid_prefix);
+
if (get_handle->mapping_num >= get_handle->mapping_size)
kidmap_get_extend(get_handle);
@@ -1004,7 +1014,9 @@ kidmap_batch_getgidbysid(idmap_get_handle_t *get_handle, const char *sid_prefix,
* pid - POSIX UID if stat == IDMAP_SUCCESS and is_user == 1
* POSIX GID if stat == IDMAP_SUCCESS and is_user == 0
*
- * Note: The output parameters will be set by idmap_get_mappings()
+ * Notes:
+ * The output parameters will be set by idmap_get_mappings()
+ * The sid_prefix is copied.
*/
idmap_stat
kidmap_batch_getpidbysid(idmap_get_handle_t *get_handle, const char *sid_prefix,
@@ -1023,6 +1035,8 @@ kidmap_batch_getpidbysid(idmap_get_handle_t *get_handle, const char *sid_prefix,
return (IDMAP_SUCCESS);
}
+ /* Get a copy of sid_prefix */
+ sid_prefix = kidmap_find_sid_prefix(sid_prefix);
if (get_handle->mapping_num >= get_handle->mapping_size)
kidmap_get_extend(get_handle);