summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2006-01-23 23:19:31 +0000
committerJeremy Allison <jra@samba.org>2006-01-23 23:19:31 +0000
commitc7aedeefd3f13202871d809bf66dfe04559336a3 (patch)
tree22205008d44f19d7923154a6813325d7b1e95b7a
parentef00f14ba32e13399f4aac9a011609c706b71e7b (diff)
downloadsamba-c7aedeefd3f13202871d809bf66dfe04559336a3.tar.gz
samba-c7aedeefd3f13202871d809bf66dfe04559336a3.tar.xz
samba-c7aedeefd3f13202871d809bf66dfe04559336a3.zip
r13095: Fix warnings assigning int to a size_t.
Jeremy.
-rw-r--r--source/include/auth.h2
-rw-r--r--source/include/smb.h2
-rw-r--r--source/smbd/service.c4
3 files changed, 5 insertions, 3 deletions
diff --git a/source/include/auth.h b/source/include/auth.h
index f3dae1108b3..03206c03c6a 100644
--- a/source/include/auth.h
+++ b/source/include/auth.h
@@ -58,7 +58,7 @@ typedef struct auth_serversupplied_info {
gid_t gid;
/* This groups info is needed for when we become_user() for this uid */
- int n_groups;
+ size_t n_groups;
gid_t *groups;
/* NT group information taken from the info3 structure */
diff --git a/source/include/smb.h b/source/include/smb.h
index 6ceb4ec1cdd..f899a71dc6d 100644
--- a/source/include/smb.h
+++ b/source/include/smb.h
@@ -514,7 +514,7 @@ typedef struct connection_struct
/* following groups stuff added by ih */
/* This groups info is valid for the user that *opened* the connection */
- int ngroups;
+ size_t ngroups;
gid_t *groups;
NT_USER_TOKEN *nt_user_token;
diff --git a/source/smbd/service.c b/source/smbd/service.c
index fb9dbf0489c..7640559d538 100644
--- a/source/smbd/service.c
+++ b/source/smbd/service.c
@@ -592,6 +592,7 @@ static connection_struct *make_connection_snum(int snum, user_struct *vuser,
}
if (conn->force_user || conn->force_group) {
+ int ngroups = 0;
/* groups stuff added by ih */
conn->ngroups = 0;
@@ -600,7 +601,8 @@ static connection_struct *make_connection_snum(int snum, user_struct *vuser,
/* Find all the groups this uid is in and
store them. Used by change_to_user() */
initialise_groups(conn->user, conn->uid, conn->gid);
- get_current_groups(conn->gid, &conn->ngroups,&conn->groups);
+ get_current_groups(conn->gid, &ngroups, &conn->groups);
+ conn->ngroups = ngroups;
conn->nt_user_token =
create_nt_token(conn->uid, conn->gid,