From 4bf783d4d6693f927f5e7ef7a9855766c91983f2 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Thu, 26 Aug 2010 20:54:13 +1000 Subject: s3-auth Change type of num_sids to uint32_t size_t is overkill here, and in struct security_token in the num_sids is uint32_t. This includes a change to the prototype of add_sid_to_array() and add_sid_to_array_unique(), which has had a number of consequnetial changes as I try to sort out all the callers using a pointer to the number of sids. Andrew Bartlett Signed-off-by: Andrew Tridgell --- source3/include/proto.h | 6 +++--- source3/include/smb.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'source3/include') diff --git a/source3/include/proto.h b/source3/include/proto.h index 4644a55046..c547924c7d 100644 --- a/source3/include/proto.h +++ b/source3/include/proto.h @@ -1361,9 +1361,9 @@ char *sid_binstring(TALLOC_CTX *mem_ctx, const struct dom_sid *sid); char *sid_binstring_hex(const struct dom_sid *sid); struct dom_sid *sid_dup_talloc(TALLOC_CTX *ctx, const struct dom_sid *src); NTSTATUS add_sid_to_array(TALLOC_CTX *mem_ctx, const struct dom_sid *sid, - struct dom_sid **sids, size_t *num); + struct dom_sid **sids, uint32_t *num); NTSTATUS add_sid_to_array_unique(TALLOC_CTX *mem_ctx, const struct dom_sid *sid, - struct dom_sid **sids, size_t *num_sids); + struct dom_sid **sids, uint32_t *num_sids); void del_sid_from_array(const struct dom_sid *sid, struct dom_sid **sids, size_t *num); bool add_rid_to_array_unique(TALLOC_CTX *mem_ctx, uint32 rid, uint32 **pp_rids, size_t *p_num); @@ -1372,7 +1372,7 @@ bool is_sid_in_token(const NT_USER_TOKEN *token, const struct dom_sid *sid); NTSTATUS sid_array_from_info3(TALLOC_CTX *mem_ctx, const struct netr_SamInfo3 *info3, struct dom_sid **user_sids, - size_t *num_user_sids, + uint32_t *num_user_sids, bool include_user_group_rid, bool skip_ressource_groups); diff --git a/source3/include/smb.h b/source3/include/smb.h index ca98a21991..f8b233ea6b 100644 --- a/source3/include/smb.h +++ b/source3/include/smb.h @@ -232,7 +232,7 @@ extern const struct dom_sid global_sid_Unix_Groups; #define PRIMARY_GROUP_SID_INDEX 1 typedef struct nt_user_token { - size_t num_sids; + uint32_t num_sids; struct dom_sid *sids; uint64_t privilege_mask; } NT_USER_TOKEN; -- cgit