summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2011-02-21 10:30:28 +0100
committerAndrew Bartlett <abartlet@samba.org>2011-02-22 16:20:11 +1100
commitd7fa34905223ebbf02dadcea0720062a30c3bbab (patch)
tree5b3a47f4a3d9dc26b25ee901fbcd72347ebeb516 /source3
parent2e69e894566d32001120d76d7ba58cdacb56d279 (diff)
downloadsamba-d7fa34905223ebbf02dadcea0720062a30c3bbab.tar.gz
samba-d7fa34905223ebbf02dadcea0720062a30c3bbab.tar.bz2
samba-d7fa34905223ebbf02dadcea0720062a30c3bbab.zip
s3:auth: change num_groups to from size_t to uint32_t
This will help with the change from UNIX_USER_TOKEN to security_unix_token metze
Diffstat (limited to 'source3')
-rw-r--r--source3/auth/server_info.c2
-rw-r--r--source3/auth/token_util.c8
-rw-r--r--source3/include/passdb.h2
-rw-r--r--source3/include/proto.h4
-rw-r--r--source3/include/smb.h2
-rw-r--r--source3/lib/system_smbd.c4
-rw-r--r--source3/passdb/pdb_interface.c10
-rw-r--r--source3/passdb/pdb_ldap.c8
-rw-r--r--source3/rpc_server/samr/srv_samr_nt.c4
9 files changed, 22 insertions, 22 deletions
diff --git a/source3/auth/server_info.c b/source3/auth/server_info.c
index 0f62983560..e218ca9f7f 100644
--- a/source3/auth/server_info.c
+++ b/source3/auth/server_info.c
@@ -311,7 +311,7 @@ NTSTATUS samu_to_SamInfo3(TALLOC_CTX *mem_ctx,
const struct dom_sid *group_sid;
struct dom_sid domain_sid;
struct dom_sid *group_sids;
- size_t num_group_sids = 0;
+ uint32_t num_group_sids = 0;
const char *tmp;
gid_t *gids;
NTSTATUS status;
diff --git a/source3/auth/token_util.c b/source3/auth/token_util.c
index 4a702ef230..4f617c4201 100644
--- a/source3/auth/token_util.c
+++ b/source3/auth/token_util.c
@@ -693,8 +693,8 @@ NTSTATUS create_token_from_username(TALLOC_CTX *mem_ctx, const char *username,
struct dom_sid *group_sids;
struct dom_sid unix_group_sid;
uint32_t num_group_sids;
- size_t num_gids;
- size_t i;
+ uint32_t num_gids;
+ uint32_t i;
if (!lookup_name_smbconf(tmp_ctx, username, LOOKUP_NAME_ALL,
NULL, NULL, &user_sid, &type)) {
@@ -710,7 +710,7 @@ NTSTATUS create_token_from_username(TALLOC_CTX *mem_ctx, const char *username,
if (sid_check_is_in_our_domain(&user_sid)) {
bool ret;
- size_t pdb_num_group_sids;
+ uint32_t pdb_num_group_sids;
/* This is a passdb user, so ask passdb */
struct samu *sam_acct = NULL;
@@ -780,7 +780,7 @@ NTSTATUS create_token_from_username(TALLOC_CTX *mem_ctx, const char *username,
*uid = sam_acct->unix_pw->pw_uid;
} else if (sid_check_is_in_unix_users(&user_sid)) {
- size_t getgroups_num_group_sids;
+ uint32_t getgroups_num_group_sids;
/* This is a unix user not in passdb. We need to ask nss
* directly, without consulting passdb */
diff --git a/source3/include/passdb.h b/source3/include/passdb.h
index 915f2950f3..a04ccf061e 100644
--- a/source3/include/passdb.h
+++ b/source3/include/passdb.h
@@ -352,7 +352,7 @@ struct pdb_methods
TALLOC_CTX *mem_ctx,
struct samu *user,
struct dom_sid **pp_sids, gid_t **pp_gids,
- size_t *p_num_groups);
+ uint32_t *p_num_groups);
NTSTATUS (*set_unix_primary_group)(struct pdb_methods *methods,
TALLOC_CTX *mem_ctx,
diff --git a/source3/include/proto.h b/source3/include/proto.h
index 31ebd37518..30774c7f18 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -952,7 +952,7 @@ int sys_connect(int fd, const struct sockaddr * addr);
bool getgroups_unix_user(TALLOC_CTX *mem_ctx, const char *user,
gid_t primary_gid,
- gid_t **ret_groups, size_t *p_ngroups);
+ gid_t **ret_groups, uint32_t *p_ngroups);
/* The following definitions come from lib/tallocmsg.c */
@@ -3814,7 +3814,7 @@ NTSTATUS pdb_enum_group_members(TALLOC_CTX *mem_ctx,
size_t *p_num_members);
NTSTATUS pdb_enum_group_memberships(TALLOC_CTX *mem_ctx, struct samu *user,
struct dom_sid **pp_sids, gid_t **pp_gids,
- size_t *p_num_groups);
+ uint32_t *p_num_groups);
NTSTATUS pdb_set_unix_primary_group(TALLOC_CTX *mem_ctx, struct samu *user);
NTSTATUS pdb_add_groupmem(TALLOC_CTX *mem_ctx, uint32_t group_rid,
uint32_t member_rid);
diff --git a/source3/include/smb.h b/source3/include/smb.h
index c01a156152..0776ed9656 100644
--- a/source3/include/smb.h
+++ b/source3/include/smb.h
@@ -205,7 +205,7 @@ struct lsa_name_info {
typedef struct unix_user_token {
uid_t uid;
gid_t gid;
- size_t ngroups;
+ uint32_t ngroups;
gid_t *groups;
} UNIX_USER_TOKEN;
diff --git a/source3/lib/system_smbd.c b/source3/lib/system_smbd.c
index 37fac27b73..3bb2c4240b 100644
--- a/source3/lib/system_smbd.c
+++ b/source3/lib/system_smbd.c
@@ -146,9 +146,9 @@ static int sys_getgrouplist(const char *user, gid_t gid, gid_t *groups, int *grp
bool getgroups_unix_user(TALLOC_CTX *mem_ctx, const char *user,
gid_t primary_gid,
- gid_t **ret_groups, size_t *p_ngroups)
+ gid_t **ret_groups, uint32_t *p_ngroups)
{
- size_t ngrp;
+ uint32_t ngrp;
int max_grp;
gid_t *temp_groups;
gid_t *groups;
diff --git a/source3/passdb/pdb_interface.c b/source3/passdb/pdb_interface.c
index c286cc18f7..8cdaaaa569 100644
--- a/source3/passdb/pdb_interface.c
+++ b/source3/passdb/pdb_interface.c
@@ -843,7 +843,7 @@ NTSTATUS pdb_enum_group_members(TALLOC_CTX *mem_ctx,
NTSTATUS pdb_enum_group_memberships(TALLOC_CTX *mem_ctx, struct samu *user,
struct dom_sid **pp_sids, gid_t **pp_gids,
- size_t *p_num_groups)
+ uint32_t *p_num_groups)
{
struct pdb_methods *pdb = pdb_get_methods();
return pdb->enum_group_memberships(
@@ -888,7 +888,7 @@ static bool pdb_user_in_group(TALLOC_CTX *mem_ctx, struct samu *account,
{
struct dom_sid *sids;
gid_t *gids;
- size_t i, num_groups;
+ uint32_t i, num_groups;
if (!NT_STATUS_IS_OK(pdb_enum_group_memberships(mem_ctx, account,
&sids, &gids,
@@ -1438,7 +1438,7 @@ static bool pdb_default_sid_to_id(struct pdb_methods *methods,
return ret;
}
-static bool get_memberuids(TALLOC_CTX *mem_ctx, gid_t gid, uid_t **pp_uids, size_t *p_num)
+static bool get_memberuids(TALLOC_CTX *mem_ctx, gid_t gid, uid_t **pp_uids, uint32_t *p_num)
{
struct group *grp;
char **gr;
@@ -1501,7 +1501,7 @@ static NTSTATUS pdb_default_enum_group_members(struct pdb_methods *methods,
{
gid_t gid;
uid_t *uids;
- size_t i, num_uids;
+ uint32_t i, num_uids;
*pp_member_rids = NULL;
*p_num_members = 0;
@@ -1540,7 +1540,7 @@ static NTSTATUS pdb_default_enum_group_memberships(struct pdb_methods *methods,
struct samu *user,
struct dom_sid **pp_sids,
gid_t **pp_gids,
- size_t *p_num_groups)
+ uint32_t *p_num_groups)
{
size_t i;
gid_t gid;
diff --git a/source3/passdb/pdb_ldap.c b/source3/passdb/pdb_ldap.c
index 573c50520e..5b34f6e026 100644
--- a/source3/passdb/pdb_ldap.c
+++ b/source3/passdb/pdb_ldap.c
@@ -2080,7 +2080,7 @@ static NTSTATUS ldapsam_enum_group_memberships(struct pdb_methods *methods,
struct samu *user,
struct dom_sid **pp_sids,
gid_t **pp_gids,
- size_t *p_num_groups);
+ uint32_t *p_num_groups);
static NTSTATUS ldapsam_rename_sam_account(struct pdb_methods *my_methods,
struct samu *old_acct,
@@ -2902,7 +2902,7 @@ static NTSTATUS ldapsam_enum_group_memberships(struct pdb_methods *methods,
struct samu *user,
struct dom_sid **pp_sids,
gid_t **pp_gids,
- size_t *p_num_groups)
+ uint32_t *p_num_groups)
{
struct ldapsam_privates *ldap_state =
(struct ldapsam_privates *)methods->private_data;
@@ -2915,7 +2915,7 @@ static NTSTATUS ldapsam_enum_group_memberships(struct pdb_methods *methods,
LDAPMessage *entry;
NTSTATUS ret = NT_STATUS_UNSUCCESSFUL;
uint32_t num_sids;
- size_t num_gids;
+ uint32_t num_gids;
char *gidstr;
gid_t primary_gid = -1;
@@ -5536,7 +5536,7 @@ static NTSTATUS ldapsam_delete_user(struct pdb_methods *my_methods, TALLOC_CTX *
NTSTATUS status;
struct dom_sid *sids = NULL;
gid_t *gids = NULL;
- size_t num_groups = 0;
+ uint32_t num_groups = 0;
int i;
uint32_t user_rid = pdb_get_user_rid(sam_acct);
diff --git a/source3/rpc_server/samr/srv_samr_nt.c b/source3/rpc_server/samr/srv_samr_nt.c
index b5d5111b20..d53d859f55 100644
--- a/source3/rpc_server/samr/srv_samr_nt.c
+++ b/source3/rpc_server/samr/srv_samr_nt.c
@@ -3228,9 +3228,9 @@ NTSTATUS _samr_GetGroupsForUser(struct pipes_struct *p,
struct samr_RidWithAttribute dom_gid;
struct samr_RidWithAttribute *gids = NULL;
uint32 primary_group_rid;
- size_t num_groups = 0;
+ uint32_t num_groups = 0;
gid_t *unix_gids;
- size_t i, num_gids;
+ uint32_t i, num_gids;
bool ret;
NTSTATUS result;
bool success = False;