s4:libcli/security/*.c - fix some wrong typed counters
authorMatthias Dieter Wallnöfer <mdw@samba.org>
Thu, 9 Sep 2010 18:31:38 +0000 (20:31 +0200)
committerMatthias Dieter Wallnöfer <mdw@samba.org>
Thu, 9 Sep 2010 18:35:43 +0000 (20:35 +0200)
According to "librpc/gen_ndr/security.h" they need to be "uint32_t".

source4/libcli/security/access_check.c
source4/libcli/security/create_descriptor.c
source4/libcli/security/security_token.c

index 19fb160d58043c18572659d4098a347aa1662c0a..e8b8ee877170911c63739c783a130f47db22dd95 100644 (file)
@@ -29,7 +29,7 @@ static uint32_t access_check_max_allowed(const struct security_descriptor *sd,
                                         const struct security_token *token)
 {
        uint32_t denied = 0, granted = 0;
-       unsigned i;
+       uint32_t i;
        
        if (security_token_has_sid(token, sd->owner_sid)) {
                granted |= SEC_STD_WRITE_DAC | SEC_STD_READ_CONTROL | SEC_STD_DELETE;
@@ -91,7 +91,7 @@ NTSTATUS sec_access_check(const struct security_descriptor *sd,
                          uint32_t access_desired,
                          uint32_t *access_granted)
 {
-       int i;
+       uint32_t i;
        uint32_t bits_remaining;
 
        *access_granted = access_desired;
@@ -183,7 +183,7 @@ NTSTATUS sec_access_check_ds(const struct security_descriptor *sd,
                             struct object_tree *tree,
                             struct dom_sid *replace_sid)
 {
-        int i;
+        uint32_t i;
         uint32_t bits_remaining;
         struct object_tree *node;
         const struct GUID *type;
@@ -300,6 +300,3 @@ done:
         return NT_STATUS_OK;
 }
 
-
-
-
index ad6a599969d25204c94e8c9a01fc6341e2a45839..bc3f42e1f2384f55d9a99e3ff2b090b0d5d5d783 100644 (file)
@@ -90,7 +90,7 @@ static struct security_acl *calculate_inherited_from_parent(TALLOC_CTX *mem_ctx,
                                                            struct dom_sid *group,
                                                            struct GUID *object_list)
 {
-       int i;
+       uint32_t i;
        TALLOC_CTX *tmp_ctx = talloc_new(mem_ctx);
        struct security_acl *tmp_acl = talloc_zero(mem_ctx, struct security_acl);
        struct dom_sid *co, *cg;
@@ -173,7 +173,7 @@ static struct security_acl *process_user_acl(TALLOC_CTX *mem_ctx,
                                             struct dom_sid *group,
                                             struct GUID *object_list)
 {
-       int i;
+       uint32_t i;
        TALLOC_CTX *tmp_ctx = talloc_new(mem_ctx);
        struct security_acl *tmp_acl = talloc_zero(tmp_ctx, struct security_acl);
        struct security_acl *new_acl;
index e5ea598565056147fc0dc685246f5c337c6a8047..42f157aac67ee66566a831f9522bf62c234af36f 100644 (file)
@@ -49,7 +49,7 @@ struct security_token *security_token_initialise(TALLOC_CTX *mem_ctx)
 void security_token_debug(int dbg_lev, const struct security_token *token)
 {
        TALLOC_CTX *mem_ctx;
-       int i;
+       uint32_t i;
 
        if (!token) {
                DEBUG(dbg_lev, ("Security token: (NULL)\n"));
@@ -107,7 +107,7 @@ bool security_token_is_anonymous(const struct security_token *token)
 
 bool security_token_has_sid(const struct security_token *token, const struct dom_sid *sid)
 {
-       int i;
+       uint32_t i;
        for (i = 0; i < token->num_sids; i++) {
                if (dom_sid_equal(&token->sids[i], sid)) {
                        return true;