summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Ambach <ambi@samba.org>2011-07-15 15:58:40 +0200
committerChristian Ambach <ambi@samba.org>2011-07-21 14:55:08 +0200
commitc5cbdc21d1b21034fb5f892a74d296cc94120696 (patch)
tree08d09076506df04a5c0f56a072ee6cf5754b2972
parentc8b4414c0a8bc9f81a03948c875bbac22d0a8726 (diff)
downloadsamba-c5cbdc21d1b21034fb5f892a74d296cc94120696.tar.gz
samba-c5cbdc21d1b21034fb5f892a74d296cc94120696.tar.bz2
samba-c5cbdc21d1b21034fb5f892a74d296cc94120696.zip
s3:modules/vfs_afsacl use stdbool types
-rw-r--r--source3/modules/vfs_afsacl.c70
1 files changed, 35 insertions, 35 deletions
diff --git a/source3/modules/vfs_afsacl.c b/source3/modules/vfs_afsacl.c
index 39bdb8a2d9..a1fc689eab 100644
--- a/source3/modules/vfs_afsacl.c
+++ b/source3/modules/vfs_afsacl.c
@@ -77,9 +77,9 @@ static bool init_afs_acl(struct afs_acl *acl)
acl->ctx = talloc_init("afs_acl");
if (acl->ctx == NULL) {
DEBUG(10, ("Could not init afs_acl"));
- return False;
+ return false;
}
- return True;
+ return true;
}
static void free_afs_acl(struct afs_acl *acl)
@@ -244,21 +244,21 @@ static bool parse_afs_acl(struct afs_acl *acl, const char *acl_str)
strlcpy(str, acl_str, MAXSIZE);
if (sscanf(p, "%d", &nplus) != 1)
- return False;
+ return false;
DEBUG(10, ("Found %d positive entries\n", nplus));
if ((p = strchr(p, '\n')) == NULL)
- return False;
+ return false;
p += 1;
if (sscanf(p, "%d", &nminus) != 1)
- return False;
+ return false;
DEBUG(10, ("Found %d negative entries\n", nminus));
if ((p = strchr(p, '\n')) == NULL)
- return False;
+ return false;
p += 1;
for (aces = nplus+nminus; aces > 0; aces--)
@@ -272,15 +272,15 @@ static bool parse_afs_acl(struct afs_acl *acl, const char *acl_str)
namep = p;
if ((p = strchr(p, '\t')) == NULL)
- return False;
+ return false;
*p = '\0';
p += 1;
if (sscanf(p, "%d", &rights) != 1)
- return False;
+ return false;
if ((p = strchr(p, '\n')) == NULL)
- return False;
+ return false;
p += 1;
fstrcpy(name, namep);
@@ -293,7 +293,7 @@ static bool parse_afs_acl(struct afs_acl *acl, const char *acl_str)
nplus -= 1;
}
- return True;
+ return true;
}
static bool unparse_afs_acl(struct afs_acl *acl, char *acl_str)
@@ -329,7 +329,7 @@ static bool unparse_afs_acl(struct afs_acl *acl, char *acl_str)
strlcat(acl_str, line, MAXSIZE);
ace = ace->next;
}
- return True;
+ return true;
}
static uint32 afs_to_nt_file_rights(uint32 rights)
@@ -436,7 +436,7 @@ static void merge_afs_acls(struct afs_acl *dir_acl,
for (ace = dir_acl->acelist; ace != NULL; ace = ace->next) {
struct afs_ace *file_ace;
- bool found = False;
+ bool found = false;
for (file_ace = file_acl->acelist;
file_ace != NULL;
@@ -446,7 +446,7 @@ static void merge_afs_acls(struct afs_acl *dir_acl,
add_afs_ace(target, ace->positive, ace->name,
ace->rights | file_ace->rights);
- found = True;
+ found = true;
break;
}
if (!found)
@@ -456,14 +456,14 @@ static void merge_afs_acls(struct afs_acl *dir_acl,
for (ace = file_acl->acelist; ace != NULL; ace = ace->next) {
struct afs_ace *dir_ace;
- bool already_seen = False;
+ bool already_seen = false;
for (dir_ace = dir_acl->acelist;
dir_ace != NULL;
dir_ace = dir_ace->next) {
if (!same_principal(ace, dir_ace))
continue;
- already_seen = True;
+ already_seen = true;
break;
}
if (!already_seen)
@@ -706,23 +706,23 @@ static bool mappable_sid(const struct dom_sid *sid)
struct dom_sid domain_sid;
if (dom_sid_compare(sid, &global_sid_Builtin_Administrators) == 0)
- return True;
+ return true;
if (dom_sid_compare(sid, &global_sid_World) == 0)
- return True;
+ return true;
if (dom_sid_compare(sid, &global_sid_Authenticated_Users) == 0)
- return True;
+ return true;
if (dom_sid_compare(sid, &global_sid_Builtin_Backup_Operators) == 0)
- return True;
+ return true;
string_to_sid(&domain_sid, "S-1-5-21");
if (sid_compare_domain(sid, &domain_sid) == 0)
- return True;
+ return true;
- return False;
+ return false;
}
static bool nt_to_afs_acl(const char *filename,
@@ -739,10 +739,10 @@ static bool nt_to_afs_acl(const char *filename,
if (((security_info_sent & SECINFO_DACL) == 0) ||
(psd->dacl == NULL))
- return True;
+ return true;
if (!init_afs_acl(afs_acl))
- return False;
+ return false;
dacl = psd->dacl;
@@ -754,7 +754,7 @@ static bool nt_to_afs_acl(const char *filename,
if (ace->type != SEC_ACE_TYPE_ACCESS_ALLOWED) {
/* First cut: Only positive ACEs */
- return False;
+ return false;
}
if (!mappable_sid(&ace->trustee)) {
@@ -802,7 +802,7 @@ static bool nt_to_afs_acl(const char *filename,
dom_name, lp_winbind_separator(),
name);
if (tmp == NULL) {
- return False;
+ return false;
}
strlower_m(tmp);
name = tmp;
@@ -814,7 +814,7 @@ static bool nt_to_afs_acl(const char *filename,
talloc_tos(),
sid_string_tos(&ace->trustee));
if (name == NULL) {
- return False;
+ return false;
}
}
}
@@ -822,11 +822,11 @@ static bool nt_to_afs_acl(const char *filename,
while ((p = strchr_m(name, ' ')) != NULL)
*p = space_replacement;
- add_afs_ace(afs_acl, True, name,
+ add_afs_ace(afs_acl, true, name,
nt_to_afs_rights(filename, ace));
}
- return True;
+ return true;
}
static bool afs_get_afs_acl(char *filename, struct afs_acl *acl)
@@ -848,19 +848,19 @@ static bool afs_get_afs_acl(char *filename, struct afs_acl *acl)
if (ret) {
DEBUG(1, ("got error from PIOCTL: %d\n", ret));
- return False;
+ return false;
}
if (!init_afs_acl(acl))
- return False;
+ return false;
if (!parse_afs_acl(acl, space)) {
DEBUG(1, ("Could not parse AFS acl\n"));
free_afs_acl(acl);
- return False;
+ return false;
}
- return True;
+ return true;
}
/* For setting an AFS ACL we have to take care of the ACEs we could
@@ -910,7 +910,7 @@ static NTSTATUS afs_set_nt_acl(vfs_handle_struct *handle, files_struct *fsp,
fileacls = lp_parm_const_string(SNUM(handle->conn), "afsacl", "fileacls",
"yes");
- sidpts = lp_parm_bool(SNUM(handle->conn), "afsacl", "sidpts", False);
+ sidpts = lp_parm_bool(SNUM(handle->conn), "afsacl", "sidpts", false);
ZERO_STRUCT(old_afs_acl);
ZERO_STRUCT(new_afs_acl);
@@ -1013,7 +1013,7 @@ static NTSTATUS afsacl_fget_nt_acl(struct vfs_handle_struct *handle,
DEBUG(5, ("afsacl_fget_nt_acl: %s\n", fsp_str_dbg(fsp)));
- sidpts = lp_parm_bool(SNUM(fsp->conn), "afsacl", "sidpts", False);
+ sidpts = lp_parm_bool(SNUM(fsp->conn), "afsacl", "sidpts", false);
if (!afs_get_afs_acl(fsp->fsp_name->base_name, &acl)) {
return NT_STATUS_ACCESS_DENIED;
@@ -1037,7 +1037,7 @@ static NTSTATUS afsacl_get_nt_acl(struct vfs_handle_struct *handle,
DEBUG(5, ("afsacl_get_nt_acl: %s\n", name));
- sidpts = lp_parm_bool(SNUM(handle->conn), "afsacl", "sidpts", False);
+ sidpts = lp_parm_bool(SNUM(handle->conn), "afsacl", "sidpts", false);
if (!afs_get_afs_acl(name, &acl)) {
return NT_STATUS_ACCESS_DENIED;