summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2010-08-26 20:54:13 +1000
committerAndrew Bartlett <abartlet@samba.org>2010-09-11 18:46:05 +1000
commit4bf783d4d6693f927f5e7ef7a9855766c91983f2 (patch)
treef6cbe7bdc734997850ca85c6defd4c53a7bad148 /source3/lib
parent6a0176b07da0b416bc9d750ddea92c612849597c (diff)
downloadsamba-4bf783d4d6693f927f5e7ef7a9855766c91983f2.tar.gz
samba-4bf783d4d6693f927f5e7ef7a9855766c91983f2.tar.bz2
samba-4bf783d4d6693f927f5e7ef7a9855766c91983f2.zip
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 <tridge@samba.org>
Diffstat (limited to 'source3/lib')
-rw-r--r--source3/lib/netapi/localgroup.c4
-rw-r--r--source3/lib/privileges.c2
-rw-r--r--source3/lib/util_sid.c8
3 files changed, 7 insertions, 7 deletions
diff --git a/source3/lib/netapi/localgroup.c b/source3/lib/netapi/localgroup.c
index 03a7a71588..69cf974225 100644
--- a/source3/lib/netapi/localgroup.c
+++ b/source3/lib/netapi/localgroup.c
@@ -986,8 +986,8 @@ static WERROR NetLocalGroupModifyMembers_r(struct libnetapi_ctx *ctx,
struct dom_sid *add_sids = NULL;
struct dom_sid *del_sids = NULL;
- size_t num_add_sids = 0;
- size_t num_del_sids = 0;
+ uint32_t num_add_sids = 0;
+ uint32_t num_del_sids = 0;
if ((!add && !del && !set) || (add && del && set)) {
return WERR_INVALID_PARAM;
diff --git a/source3/lib/privileges.c b/source3/lib/privileges.c
index 97ae7dbfab..4713bc0700 100644
--- a/source3/lib/privileges.c
+++ b/source3/lib/privileges.c
@@ -27,7 +27,7 @@
#define PRIVPREFIX "PRIV_"
typedef struct {
- size_t count;
+ uint32_t count;
struct dom_sid *list;
} SID_LIST;
diff --git a/source3/lib/util_sid.c b/source3/lib/util_sid.c
index 3874d3d20c..459636d5fc 100644
--- a/source3/lib/util_sid.c
+++ b/source3/lib/util_sid.c
@@ -578,7 +578,7 @@ 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)
{
*sids = TALLOC_REALLOC_ARRAY(mem_ctx, *sids, struct dom_sid,
(*num)+1);
@@ -599,7 +599,7 @@ NTSTATUS add_sid_to_array(TALLOC_CTX *mem_ctx, const struct dom_sid *sid,
********************************************************************/
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)
{
size_t i;
@@ -682,14 +682,14 @@ 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)
{
NTSTATUS status;
struct dom_sid sid;
struct dom_sid *sid_array = NULL;
- size_t num_sids = 0;
+ uint32_t num_sids = 0;
int i;
if (include_user_group_rid) {