summaryrefslogtreecommitdiff
path: root/source4/libcli/security
diff options
context:
space:
mode:
authorMatthias Dieter Wallnöfer <mdw@samba.org>2010-09-09 20:31:38 +0200
committerMatthias Dieter Wallnöfer <mdw@samba.org>2010-09-09 20:35:43 +0200
commit59559bd02fb2dfaf19c0b4b86f5443115dd17f38 (patch)
tree09b19ebacb7a2f81c3e0c35e476dd42488e77578 /source4/libcli/security
parent4f5dd3f93b96429baa85ec3ef730ea4bdc2b7945 (diff)
downloadsamba-59559bd02fb2dfaf19c0b4b86f5443115dd17f38.tar.gz
samba-59559bd02fb2dfaf19c0b4b86f5443115dd17f38.tar.bz2
samba-59559bd02fb2dfaf19c0b4b86f5443115dd17f38.zip
s4:libcli/security/*.c - fix some wrong typed counters
According to "librpc/gen_ndr/security.h" they need to be "uint32_t".
Diffstat (limited to 'source4/libcli/security')
-rw-r--r--source4/libcli/security/access_check.c9
-rw-r--r--source4/libcli/security/create_descriptor.c4
-rw-r--r--source4/libcli/security/security_token.c4
3 files changed, 7 insertions, 10 deletions
diff --git a/source4/libcli/security/access_check.c b/source4/libcli/security/access_check.c
index 19fb160d58..e8b8ee8771 100644
--- a/source4/libcli/security/access_check.c
+++ b/source4/libcli/security/access_check.c
@@ -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;
}
-
-
-
diff --git a/source4/libcli/security/create_descriptor.c b/source4/libcli/security/create_descriptor.c
index ad6a599969..bc3f42e1f2 100644
--- a/source4/libcli/security/create_descriptor.c
+++ b/source4/libcli/security/create_descriptor.c
@@ -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;
diff --git a/source4/libcli/security/security_token.c b/source4/libcli/security/security_token.c
index e5ea598565..42f157aac6 100644
--- a/source4/libcli/security/security_token.c
+++ b/source4/libcli/security/security_token.c
@@ -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;