From: Joseph Sutton Date: Thu, 15 Dec 2022 23:52:51 +0000 (+1300) Subject: auth: Align integer types X-Git-Tag: talloc-2.4.1~1655 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e00eeed9d2bdb97ab9bd8e7517f7ed1aa0617d43;p=thirdparty%2Fsamba.git auth: Align integer types Signed-off-by: Joseph Sutton Reviewed-by: Andrew Bartlett --- diff --git a/source3/passdb/pdb_samba_dsdb.c b/source3/passdb/pdb_samba_dsdb.c index 23f6b6b2aa5..8ed5799ac89 100644 --- a/source3/passdb/pdb_samba_dsdb.c +++ b/source3/passdb/pdb_samba_dsdb.c @@ -1704,7 +1704,7 @@ static NTSTATUS pdb_samba_dsdb_enum_alias_memberships(struct pdb_methods *m, size_t num_alias_rids = 0; int i; struct auth_SidAttr *groupSIDs = NULL; - unsigned int num_groupSIDs = 0; + uint32_t num_groupSIDs = 0; char *filter; NTSTATUS status; const char *sid_dn; diff --git a/source4/auth/sam.c b/source4/auth/sam.c index 14c2d1601e5..5d7b5c86ad4 100644 --- a/source4/auth/sam.c +++ b/source4/auth/sam.c @@ -354,7 +354,8 @@ _PUBLIC_ NTSTATUS authsam_make_user_info_dc(TALLOC_CTX *mem_ctx, DATA_BLOB primary_group_blob; /* SID structures for the expanded group memberships */ struct auth_SidAttr *sids = NULL; - unsigned int num_sids = 0, i; + uint32_t num_sids = 0; + unsigned int i; struct dom_sid *domain_sid; TALLOC_CTX *tmp_ctx; struct ldb_message_element *el; diff --git a/source4/auth/session.c b/source4/auth/session.c index 8db76aa9c0c..4b9a0058dd5 100644 --- a/source4/auth/session.c +++ b/source4/auth/session.c @@ -58,7 +58,7 @@ _PUBLIC_ NTSTATUS auth_generate_session_info(TALLOC_CTX *mem_ctx, { struct auth_session_info *session_info; NTSTATUS nt_status; - unsigned int i, num_sids = 0; + uint32_t i, num_sids = 0; const char *filter; diff --git a/source4/dsdb/common/util_groups.c b/source4/dsdb/common/util_groups.c index cf3d48bcfc8..bb56129e671 100644 --- a/source4/dsdb/common/util_groups.c +++ b/source4/dsdb/common/util_groups.c @@ -28,7 +28,7 @@ /* This function tests if a SID structure "sids" contains the SID "sid" */ static bool sids_contains_sid(const struct auth_SidAttr *sids, - const unsigned int num_sids, + const uint32_t num_sids, const struct dom_sid *sid, uint32_t attrs) { @@ -64,7 +64,7 @@ static bool sids_contains_sid(const struct auth_SidAttr *sids, NTSTATUS dsdb_expand_nested_groups(struct ldb_context *sam_ctx, struct ldb_val *dn_val, const bool only_childs, const char *filter, TALLOC_CTX *res_sids_ctx, struct auth_SidAttr **res_sids, - unsigned int *num_res_sids) + uint32_t *num_res_sids) { const char * const attrs[] = { "groupType", "memberOf", NULL }; unsigned int i; diff --git a/source4/dsdb/samdb/ldb_modules/operational.c b/source4/dsdb/samdb/ldb_modules/operational.c index f58aa688ba2..0c49ef14762 100644 --- a/source4/dsdb/samdb/ldb_modules/operational.c +++ b/source4/dsdb/samdb/ldb_modules/operational.c @@ -152,7 +152,7 @@ static int construct_primary_group_token(struct ldb_module *module, static int get_group_sids(struct ldb_context *ldb, TALLOC_CTX *mem_ctx, struct ldb_message *msg, const char *attribute_string, enum search_type type, struct auth_SidAttr **groupSIDs, - unsigned int *num_groupSIDs) + uint32_t *num_groupSIDs) { const char *filter = NULL; NTSTATUS status; @@ -289,10 +289,10 @@ static int construct_generic_token_groups(struct ldb_module *module, { struct ldb_context *ldb = ldb_module_get_ctx(module); TALLOC_CTX *tmp_ctx = talloc_new(msg); - unsigned int i; + uint32_t i; int ret; struct auth_SidAttr *groupSIDs = NULL; - unsigned int num_groupSIDs = 0; + uint32_t num_groupSIDs = 0; if (scope != LDB_SCOPE_BASE) { ldb_set_errstring(ldb, "Cannot provide tokenGroups attribute, this is not a BASE search"); @@ -1172,7 +1172,7 @@ static int get_pso_for_user(struct ldb_module *module, { bool pso_supported; struct auth_SidAttr *groupSIDs = NULL; - unsigned int num_groupSIDs = 0; + uint32_t num_groupSIDs = 0; struct ldb_context *ldb = ldb_module_get_ctx(module); struct ldb_message *best_pso = NULL; struct ldb_dn *pso_dn = NULL;