diff options
Diffstat (limited to 'source4/ntvfs/posix')
-rw-r--r-- | source4/ntvfs/posix/pvfs_acl.c | 22 | ||||
-rw-r--r-- | source4/ntvfs/posix/pvfs_dirlist.c | 38 | ||||
-rw-r--r-- | source4/ntvfs/posix/pvfs_lock.c | 4 | ||||
-rw-r--r-- | source4/ntvfs/posix/pvfs_notify.c | 14 | ||||
-rw-r--r-- | source4/ntvfs/posix/pvfs_open.c | 60 | ||||
-rw-r--r-- | source4/ntvfs/posix/pvfs_resolve.c | 28 | ||||
-rw-r--r-- | source4/ntvfs/posix/pvfs_search.c | 18 | ||||
-rw-r--r-- | source4/ntvfs/posix/pvfs_setfileinfo.c | 2 | ||||
-rw-r--r-- | source4/ntvfs/posix/pvfs_shortname.c | 64 | ||||
-rw-r--r-- | source4/ntvfs/posix/pvfs_streams.c | 6 | ||||
-rw-r--r-- | source4/ntvfs/posix/pvfs_util.c | 8 | ||||
-rw-r--r-- | source4/ntvfs/posix/pvfs_xattr.c | 4 | ||||
-rw-r--r-- | source4/ntvfs/posix/vfs_posix.c | 4 | ||||
-rw-r--r-- | source4/ntvfs/posix/vfs_posix.h | 4 |
14 files changed, 138 insertions, 138 deletions
diff --git a/source4/ntvfs/posix/pvfs_acl.c b/source4/ntvfs/posix/pvfs_acl.c index 4302b7f890..f19dc1f41f 100644 --- a/source4/ntvfs/posix/pvfs_acl.c +++ b/source4/ntvfs/posix/pvfs_acl.c @@ -365,7 +365,7 @@ NTSTATUS pvfs_acl_query(struct pvfs_state *pvfs, /* check the read only bit against any of the write access bits */ -static BOOL pvfs_read_only(struct pvfs_state *pvfs, uint32_t access_mask) +static bool pvfs_read_only(struct pvfs_state *pvfs, uint32_t access_mask) { if ((pvfs->flags & PVFS_FLAG_READONLY) && (access_mask & (SEC_FILE_WRITE_DATA | @@ -376,9 +376,9 @@ static BOOL pvfs_read_only(struct pvfs_state *pvfs, uint32_t access_mask) SEC_STD_WRITE_DAC | SEC_STD_WRITE_OWNER | SEC_DIR_DELETE_CHILD))) { - return True; + return true; } - return False; + return false; } /* @@ -548,24 +548,24 @@ NTSTATUS pvfs_access_check_parent(struct pvfs_state *pvfs, /* determine if an ACE is inheritable */ -static BOOL pvfs_inheritable_ace(struct pvfs_state *pvfs, +static bool pvfs_inheritable_ace(struct pvfs_state *pvfs, const struct security_ace *ace, - BOOL container) + bool container) { if (!container) { return (ace->flags & SEC_ACE_FLAG_OBJECT_INHERIT) != 0; } if (ace->flags & SEC_ACE_FLAG_CONTAINER_INHERIT) { - return True; + return true; } if ((ace->flags & SEC_ACE_FLAG_OBJECT_INHERIT) && !(ace->flags & SEC_ACE_FLAG_NO_PROPAGATE_INHERIT)) { - return True; + return true; } - return False; + return false; } /* @@ -576,7 +576,7 @@ static BOOL pvfs_inheritable_ace(struct pvfs_state *pvfs, static NTSTATUS pvfs_acl_inherit_aces(struct pvfs_state *pvfs, struct security_descriptor *parent_sd, struct security_descriptor *sd, - BOOL container) + bool container) { int i; @@ -663,7 +663,7 @@ NTSTATUS pvfs_acl_inherit(struct pvfs_state *pvfs, NTSTATUS status; struct pvfs_filename *parent; struct security_descriptor *parent_sd, *sd; - BOOL container; + bool container; /* form the parents path */ status = pvfs_resolve_parent(pvfs, req, name, &parent); @@ -716,7 +716,7 @@ NTSTATUS pvfs_acl_inherit(struct pvfs_state *pvfs, sd->type |= SEC_DESC_DACL_PRESENT; - container = (name->dos.attrib & FILE_ATTRIBUTE_DIRECTORY) ? True:False; + container = (name->dos.attrib & FILE_ATTRIBUTE_DIRECTORY) ? true:false; /* fill in the aces from the parent */ status = pvfs_acl_inherit_aces(pvfs, parent_sd, sd, container); diff --git a/source4/ntvfs/posix/pvfs_dirlist.c b/source4/ntvfs/posix/pvfs_dirlist.c index e54cb847f5..77f19c3585 100644 --- a/source4/ntvfs/posix/pvfs_dirlist.c +++ b/source4/ntvfs/posix/pvfs_dirlist.c @@ -33,13 +33,13 @@ struct name_cache_entry { struct pvfs_dir { struct pvfs_state *pvfs; - BOOL no_wildcard; + bool no_wildcard; char *single_name; const char *pattern; off_t offset; DIR *dir; const char *unix_path; - BOOL end_of_search; + bool end_of_search; struct name_cache_entry *name_cache; uint32_t name_cache_index; }; @@ -69,8 +69,8 @@ static NTSTATUS pvfs_list_no_wildcard(struct pvfs_state *pvfs, struct pvfs_filen } dir->pvfs = pvfs; - dir->no_wildcard = True; - dir->end_of_search = False; + dir->no_wildcard = true; + dir->end_of_search = false; dir->unix_path = talloc_strdup(dir, name->full_name); if (!dir->unix_path) { return NT_STATUS_NO_MEMORY; @@ -145,8 +145,8 @@ NTSTATUS pvfs_list_start(struct pvfs_state *pvfs, struct pvfs_filename *name, } dir->pvfs = pvfs; - dir->no_wildcard = False; - dir->end_of_search = False; + dir->no_wildcard = false; + dir->end_of_search = false; dir->offset = DIR_OFFSET_DOT; dir->name_cache = talloc_zero_array(dir, struct name_cache_entry, @@ -187,7 +187,7 @@ const char *pvfs_list_next(struct pvfs_dir *dir, off_t *ofs) /* non-wildcard searches are easy */ if (dir->no_wildcard) { - dir->end_of_search = True; + dir->end_of_search = true; if (*ofs != 0) return NULL; (*ofs)++; return dir->single_name; @@ -246,7 +246,7 @@ const char *pvfs_list_next(struct pvfs_dir *dir, off_t *ofs) return dname; } - dir->end_of_search = True; + dir->end_of_search = true; return NULL; } @@ -259,9 +259,9 @@ const char *pvfs_list_unix_path(struct pvfs_dir *dir) } /* - return True if end of search has been reached + return true if end of search has been reached */ -BOOL pvfs_list_eos(struct pvfs_dir *dir, off_t ofs) +bool pvfs_list_eos(struct pvfs_dir *dir, off_t ofs) { return dir->end_of_search; } @@ -274,7 +274,7 @@ NTSTATUS pvfs_list_seek(struct pvfs_dir *dir, const char *name, off_t *ofs) struct dirent *de; int i; - dir->end_of_search = False; + dir->end_of_search = false; if (ISDOT(name)) { dir->offset = DIR_OFFSET_DOTDOT; @@ -313,7 +313,7 @@ NTSTATUS pvfs_list_seek(struct pvfs_dir *dir, const char *name, off_t *ofs) } } - dir->end_of_search = True; + dir->end_of_search = true; return NT_STATUS_OBJECT_NAME_NOT_FOUND; } @@ -326,7 +326,7 @@ NTSTATUS pvfs_list_seek_ofs(struct pvfs_dir *dir, uint32_t resume_key, off_t *of struct dirent *de; int i; - dir->end_of_search = False; + dir->end_of_search = false; if (resume_key == DIR_OFFSET_DOT) { *ofs = DIR_OFFSET_DOTDOT; @@ -341,7 +341,7 @@ NTSTATUS pvfs_list_seek_ofs(struct pvfs_dir *dir, uint32_t resume_key, off_t *of if (resume_key == DIR_OFFSET_BASE) { rewinddir(dir->dir); if ((de=readdir(dir->dir)) == NULL) { - dir->end_of_search = True; + dir->end_of_search = true; return NT_STATUS_OBJECT_NAME_NOT_FOUND; } *ofs = telldir(dir->dir) + DIR_OFFSET_BASE; @@ -374,7 +374,7 @@ NTSTATUS pvfs_list_seek_ofs(struct pvfs_dir *dir, uint32_t resume_key, off_t *of } } - dir->end_of_search = True; + dir->end_of_search = true; return NT_STATUS_OBJECT_NAME_NOT_FOUND; } @@ -383,21 +383,21 @@ NTSTATUS pvfs_list_seek_ofs(struct pvfs_dir *dir, uint32_t resume_key, off_t *of /* see if a directory is empty */ -BOOL pvfs_directory_empty(struct pvfs_state *pvfs, struct pvfs_filename *name) +bool pvfs_directory_empty(struct pvfs_state *pvfs, struct pvfs_filename *name) { struct dirent *de; DIR *dir = opendir(name->full_name); if (dir == NULL) { - return True; + return true; } while ((de = readdir(dir))) { if (!ISDOT(de->d_name) && !ISDOTDOT(de->d_name)) { closedir(dir); - return False; + return false; } } closedir(dir); - return True; + return true; } diff --git a/source4/ntvfs/posix/pvfs_lock.c b/source4/ntvfs/posix/pvfs_lock.c index 989e3c56a4..b9bb58c71d 100644 --- a/source4/ntvfs/posix/pvfs_lock.c +++ b/source4/ntvfs/posix/pvfs_lock.c @@ -104,7 +104,7 @@ static void pvfs_pending_lock_continue(void *private, enum pvfs_wait_notice reas enum brl_type rw; NTSTATUS status; int i; - BOOL timed_out; + bool timed_out; timed_out = (reason != PVFS_WAIT_EVENT); @@ -136,7 +136,7 @@ static void pvfs_pending_lock_continue(void *private, enum pvfs_wait_notice reas } if (NT_STATUS_IS_OK(status)) { f->lock_count++; - timed_out = False; + timed_out = false; } /* if we have failed and timed out, or succeeded, then we diff --git a/source4/ntvfs/posix/pvfs_notify.c b/source4/ntvfs/posix/pvfs_notify.c index 3e289a0948..210f949395 100644 --- a/source4/ntvfs/posix/pvfs_notify.c +++ b/source4/ntvfs/posix/pvfs_notify.c @@ -58,7 +58,7 @@ static void pvfs_notify_send_next(struct event_context *ev, struct timed_event * send a reply to a pending notify request */ static void pvfs_notify_send(struct pvfs_notify_buffer *notify_buffer, - NTSTATUS status, BOOL immediate) + NTSTATUS status, bool immediate) { struct notify_pending *pending = notify_buffer->pending; struct ntvfs_request *req; @@ -118,7 +118,7 @@ static int pvfs_notify_destructor(struct pvfs_notify_buffer *n) { notify_remove(n->f->pvfs->notify_context, n); n->f->notify_buffer = NULL; - pvfs_notify_send(n, NT_STATUS_OK, True); + pvfs_notify_send(n, NT_STATUS_OK, true); return 0; } @@ -161,7 +161,7 @@ static void pvfs_notify_callback(void *private, const struct notify_event *ev) /* send what we have, unless its the first part of a rename */ if (ev->action != NOTIFY_ACTION_OLD_NAME) { - pvfs_notify_send(n, NT_STATUS_OK, True); + pvfs_notify_send(n, NT_STATUS_OK, true); } } @@ -169,7 +169,7 @@ static void pvfs_notify_callback(void *private, const struct notify_event *ev) setup a notify buffer on a directory handle */ static NTSTATUS pvfs_notify_setup(struct pvfs_state *pvfs, struct pvfs_file *f, - uint32_t buffer_size, uint32_t filter, BOOL recursive) + uint32_t buffer_size, uint32_t filter, bool recursive) { NTSTATUS status; struct notify_entry e; @@ -206,9 +206,9 @@ static void pvfs_notify_end(void *private, enum pvfs_wait_notice reason) struct pvfs_notify_buffer *notify_buffer = talloc_get_type(private, struct pvfs_notify_buffer); if (reason == PVFS_WAIT_CANCEL) { - pvfs_notify_send(notify_buffer, NT_STATUS_CANCELLED, False); + pvfs_notify_send(notify_buffer, NT_STATUS_CANCELLED, false); } else { - pvfs_notify_send(notify_buffer, NT_STATUS_OK, True); + pvfs_notify_send(notify_buffer, NT_STATUS_OK, true); } } @@ -277,7 +277,7 @@ NTSTATUS pvfs_notify(struct ntvfs_module_context *ntvfs, } req->async_states->state |= NTVFS_ASYNC_STATE_ASYNC; - pvfs_notify_send(f->notify_buffer, NT_STATUS_OK, False); + pvfs_notify_send(f->notify_buffer, NT_STATUS_OK, false); return NT_STATUS_OK; } diff --git a/source4/ntvfs/posix/pvfs_open.c b/source4/ntvfs/posix/pvfs_open.c index 269df13069..8558f0476a 100644 --- a/source4/ntvfs/posix/pvfs_open.c +++ b/source4/ntvfs/posix/pvfs_open.c @@ -186,7 +186,7 @@ static NTSTATUS pvfs_open_directory(struct pvfs_state *pvfs, uint32_t create_action; uint32_t access_mask = io->generic.in.access_mask; struct odb_lock *lck; - BOOL del_on_close; + bool del_on_close; uint32_t create_options; uint32_t share_access; @@ -268,14 +268,14 @@ static NTSTATUS pvfs_open_directory(struct pvfs_state *pvfs, f->handle->seek_offset = 0; f->handle->position = 0; f->handle->mode = 0; - f->handle->sticky_write_time = False; - f->handle->open_completed = False; + f->handle->sticky_write_time = false; + f->handle->open_completed = false; if ((create_options & NTCREATEX_OPTIONS_DELETE_ON_CLOSE) && pvfs_directory_empty(pvfs, f->handle->name)) { - del_on_close = True; + del_on_close = true; } else { - del_on_close = False; + del_on_close = false; } if (name->exists) { @@ -305,7 +305,7 @@ static NTSTATUS pvfs_open_directory(struct pvfs_state *pvfs, return status; } - f->handle->have_opendb_entry = True; + f->handle->have_opendb_entry = true; } DLIST_ADD(pvfs->files.list, f); @@ -357,7 +357,7 @@ static NTSTATUS pvfs_open_directory(struct pvfs_state *pvfs, goto cleanup_delete; } - f->handle->have_opendb_entry = True; + f->handle->have_opendb_entry = true; create_action = NTCREATEX_ACTION_CREATED; @@ -379,7 +379,7 @@ static NTSTATUS pvfs_open_directory(struct pvfs_state *pvfs, goto cleanup_delete; } - f->handle->open_completed = True; + f->handle->open_completed = true; io->generic.out.oplock_level = OPLOCK_NONE; io->generic.out.file.ntvfs = h; @@ -552,7 +552,7 @@ static NTSTATUS pvfs_create_file(struct pvfs_state *pvfs, uint32_t access_mask = io->generic.in.access_mask; mode_t mode; uint32_t attrib; - BOOL del_on_close; + bool del_on_close; struct pvfs_filename *parent; uint32_t oplock_level = OPLOCK_NONE, oplock_granted; @@ -656,9 +656,9 @@ static NTSTATUS pvfs_create_file(struct pvfs_state *pvfs, } if (create_options & NTCREATEX_OPTIONS_DELETE_ON_CLOSE) { - del_on_close = True; + del_on_close = true; } else { - del_on_close = False; + del_on_close = false; } if (pvfs->flags & PVFS_FLAG_FAKE_OPLOCKS) { @@ -702,9 +702,9 @@ static NTSTATUS pvfs_create_file(struct pvfs_state *pvfs, f->handle->seek_offset = 0; f->handle->position = 0; f->handle->mode = 0; - f->handle->have_opendb_entry = True; - f->handle->sticky_write_time = False; - f->handle->open_completed = False; + f->handle->have_opendb_entry = true; + f->handle->sticky_write_time = false; + f->handle->open_completed = false; DLIST_ADD(pvfs->files.list, f); @@ -733,7 +733,7 @@ static NTSTATUS pvfs_create_file(struct pvfs_state *pvfs, goto cleanup_delete; } - f->handle->open_completed = True; + f->handle->open_completed = true; notify_trigger(pvfs->notify_context, NOTIFY_ACTION_ADDED, @@ -989,8 +989,8 @@ NTSTATUS pvfs_open(struct ntvfs_module_context *ntvfs, uint32_t create_options; uint32_t share_access; uint32_t access_mask; - BOOL del_on_close; - BOOL stream_existed, stream_truncate=False; + bool del_on_close; + bool stream_existed, stream_truncate=false; uint32_t oplock_level = OPLOCK_NONE, oplock_granted; /* use the generic mapping code to avoid implementing all the @@ -1035,7 +1035,7 @@ NTSTATUS pvfs_open(struct ntvfs_module_context *ntvfs, if (name->stream_name == NULL) { flags = O_TRUNC; } else { - stream_truncate = True; + stream_truncate = true; } break; @@ -1053,7 +1053,7 @@ NTSTATUS pvfs_open(struct ntvfs_module_context *ntvfs, if (name->stream_name == NULL) { flags = O_TRUNC; } else { - stream_truncate = True; + stream_truncate = true; } break; @@ -1133,9 +1133,9 @@ NTSTATUS pvfs_open(struct ntvfs_module_context *ntvfs, f->handle->seek_offset = 0; f->handle->position = 0; f->handle->mode = 0; - f->handle->have_opendb_entry = False; - f->handle->sticky_write_time = False; - f->handle->open_completed = False; + f->handle->have_opendb_entry = false; + f->handle->sticky_write_time = false; + f->handle->open_completed = false; /* form the lock context used for byte range locking and opendb locking */ @@ -1172,9 +1172,9 @@ NTSTATUS pvfs_open(struct ntvfs_module_context *ntvfs, */ if (create_options & NTCREATEX_OPTIONS_DELETE_ON_CLOSE && req->ctx->protocol == PROTOCOL_SMB2) { - del_on_close = True; + del_on_close = true; } else { - del_on_close = False; + del_on_close = false; } if (pvfs->flags & PVFS_FLAG_FAKE_OPLOCKS) { @@ -1206,7 +1206,7 @@ NTSTATUS pvfs_open(struct ntvfs_module_context *ntvfs, oplock_granted = OPLOCK_BATCH; } - f->handle->have_opendb_entry = True; + f->handle->have_opendb_entry = true; if (access_mask & (SEC_FILE_WRITE_DATA | SEC_FILE_APPEND_DATA)) { flags |= O_RDWR; @@ -1273,7 +1273,7 @@ NTSTATUS pvfs_open(struct ntvfs_module_context *ntvfs, /* mark the open as having completed fully, so delete on close can now be used */ - f->handle->open_completed = True; + f->handle->open_completed = true; io->generic.out.oplock_level = oplock_granted; io->generic.out.file.ntvfs = h; @@ -1379,7 +1379,7 @@ NTSTATUS pvfs_exit(struct ntvfs_module_context *ntvfs, */ NTSTATUS pvfs_set_delete_on_close(struct pvfs_state *pvfs, struct ntvfs_request *req, - struct pvfs_file *f, BOOL del_on_close) + struct pvfs_file *f, bool del_on_close) { struct odb_lock *lck; NTSTATUS status; @@ -1532,17 +1532,17 @@ NTSTATUS pvfs_can_stat(struct pvfs_state *pvfs, /* determine if delete on close is set on */ -BOOL pvfs_delete_on_close_set(struct pvfs_state *pvfs, struct pvfs_file_handle *h, +bool pvfs_delete_on_close_set(struct pvfs_state *pvfs, struct pvfs_file_handle *h, int *open_count, char **path) { NTSTATUS status; - BOOL del_on_close; + bool del_on_close; status = odb_get_delete_on_close(pvfs->odb_context, &h->odb_locking_key, &del_on_close, open_count, path); if (!NT_STATUS_IS_OK(status)) { DEBUG(1,("WARNING: unable to determine delete on close status for open file\n")); - return False; + return false; } return del_on_close; diff --git a/source4/ntvfs/posix/pvfs_resolve.c b/source4/ntvfs/posix/pvfs_resolve.c index fae5ec432c..8a7aa13351 100644 --- a/source4/ntvfs/posix/pvfs_resolve.c +++ b/source4/ntvfs/posix/pvfs_resolve.c @@ -121,7 +121,7 @@ static NTSTATUS pvfs_case_search(struct pvfs_state *pvfs, struct pvfs_filename * talloc_free(partial_name); partial_name = test_name; if (i == num_components - 1) { - name->exists = True; + name->exists = true; } continue; } @@ -166,7 +166,7 @@ static NTSTATUS pvfs_case_search(struct pvfs_state *pvfs, struct pvfs_filename * if (!name->exists) { if (stat(partial_name, &name->st) == 0) { - name->exists = True; + name->exists = true; } } @@ -229,7 +229,7 @@ static NTSTATUS pvfs_unix_path(struct pvfs_state *pvfs, const char *cifs_name, name->original_name = talloc_strdup(name, cifs_name); name->stream_name = NULL; name->stream_id = 0; - name->has_wildcard = False; + name->has_wildcard = false; while (*cifs_name == '\\') { cifs_name++; @@ -291,7 +291,7 @@ static NTSTATUS pvfs_unix_path(struct pvfs_state *pvfs, const char *cifs_name, if (!(flags & PVFS_RESOLVE_WILDCARD)) { return NT_STATUS_OBJECT_NAME_INVALID; } - name->has_wildcard = True; + name->has_wildcard = true; break; case '/': case '|': @@ -456,8 +456,8 @@ NTSTATUS pvfs_resolve_name(struct pvfs_state *pvfs, TALLOC_CTX *mem_ctx, return NT_STATUS_NO_MEMORY; } - (*name)->exists = False; - (*name)->stream_exists = False; + (*name)->exists = false; + (*name)->stream_exists = false; if (!(pvfs->fs_attribs & FS_ATTR_NAMED_STREAMS)) { flags &= ~PVFS_RESOLVE_STREAMS; @@ -519,7 +519,7 @@ NTSTATUS pvfs_resolve_name(struct pvfs_state *pvfs, TALLOC_CTX *mem_ctx, /* if we can stat() the full name now then we are done */ if (stat((*name)->full_name, &(*name)->st) == 0) { - (*name)->exists = True; + (*name)->exists = true; return pvfs_fill_dos_info(pvfs, *name, -1); } @@ -558,9 +558,9 @@ NTSTATUS pvfs_resolve_partial(struct pvfs_state *pvfs, TALLOC_CTX *mem_ctx, return NT_STATUS_OBJECT_NAME_NOT_FOUND; } - (*name)->exists = True; - (*name)->stream_exists = True; - (*name)->has_wildcard = False; + (*name)->exists = true; + (*name)->stream_exists = true; + (*name)->has_wildcard = false; (*name)->original_name = talloc_strdup(*name, fname); (*name)->stream_name = NULL; (*name)->stream_id = 0; @@ -608,7 +608,7 @@ NTSTATUS pvfs_resolve_name_fd(struct pvfs_state *pvfs, int fd, return NT_STATUS_UNEXPECTED_IO_ERROR; } - name->exists = True; + name->exists = true; return pvfs_fill_dos_info(pvfs, name, fd); } @@ -650,9 +650,9 @@ NTSTATUS pvfs_resolve_parent(struct pvfs_state *pvfs, TALLOC_CTX *mem_ctx, return NT_STATUS_OBJECT_NAME_NOT_FOUND; } - (*name)->exists = True; - (*name)->stream_exists = True; - (*name)->has_wildcard = False; + (*name)->exists = true; + (*name)->stream_exists = true; + (*name)->has_wildcard = false; /* we can't get the correct 'original_name', but for the purposes of this call this is close enough */ (*name)->original_name = talloc_reference(*name, child->original_name); diff --git a/source4/ntvfs/posix/pvfs_search.c b/source4/ntvfs/posix/pvfs_search.c index cefcee6155..e47406dc09 100644 --- a/source4/ntvfs/posix/pvfs_search.c +++ b/source4/ntvfs/posix/pvfs_search.c @@ -237,7 +237,7 @@ static NTSTATUS pvfs_search_fill(struct pvfs_state *pvfs, TALLOC_CTX *mem_ctx, enum smb_search_data_level level, uint_t *reply_count, void *search_private, - BOOL (*callback)(void *, const union smb_search_data *)) + bool (*callback)(void *, const union smb_search_data *)) { struct pvfs_dir *dir = search->dir; NTSTATUS status; @@ -313,7 +313,7 @@ static void pvfs_search_cleanup(struct pvfs_state *pvfs) static NTSTATUS pvfs_search_first_old(struct ntvfs_module_context *ntvfs, struct ntvfs_request *req, union smb_search_first *io, void *search_private, - BOOL (*callback)(void *, const union smb_search_data *)) + bool (*callback)(void *, const union smb_search_data *)) { struct pvfs_dir *dir; struct pvfs_state *pvfs = ntvfs->private_data; @@ -403,7 +403,7 @@ static NTSTATUS pvfs_search_first_old(struct ntvfs_module_context *ntvfs, static NTSTATUS pvfs_search_next_old(struct ntvfs_module_context *ntvfs, struct ntvfs_request *req, union smb_search_next *io, void *search_private, - BOOL (*callback)(void *, const union smb_search_data *)) + bool (*callback)(void *, const union smb_search_data *)) { struct pvfs_state *pvfs = ntvfs->private_data; struct pvfs_search_state *search; @@ -452,7 +452,7 @@ static NTSTATUS pvfs_search_next_old(struct ntvfs_module_context *ntvfs, static NTSTATUS pvfs_search_first_trans2(struct ntvfs_module_context *ntvfs, struct ntvfs_request *req, union smb_search_first *io, void *search_private, - BOOL (*callback)(void *, const union smb_search_data *)) + bool (*callback)(void *, const union smb_search_data *)) { struct pvfs_dir *dir; struct pvfs_state *pvfs = ntvfs->private_data; @@ -548,7 +548,7 @@ static NTSTATUS pvfs_search_first_trans2(struct ntvfs_module_context *ntvfs, static NTSTATUS pvfs_search_next_trans2(struct ntvfs_module_context *ntvfs, struct ntvfs_request *req, union smb_search_next *io, void *search_private, - BOOL (*callback)(void *, const union smb_search_data *)) + bool (*callback)(void *, const union smb_search_data *)) { struct pvfs_state *pvfs = ntvfs->private_data; struct pvfs_search_state *search; @@ -609,7 +609,7 @@ static NTSTATUS pvfs_search_next_trans2(struct ntvfs_module_context *ntvfs, static NTSTATUS pvfs_search_first_smb2(struct ntvfs_module_context *ntvfs, struct ntvfs_request *req, const struct smb2_find *io, void *search_private, - BOOL (*callback)(void *, const union smb_search_data *)) + bool (*callback)(void *, const union smb_search_data *)) { struct pvfs_dir *dir; struct pvfs_state *pvfs = ntvfs->private_data; @@ -712,7 +712,7 @@ static NTSTATUS pvfs_search_first_smb2(struct ntvfs_module_context *ntvfs, static NTSTATUS pvfs_search_next_smb2(struct ntvfs_module_context *ntvfs, struct ntvfs_request *req, const struct smb2_find *io, void *search_private, - BOOL (*callback)(void *, const union smb_search_data *)) + bool (*callback)(void *, const union smb_search_data *)) { struct pvfs_state *pvfs = ntvfs->private_data; struct pvfs_search_state *search; @@ -765,7 +765,7 @@ static NTSTATUS pvfs_search_next_smb2(struct ntvfs_module_context *ntvfs, NTSTATUS pvfs_search_first(struct ntvfs_module_context *ntvfs, struct ntvfs_request *req, union smb_search_first *io, void *search_private, - BOOL (*callback)(void *, const union smb_search_data *)) + bool (*callback)(void *, const union smb_search_data *)) { switch (io->generic.level) { case RAW_SEARCH_SEARCH: @@ -787,7 +787,7 @@ NTSTATUS pvfs_search_first(struct ntvfs_module_context *ntvfs, NTSTATUS pvfs_search_next(struct ntvfs_module_context *ntvfs, struct ntvfs_request *req, union smb_search_next *io, void *search_private, - BOOL (*callback)(void *, const union smb_search_data *)) + bool (*callback)(void *, const union smb_search_data *)) { switch (io->generic.level) { case RAW_SEARCH_SEARCH: diff --git a/source4/ntvfs/posix/pvfs_setfileinfo.c b/source4/ntvfs/posix/pvfs_setfileinfo.c index f20270c743..340913cd4d 100644 --- a/source4/ntvfs/posix/pvfs_setfileinfo.c +++ b/source4/ntvfs/posix/pvfs_setfileinfo.c @@ -323,7 +323,7 @@ NTSTATUS pvfs_setfileinfo(struct ntvfs_module_context *ntvfs, if (!null_nttime(info->basic_info.in.write_time)) { newstats.dos.write_time = info->basic_info.in.write_time; newstats.dos.flags |= XATTR_ATTRIB_FLAG_STICKY_WRITE_TIME; - h->sticky_write_time = True; + h->sticky_write_time = true; } if (!null_nttime(info->basic_info.in.change_time)) { newstats.dos.change_time = info->basic_info.in.change_time; diff --git a/source4/ntvfs/posix/pvfs_shortname.c b/source4/ntvfs/posix/pvfs_shortname.c index 141f5a30a1..1cbe287a4b 100644 --- a/source4/ntvfs/posix/pvfs_shortname.c +++ b/source4/ntvfs/posix/pvfs_shortname.c @@ -159,7 +159,7 @@ static const char *cache_lookup(struct pvfs_mangle_context *ctx, uint32_t hash) In this algorithm, mangled names use only pure ascii characters (no multi-byte) so we can avoid doing a UCS2 conversion */ -static BOOL is_mangled_component(struct pvfs_mangle_context *ctx, +static bool is_mangled_component(struct pvfs_mangle_context *ctx, const char *name, size_t len) { unsigned int i; @@ -168,19 +168,19 @@ static BOOL is_mangled_component(struct pvfs_mangle_context *ctx, /* check the length */ if (len > 12 || len < 8) - return False; + return false; /* the best distinguishing characteristic is the ~ */ if (name[6] != '~') - return False; + return false; /* check extension */ if (len > 8) { if (name[8] != '.') - return False; + return false; for (i=9; name[i] && i < len; i++) { if (! FLAG_CHECK(name[i], FLAG_ASCII)) { - return False; + return false; } } } @@ -188,23 +188,23 @@ static BOOL is_mangled_component(struct pvfs_mangle_context *ctx, /* check lead characters */ for (i=0;i<ctx->mangle_prefix;i++) { if (! FLAG_CHECK(name[i], FLAG_ASCII)) { - return False; + return false; } } /* check rest of hash */ if (! FLAG_CHECK(name[7], FLAG_BASECHAR)) { - return False; + return false; } for (i=ctx->mangle_prefix;i<6;i++) { if (! FLAG_CHECK(name[i], FLAG_BASECHAR)) { - return False; + return false; } } M_DEBUG(10,("is_mangled_component %s (len %u) -> yes\n", name, (unsigned int)len)); - return True; + return true; } @@ -220,7 +220,7 @@ static BOOL is_mangled_component(struct pvfs_mangle_context *ctx, directory separators. It should return true if any component is mangled */ -static BOOL is_mangled(struct pvfs_mangle_context *ctx, const char *name) +static bool is_mangled(struct pvfs_mangle_context *ctx, const char *name) { const char *p; const char *s; @@ -229,7 +229,7 @@ static BOOL is_mangled(struct pvfs_mangle_context *ctx, const char *name) for (s=name; (p=strchr(s, '/')); s=p+1) { if (is_mangled_component(ctx, s, PTR_DIFF(p, s))) { - return True; + return true; } } @@ -245,8 +245,8 @@ static BOOL is_mangled(struct pvfs_mangle_context *ctx, const char *name) simplifies things greatly (it means that we know the string won't get larger when converted from UNIX to DOS formats) */ -static BOOL is_8_3(struct pvfs_mangle_context *ctx, - const char *name, BOOL check_case, BOOL allow_wildcards) +static bool is_8_3(struct pvfs_mangle_context *ctx, + const char *name, bool check_case, bool allow_wildcards) { int len, i; char *dot_p; @@ -254,7 +254,7 @@ static BOOL is_8_3(struct pvfs_mangle_context *ctx, /* as a special case, the names '.' and '..' are allowable 8.3 names */ if (name[0] == '.') { if (!name[1] || (name[1] == '.' && !name[2])) { - return True; + return true; } } @@ -265,7 +265,7 @@ static BOOL is_8_3(struct pvfs_mangle_context *ctx, only be slower, it would be incorrect */ len = strlen(name); if (len > 12) - return False; + return false; /* find the '.'. Note that once again we use the non-multibyte function */ @@ -275,7 +275,7 @@ static BOOL is_8_3(struct pvfs_mangle_context *ctx, /* if the name doesn't contain a '.' then its length must be less than 8 */ if (len > 8) { - return False; + return false; } } else { int prefix_len, suffix_len; @@ -286,12 +286,12 @@ static BOOL is_8_3(struct pvfs_mangle_context *ctx, suffix_len = len - (prefix_len+1); if (prefix_len > 8 || suffix_len > 3 || suffix_len == 0) { - return False; + return false; } /* a 8.3 name cannot contain more than 1 '.' */ if (strchr(dot_p+1, '.')) { - return False; + return false; } } @@ -300,12 +300,12 @@ static BOOL is_8_3(struct pvfs_mangle_context *ctx, /* note that we may allow wildcard petterns! */ if (!FLAG_CHECK(name[i], FLAG_ASCII|(allow_wildcards ? FLAG_WILDCARD : 0)) && name[i] != '.') { - return False; + return false; } } /* it is a good 8.3 name */ - return True; + return true; } @@ -361,7 +361,7 @@ static char *check_cache(struct pvfs_mangle_context *ctx, /* look for a DOS reserved name */ -static BOOL is_reserved_name(struct pvfs_mangle_context *ctx, const char *name) +static bool is_reserved_name(struct pvfs_mangle_context *ctx, const char *name) { if (FLAG_CHECK(name[0], FLAG_POSSIBLE1) && FLAG_CHECK(name[1], FLAG_POSSIBLE2) && @@ -371,12 +371,12 @@ static BOOL is_reserved_name(struct pvfs_mangle_context *ctx, const char *name) int i; for (i=0; reserved_names[i]; i++) { if (strcasecmp(name, reserved_names[i]) == 0) { - return True; + return true; } } } - return False; + return false; } @@ -384,13 +384,13 @@ static BOOL is_reserved_name(struct pvfs_mangle_context *ctx, const char *name) See if a filename is a legal long filename. A filename ending in a '.' is not legal unless it's "." or "..". JRA. */ -static BOOL is_legal_name(struct pvfs_mangle_context *ctx, const char *name) +static bool is_legal_name(struct pvfs_mangle_context *ctx, const char *name) { while (*name) { size_t c_size; codepoint_t c = next_codepoint(name, &c_size); if (c == INVALID_CODEPOINT) { - return False; + return false; } /* all high chars are OK */ if (c >= 128) { @@ -398,12 +398,12 @@ static BOOL is_legal_name(struct pvfs_mangle_context *ctx, const char *name) continue; } if (FLAG_CHECK(c, FLAG_ILLEGAL)) { - return False; + return false; } name += c_size; } - return True; + return true; } /* @@ -418,7 +418,7 @@ static BOOL is_legal_name(struct pvfs_mangle_context *ctx, const char *name) return NULL if we don't need to do any conversion */ static char *name_map(struct pvfs_mangle_context *ctx, - const char *name, BOOL need83, BOOL cache83) + const char *name, bool need83, bool cache83) { char *dot_p; char lead_chars[7]; @@ -433,7 +433,7 @@ static char *name_map(struct pvfs_mangle_context *ctx, if (!is_reserved_name(ctx, name)) { /* if the name is already a valid 8.3 name then we don't need to do anything */ - if (is_8_3(ctx, name, False, False)) { + if (is_8_3(ctx, name, false, false)) { return NULL; } @@ -646,7 +646,7 @@ NTSTATUS pvfs_mangle_init(struct pvfs_state *pvfs) */ char *pvfs_short_name_component(struct pvfs_state *pvfs, const char *name) { - return name_map(pvfs->mangle_ctx, name, True, True); + return name_map(pvfs->mangle_ctx, name, true, true); } @@ -679,7 +679,7 @@ char *pvfs_mangled_lookup(struct pvfs_state *pvfs, TALLOC_CTX *mem_ctx, /* look for a DOS reserved name */ -BOOL pvfs_is_reserved_name(struct pvfs_state *pvfs, const char *name) +bool pvfs_is_reserved_name(struct pvfs_state *pvfs, const char *name) { return is_reserved_name(pvfs->mangle_ctx, name); } @@ -689,7 +689,7 @@ BOOL pvfs_is_reserved_name(struct pvfs_state *pvfs, const char *name) see if a component of a filename could be a mangled name from our mangling code */ -BOOL pvfs_is_mangled_component(struct pvfs_state *pvfs, const char *name) +bool pvfs_is_mangled_component(struct pvfs_state *pvfs, const char *name) { return is_mangled_component(pvfs->mangle_ctx, name, strlen(name)); } diff --git a/source4/ntvfs/posix/pvfs_streams.c b/source4/ntvfs/posix/pvfs_streams.c index a3b98feead..7e6173ef2f 100644 --- a/source4/ntvfs/posix/pvfs_streams.c +++ b/source4/ntvfs/posix/pvfs_streams.c @@ -79,7 +79,7 @@ NTSTATUS pvfs_stream_info(struct pvfs_state *pvfs, struct pvfs_filename *name, i /* the NULL stream always exists */ if (name->stream_name == NULL) { - name->stream_exists = True; + name->stream_exists = true; return NT_STATUS_OK; } @@ -99,7 +99,7 @@ NTSTATUS pvfs_stream_info(struct pvfs_state *pvfs, struct pvfs_filename *name, i if (strcasecmp_m(s->name, name->stream_name) == 0) { name->dos.alloc_size = pvfs_round_alloc_size(pvfs, s->alloc_size); name->st.st_size = s->size; - name->stream_exists = True; + name->stream_exists = true; talloc_free(streams); return NT_STATUS_OK; } @@ -109,7 +109,7 @@ NTSTATUS pvfs_stream_info(struct pvfs_state *pvfs, struct pvfs_filename *name, i name->dos.alloc_size = 0; name->st.st_size = 0; - name->stream_exists = False; + name->stream_exists = false; return NT_STATUS_OK; } diff --git a/source4/ntvfs/posix/pvfs_util.c b/source4/ntvfs/posix/pvfs_util.c index 895fcd9685..fd9724f7e2 100644 --- a/source4/ntvfs/posix/pvfs_util.c +++ b/source4/ntvfs/posix/pvfs_util.c @@ -24,14 +24,14 @@ #include "vfs_posix.h" /* - return True if a string contains one of the CIFS wildcard characters + return true if a string contains one of the CIFS wildcard characters */ -BOOL pvfs_has_wildcard(const char *str) +bool pvfs_has_wildcard(const char *str) { if (strpbrk(str, "*?<>\"")) { - return True; + return true; } - return False; + return false; } /* diff --git a/source4/ntvfs/posix/pvfs_xattr.c b/source4/ntvfs/posix/pvfs_xattr.c index 61a95ec824..ead3585e0d 100644 --- a/source4/ntvfs/posix/pvfs_xattr.c +++ b/source4/ntvfs/posix/pvfs_xattr.c @@ -158,9 +158,9 @@ NTSTATUS pvfs_dosattrib_load(struct pvfs_state *pvfs, struct pvfs_filename *name struct xattr_DosInfo2 *info2; if (name->stream_name != NULL) { - name->stream_exists = False; + name->stream_exists = false; } else { - name->stream_exists = True; + name->stream_exists = true; } if (!(pvfs->flags & PVFS_FLAG_XATTR_ENABLE)) { diff --git a/source4/ntvfs/posix/vfs_posix.c b/source4/ntvfs/posix/vfs_posix.c index 2c414065cb..208c9e62b7 100644 --- a/source4/ntvfs/posix/vfs_posix.c +++ b/source4/ntvfs/posix/vfs_posix.c @@ -56,7 +56,7 @@ static void pvfs_setup_options(struct pvfs_state *pvfs) pvfs->flags |= PVFS_FLAG_CI_FILESYSTEM; if (share_bool_option(scfg, PVFS_FAKE_OPLOCKS, PVFS_FAKE_OPLOCKS_DEFAULT)) pvfs->flags |= PVFS_FLAG_FAKE_OPLOCKS; - if (share_bool_option(scfg, PVFS_AIO, False)) + if (share_bool_option(scfg, PVFS_AIO, false)) pvfs->flags |= PVFS_FLAG_LINUX_AIO; /* file perm options */ @@ -234,7 +234,7 @@ static NTSTATUS pvfs_connect(struct ntvfs_module_context *ntvfs, #ifdef SIGXFSZ /* who had the stupid idea to generate a signal on a large file write instead of just failing it!? */ - BlockSignals(True, SIGXFSZ); + BlockSignals(true, SIGXFSZ); #endif return NT_STATUS_OK; diff --git a/source4/ntvfs/posix/vfs_posix.h b/source4/ntvfs/posix/vfs_posix.h index dcf082fd88..a660da329a 100644 --- a/source4/ntvfs/posix/vfs_posix.h +++ b/source4/ntvfs/posix/vfs_posix.h @@ -237,8 +237,8 @@ enum pvfs_wait_notice {PVFS_WAIT_EVENT, PVFS_WAIT_TIMEOUT, PVFS_WAIT_CANCEL}; #define PVFS_ACL "posix:acl" #define PVFS_AIO "posix:aio" -#define PVFS_XATTR_DEFAULT True -#define PVFS_FAKE_OPLOCKS_DEFAULT False +#define PVFS_XATTR_DEFAULT true +#define PVFS_FAKE_OPLOCKS_DEFAULT false #define PVFS_SHARE_DELAY_DEFAULT 1000000 #define PVFS_ALLOCATION_ROUNDING_DEFAULT 512 #define PVFS_SEARCH_INACTIVITY_DEFAULT 300 |