summaryrefslogtreecommitdiff
path: root/source3/winbindd
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/winbindd
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/winbindd')
-rw-r--r--source3/winbindd/winbindd_ads.c14
-rw-r--r--source3/winbindd/winbindd_async.c4
-rw-r--r--source3/winbindd/winbindd_getsidaliases.c2
-rw-r--r--source3/winbindd/winbindd_pam.c2
-rw-r--r--source3/winbindd/winbindd_proto.h4
-rw-r--r--source3/winbindd/winbindd_util.c4
6 files changed, 15 insertions, 15 deletions
diff --git a/source3/winbindd/winbindd_ads.c b/source3/winbindd/winbindd_ads.c
index 1d9f1f0174..367d38ba15 100644
--- a/source3/winbindd/winbindd_ads.c
+++ b/source3/winbindd/winbindd_ads.c
@@ -614,7 +614,7 @@ static NTSTATUS lookup_usergroups_member(struct winbindd_domain *domain,
TALLOC_CTX *mem_ctx,
const char *user_dn,
struct dom_sid *primary_group,
- size_t *p_num_groups, struct dom_sid **user_sids)
+ uint32_t *p_num_groups, struct dom_sid **user_sids)
{
ADS_STATUS rc;
NTSTATUS status = NT_STATUS_UNSUCCESSFUL;
@@ -625,7 +625,7 @@ static NTSTATUS lookup_usergroups_member(struct winbindd_domain *domain,
ADS_STRUCT *ads;
const char *group_attrs[] = {"objectSid", NULL};
char *escaped_dn;
- size_t num_groups = 0;
+ uint32_t num_groups = 0;
DEBUG(3,("ads: lookup_usergroups_member\n"));
@@ -721,14 +721,14 @@ static NTSTATUS lookup_usergroups_memberof(struct winbindd_domain *domain,
TALLOC_CTX *mem_ctx,
const char *user_dn,
struct dom_sid *primary_group,
- size_t *p_num_groups,
+ uint32_t *p_num_groups,
struct dom_sid **user_sids)
{
ADS_STATUS rc;
NTSTATUS status = NT_STATUS_UNSUCCESSFUL;
ADS_STRUCT *ads;
const char *attrs[] = {"memberOf", NULL};
- size_t num_groups = 0;
+ uint32_t num_groups = 0;
struct dom_sid *group_sids = NULL;
int i;
char **strings = NULL;
@@ -846,7 +846,7 @@ static NTSTATUS lookup_usergroups(struct winbindd_domain *domain,
struct dom_sid primary_group;
uint32 primary_group_rid;
NTSTATUS status = NT_STATUS_UNSUCCESSFUL;
- size_t num_groups = 0;
+ uint32_t num_groups = 0;
DEBUG(3,("ads: lookup_usergroups\n"));
*p_num_groups = 0;
@@ -931,7 +931,7 @@ static NTSTATUS lookup_usergroups(struct winbindd_domain *domain,
status = lookup_usergroups_memberof(domain, mem_ctx, user_dn,
&primary_group,
&num_groups, user_sids);
- *p_num_groups = (uint32)num_groups;
+ *p_num_groups = num_groups;
if (NT_STATUS_IS_OK(status)) {
goto done;
}
@@ -942,7 +942,7 @@ static NTSTATUS lookup_usergroups(struct winbindd_domain *domain,
status = lookup_usergroups_member(domain, mem_ctx, user_dn,
&primary_group,
&num_groups, user_sids);
- *p_num_groups = (uint32)num_groups;
+ *p_num_groups = num_groups;
goto done;
}
diff --git a/source3/winbindd/winbindd_async.c b/source3/winbindd/winbindd_async.c
index 9e7be6b041..4d52731273 100644
--- a/source3/winbindd/winbindd_async.c
+++ b/source3/winbindd/winbindd_async.c
@@ -27,7 +27,7 @@
#define DBGC_CLASS DBGC_WINBIND
bool print_sidlist(TALLOC_CTX *mem_ctx, const struct dom_sid *sids,
- size_t num_sids, char **result, ssize_t *len)
+ uint32_t num_sids, char **result, ssize_t *len)
{
size_t i;
size_t buflen = 0;
@@ -48,7 +48,7 @@ bool print_sidlist(TALLOC_CTX *mem_ctx, const struct dom_sid *sids,
}
bool parse_sidlist(TALLOC_CTX *mem_ctx, const char *sidstr,
- struct dom_sid **sids, size_t *num_sids)
+ struct dom_sid **sids, uint32_t *num_sids)
{
const char *p, *q;
diff --git a/source3/winbindd/winbindd_getsidaliases.c b/source3/winbindd/winbindd_getsidaliases.c
index 9bd321f173..5fcb8922ce 100644
--- a/source3/winbindd/winbindd_getsidaliases.c
+++ b/source3/winbindd/winbindd_getsidaliases.c
@@ -36,7 +36,7 @@ struct tevent_req *winbindd_getsidaliases_send(TALLOC_CTX *mem_ctx,
struct tevent_req *req, *subreq;
struct winbindd_getsidaliases_state *state;
struct winbindd_domain *domain;
- size_t num_sids;
+ uint32_t num_sids;
struct dom_sid *sids;
req = tevent_req_create(mem_ctx, &state,
diff --git a/source3/winbindd/winbindd_pam.c b/source3/winbindd/winbindd_pam.c
index 0d481c2b3d..83f75f5e56 100644
--- a/source3/winbindd/winbindd_pam.c
+++ b/source3/winbindd/winbindd_pam.c
@@ -256,7 +256,7 @@ static NTSTATUS check_info3_in_group(struct netr_SamInfo3 *info3,
*/
{
struct dom_sid *require_membership_of_sid;
- size_t num_require_membership_of_sid;
+ uint32_t num_require_membership_of_sid;
char *req_sid;
const char *p;
struct dom_sid sid;
diff --git a/source3/winbindd/winbindd_proto.h b/source3/winbindd/winbindd_proto.h
index 7d36be1e17..02b5c66612 100644
--- a/source3/winbindd/winbindd_proto.h
+++ b/source3/winbindd/winbindd_proto.h
@@ -75,9 +75,9 @@ NTSTATUS winbindd_lookup_names(TALLOC_CTX *mem_ctx,
/* The following definitions come from winbindd/winbindd_async.c */
bool print_sidlist(TALLOC_CTX *mem_ctx, const struct dom_sid *sids,
- size_t num_sids, char **result, ssize_t *len);
+ uint32_t num_sids, char **result, ssize_t *len);
bool parse_sidlist(TALLOC_CTX *mem_ctx, const char *sidstr,
- struct dom_sid **sids, size_t *num_sids);
+ struct dom_sid **sids, uint32_t *num_sids);
/* The following definitions come from winbindd/winbindd_cache.c */
diff --git a/source3/winbindd/winbindd_util.c b/source3/winbindd/winbindd_util.c
index bd1e1b5bee..671c868273 100644
--- a/source3/winbindd/winbindd_util.c
+++ b/source3/winbindd/winbindd_util.c
@@ -1066,11 +1066,11 @@ int winbindd_num_clients(void)
NTSTATUS lookup_usergroups_cached(struct winbindd_domain *domain,
TALLOC_CTX *mem_ctx,
const struct dom_sid *user_sid,
- uint32 *p_num_groups, struct dom_sid **user_sids)
+ uint32_t *p_num_groups, struct dom_sid **user_sids)
{
struct netr_SamInfo3 *info3 = NULL;
NTSTATUS status = NT_STATUS_NO_MEMORY;
- size_t num_groups = 0;
+ uint32_t num_groups = 0;
DEBUG(3,(": lookup_usergroups_cached\n"));