]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
auth: Align integer types
authorJoseph Sutton <josephsutton@catalyst.net.nz>
Thu, 15 Dec 2022 23:52:51 +0000 (12:52 +1300)
committerAndrew Bartlett <abartlet@samba.org>
Wed, 8 Feb 2023 00:03:40 +0000 (00:03 +0000)
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
source3/passdb/pdb_samba_dsdb.c
source4/auth/sam.c
source4/auth/session.c
source4/dsdb/common/util_groups.c
source4/dsdb/samdb/ldb_modules/operational.c

index 23f6b6b2aa514bc749f357cfa13883cd220f1300..8ed5799ac895c1301b813eb9d0b472221311d521 100644 (file)
@@ -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;
index 14c2d1601e59dea9d166481c209f47e91f41cf98..5d7b5c86ad459d5889a2d3fd4bf42d2571825570 100644 (file)
@@ -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;
index 8db76aa9c0cabdc22e79bc9043a75932da73163f..4b9a0058dd542b5732be0875a243fd94dabe0889 100644 (file)
@@ -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;
 
index cf3d48bcfc8f74ee8ef7881adf27284854d7d7ba..bb56129e671b292d4464a75201cf7e8eadbbce2b 100644 (file)
@@ -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;
index f58aa688ba25343f989ef65424e9624ad4a31437..0c49ef1476266e5567d028d34a863f61eec9356d 100644 (file)
@@ -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;