diff options
author | Jeremy Allison <jra@samba.org> | 2007-10-18 17:40:25 -0700 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2007-10-18 17:40:25 -0700 |
commit | 30191d1a5704ad2b158386b511558972d539ce47 (patch) | |
tree | 4f46e5c4f28f672ab661aa18f45745860970a88c /source3/modules | |
parent | 789856f63ff73fec66298e95c91c60db7bdaf14e (diff) | |
download | samba-30191d1a5704ad2b158386b511558972d539ce47.tar.gz samba-30191d1a5704ad2b158386b511558972d539ce47.tar.xz samba-30191d1a5704ad2b158386b511558972d539ce47.zip |
RIP BOOL. Convert BOOL -> bool. I found a few interesting
bugs in various places whilst doing this (places that assumed
BOOL == int). I also need to fix the Samba4 pidl generation
(next checkin).
Jeremy.
(This used to be commit f35a266b3cbb3e5fa6a86be60f34fe340a3ca71f)
Diffstat (limited to 'source3/modules')
-rw-r--r-- | source3/modules/gpfs.c | 6 | ||||
-rw-r--r-- | source3/modules/nfs4_acls.c | 10 | ||||
-rw-r--r-- | source3/modules/nfs4_acls.h | 2 | ||||
-rw-r--r-- | source3/modules/vfs_afsacl.c | 26 | ||||
-rw-r--r-- | source3/modules/vfs_aixacl2.c | 12 | ||||
-rw-r--r-- | source3/modules/vfs_cacheprime.c | 2 | ||||
-rw-r--r-- | source3/modules/vfs_cap.c | 6 | ||||
-rw-r--r-- | source3/modules/vfs_catia.c | 4 | ||||
-rw-r--r-- | source3/modules/vfs_default.c | 14 | ||||
-rw-r--r-- | source3/modules/vfs_expand_msdfs.c | 6 | ||||
-rw-r--r-- | source3/modules/vfs_full_audit.c | 30 | ||||
-rw-r--r-- | source3/modules/vfs_gpfs.c | 2 | ||||
-rw-r--r-- | source3/modules/vfs_hpuxacl.c | 40 | ||||
-rw-r--r-- | source3/modules/vfs_netatalk.c | 2 | ||||
-rw-r--r-- | source3/modules/vfs_notify_fam.c | 2 | ||||
-rw-r--r-- | source3/modules/vfs_posixacl.c | 4 | ||||
-rw-r--r-- | source3/modules/vfs_readahead.c | 4 | ||||
-rw-r--r-- | source3/modules/vfs_recycle.c | 32 | ||||
-rw-r--r-- | source3/modules/vfs_shadow_copy.c | 4 | ||||
-rw-r--r-- | source3/modules/vfs_solarisacl.c | 30 | ||||
-rw-r--r-- | source3/modules/vfs_tru64acl.c | 4 | ||||
-rw-r--r-- | source3/modules/vfs_zfsacl.c | 2 |
22 files changed, 122 insertions, 122 deletions
diff --git a/source3/modules/gpfs.c b/source3/modules/gpfs.c index 86ba2d81a63..300e90fa697 100644 --- a/source3/modules/gpfs.c +++ b/source3/modules/gpfs.c @@ -24,7 +24,7 @@ #include "gpfs_gpl.h" static void *libgpfs_handle = NULL; -static BOOL gpfs_share_modes; +static bool gpfs_share_modes; static int (*gpfs_set_share_fn)(int fd, unsigned int allow, unsigned int deny); static int (*gpfs_set_lease_fn)(int fd, unsigned int leaseType); @@ -32,7 +32,7 @@ static int (*gpfs_getacl_fn)(char *pathname, int flags, void *acl); static int (*gpfs_putacl_fn)(char *pathname, int flags, void *acl); -BOOL set_gpfs_sharemode(files_struct *fsp, uint32 access_mask, +bool set_gpfs_sharemode(files_struct *fsp, uint32 access_mask, uint32 share_access) { unsigned int allow = GPFS_SHARE_NONE; @@ -202,7 +202,7 @@ int set_gpfs_lease(int snum, int leasetype) return -1; } -BOOL set_gpfs_sharemode(files_struct *fsp, uint32 access_mask, +bool set_gpfs_sharemode(files_struct *fsp, uint32 access_mask, uint32 share_access) { DEBUG(0, ("VFS module - smbgpfs.so loaded, without gpfs support compiled\n")); diff --git a/source3/modules/nfs4_acls.c b/source3/modules/nfs4_acls.c index 31a9b01619c..2d81739203d 100644 --- a/source3/modules/nfs4_acls.c +++ b/source3/modules/nfs4_acls.c @@ -184,7 +184,7 @@ static int smbacl4_GetFileOwner(files_struct *fsp, SMB_STRUCT_STAT *psbuf) return 0; } -static BOOL smbacl4_nfs42win(TALLOC_CTX *mem_ctx, SMB4ACL_T *acl, /* in */ +static bool smbacl4_nfs42win(TALLOC_CTX *mem_ctx, SMB4ACL_T *acl, /* in */ DOM_SID *psid_owner, /* in */ DOM_SID *psid_group, /* in */ SEC_ACE **ppnt_ace_list, /* out */ @@ -310,7 +310,7 @@ enum smbacl4_acedup_enum {e_dontcare=0, e_reject=1, e_ignore=2, e_merge=3}; typedef struct _smbacl4_vfs_params { enum smbacl4_mode_enum mode; - BOOL do_chown; + bool do_chown; enum smbacl4_acedup_enum acedup; } smbacl4_vfs_params; @@ -490,7 +490,7 @@ static int smbacl4_MergeIgnoreReject( enum smbacl4_acedup_enum acedup, SMB4ACL_T *acl, /* may modify it */ SMB_ACE4PROP_T *ace, /* the "new" ACE */ - BOOL *paddNewACE, + bool *paddNewACE, int i ) { @@ -539,7 +539,7 @@ static SMB4ACL_T *smbacl4_win2nfs4( for(i=0; i<dacl->num_aces; i++) { SMB_ACE4PROP_T ace_v4; - BOOL addNewACE = True; + bool addNewACE = True; if (smbacl4_fill_ace4(mem_ctx, pparams, ownerUID, ownerGID, dacl->aces + i, &ace_v4)) @@ -565,7 +565,7 @@ NTSTATUS smb_set_nt_acl_nfs4(files_struct *fsp, { smbacl4_vfs_params params; SMB4ACL_T *acl = NULL; - BOOL result; + bool result; SMB_STRUCT_STAT sbuf; uid_t newUID = (uid_t)-1; diff --git a/source3/modules/nfs4_acls.h b/source3/modules/nfs4_acls.h index b8baa83e78d..08c205982c2 100644 --- a/source3/modules/nfs4_acls.h +++ b/source3/modules/nfs4_acls.h @@ -135,7 +135,7 @@ size_t smb_get_nt_acl_nfs4(files_struct *fsp, /* Callback function needed to set the native acl * when applicable */ -typedef BOOL (*set_nfs4acl_native_fn_t)(files_struct *, SMB4ACL_T *); +typedef bool (*set_nfs4acl_native_fn_t)(files_struct *, SMB4ACL_T *); NTSTATUS smb_set_nt_acl_nfs4(files_struct *fsp, uint32 security_info_sent, diff --git a/source3/modules/vfs_afsacl.c b/source3/modules/vfs_afsacl.c index ba0ced9a4f8..a1043d6f6ad 100644 --- a/source3/modules/vfs_afsacl.c +++ b/source3/modules/vfs_afsacl.c @@ -39,12 +39,12 @@ extern const DOM_SID global_sid_NULL; static char space_replacement = '%'; /* Do we expect SIDs as pts names? */ -static BOOL sidpts; +static bool sidpts; extern int afs_syscall(int, char *, int, char *, int); struct afs_ace { - BOOL positive; + bool positive; char *name; DOM_SID sid; enum lsa_SidType type; @@ -65,7 +65,7 @@ struct afs_iob { }; -static BOOL init_afs_acl(struct afs_acl *acl) +static bool init_afs_acl(struct afs_acl *acl) { ZERO_STRUCT(*acl); acl->ctx = talloc_init("afs_acl"); @@ -105,7 +105,7 @@ static struct afs_ace *clone_afs_ace(TALLOC_CTX *mem_ctx, struct afs_ace *ace) } static struct afs_ace *new_afs_ace(TALLOC_CTX *mem_ctx, - BOOL positive, + bool positive, const char *name, uint32 rights) { DOM_SID sid; @@ -188,7 +188,7 @@ static struct afs_ace *new_afs_ace(TALLOC_CTX *mem_ctx, } static void add_afs_ace(struct afs_acl *acl, - BOOL positive, + bool positive, const char *name, uint32 rights) { struct afs_ace *ace; @@ -227,7 +227,7 @@ static void add_afs_ace(struct afs_acl *acl, * Second field: Rights */ -static BOOL parse_afs_acl(struct afs_acl *acl, const char *acl_str) +static bool parse_afs_acl(struct afs_acl *acl, const char *acl_str) { int nplus, nminus; int aces; @@ -290,7 +290,7 @@ static BOOL parse_afs_acl(struct afs_acl *acl, const char *acl_str) return True; } -static BOOL unparse_afs_acl(struct afs_acl *acl, char *acl_str) +static bool unparse_afs_acl(struct afs_acl *acl, char *acl_str) { /* TODO: String length checks!!!! */ @@ -414,7 +414,7 @@ static void split_afs_acl(struct afs_acl *acl, return; } -static BOOL same_principal(struct afs_ace *x, struct afs_ace *y) +static bool same_principal(struct afs_ace *x, struct afs_ace *y) { return ( (x->positive == y->positive) && (sid_compare(&x->sid, &y->sid) == 0) ); @@ -430,7 +430,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; @@ -450,7 +450,7 @@ 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; @@ -668,7 +668,7 @@ static size_t afs_to_nt_acl(struct afs_acl *afs_acl, return sd_size; } -static BOOL mappable_sid(const DOM_SID *sid) +static bool mappable_sid(const DOM_SID *sid) { DOM_SID domain_sid; @@ -692,7 +692,7 @@ static BOOL mappable_sid(const DOM_SID *sid) return False; } -static BOOL nt_to_afs_acl(const char *filename, +static bool nt_to_afs_acl(const char *filename, uint32 security_info_sent, struct security_descriptor *psd, uint32 (*nt_to_afs_rights)(const char *filename, @@ -795,7 +795,7 @@ static BOOL nt_to_afs_acl(const char *filename, return True; } -static BOOL afs_get_afs_acl(char *filename, struct afs_acl *acl) +static bool afs_get_afs_acl(char *filename, struct afs_acl *acl) { struct afs_iob iob; diff --git a/source3/modules/vfs_aixacl2.c b/source3/modules/vfs_aixacl2.c index 8226ccd33d1..058fef1d1b0 100644 --- a/source3/modules/vfs_aixacl2.c +++ b/source3/modules/vfs_aixacl2.c @@ -27,7 +27,7 @@ extern struct current_user current_user; extern int try_chown(connection_struct *conn, const char *fname, uid_t uid, gid_t gid); -extern BOOL unpack_nt_owners(int snum, uid_t *puser, gid_t *pgrp, +extern bool unpack_nt_owners(int snum, uid_t *puser, gid_t *pgrp, uint32 security_info_sent, SEC_DESC *psd); extern SMB_ACL_T aixacl_to_smbacl( struct acl *file_acl); @@ -98,8 +98,8 @@ static AIXJFS2_ACL_T *aixjfs2_getacl_alloc(const char *fname, acl_type_t *type) return acl; } -static BOOL aixjfs2_get_nfs4_acl(files_struct *fsp, - SMB4ACL_T **ppacl, BOOL *pretryPosix) +static bool aixjfs2_get_nfs4_acl(files_struct *fsp, + SMB4ACL_T **ppacl, bool *pretryPosix) { int32_t i; @@ -162,8 +162,8 @@ static size_t aixjfs2_get_nt_acl_common(files_struct *fsp, uint32 security_info, SEC_DESC **ppdesc) { SMB4ACL_T *pacl = NULL; - BOOL result; - BOOL retryPosix = False; + bool result; + bool retryPosix = False; *ppdesc = NULL; result = aixjfs2_get_nfs4_acl(fsp, &pacl, &retryPosix); @@ -290,7 +290,7 @@ static int aixjfs2_query_acl_support( return 1; /* haven't found that ACL type. */ } -static BOOL aixjfs2_process_smbacl(files_struct *fsp, SMB4ACL_T *smbacl) +static bool aixjfs2_process_smbacl(files_struct *fsp, SMB4ACL_T *smbacl) { SMB4ACE_T *smbace; TALLOC_CTX *mem_ctx; diff --git a/source3/modules/vfs_cacheprime.c b/source3/modules/vfs_cacheprime.c index c6f7fad9068..9574087d9d3 100644 --- a/source3/modules/vfs_cacheprime.c +++ b/source3/modules/vfs_cacheprime.c @@ -45,7 +45,7 @@ static void * g_readbuf = NULL; * per-fsp data to make sure we only ever do this once. If pread is being * emulated by seek/read/seek, when this will suck quite a lot. */ -static BOOL prime_cache( +static bool prime_cache( struct vfs_handle_struct * handle, files_struct * fsp, int fd, diff --git a/source3/modules/vfs_cap.c b/source3/modules/vfs_cap.c index 84c6a6fd846..7dfbed06919 100644 --- a/source3/modules/vfs_cap.c +++ b/source3/modules/vfs_cap.c @@ -28,7 +28,7 @@ static char *capencode(char *to, const char *from); static char *capdecode(char *to, const char *from); static SMB_BIG_UINT cap_disk_free(vfs_handle_struct *handle, const char *path, - BOOL small_query, SMB_BIG_UINT *bsize, + bool small_query, SMB_BIG_UINT *bsize, SMB_BIG_UINT *dfree, SMB_BIG_UINT *dsize) { pstring cappath; @@ -145,7 +145,7 @@ static int cap_ntimes(vfs_handle_struct *handle, const char *path, const struct } -static BOOL cap_symlink(vfs_handle_struct *handle, const char *oldpath, const char *newpath) +static bool cap_symlink(vfs_handle_struct *handle, const char *oldpath, const char *newpath) { pstring capoldpath, capnewpath; capencode(capoldpath, oldpath); @@ -153,7 +153,7 @@ static BOOL cap_symlink(vfs_handle_struct *handle, const char *oldpath, const ch return SMB_VFS_NEXT_SYMLINK(handle, capoldpath, capnewpath); } -static BOOL cap_readlink(vfs_handle_struct *handle, const char *path, char *buf, size_t bufsiz) +static bool cap_readlink(vfs_handle_struct *handle, const char *path, char *buf, size_t bufsiz) { pstring cappath; capencode(cappath, path); diff --git a/source3/modules/vfs_catia.c b/source3/modules/vfs_catia.c index 325ec16e499..1f5a0163bcc 100644 --- a/source3/modules/vfs_catia.c +++ b/source3/modules/vfs_catia.c @@ -199,13 +199,13 @@ static int catia_ntimes(vfs_handle_struct *handle, return SMB_VFS_NEXT_NTIMES(handle, path, ts); } -static BOOL catia_symlink(vfs_handle_struct *handle, +static bool catia_symlink(vfs_handle_struct *handle, const char *oldpath, const char *newpath) { return SMB_VFS_NEXT_SYMLINK(handle, oldpath, newpath); } -static BOOL catia_readlink(vfs_handle_struct *handle, +static bool catia_readlink(vfs_handle_struct *handle, const char *path, char *buf, size_t bufsiz) { return SMB_VFS_NEXT_READLINK(handle, path, buf, bufsiz); diff --git a/source3/modules/vfs_default.c b/source3/modules/vfs_default.c index ca27cf0ac3a..a3bb61d419d 100644 --- a/source3/modules/vfs_default.c +++ b/source3/modules/vfs_default.c @@ -40,7 +40,7 @@ static void vfswrap_disconnect(vfs_handle_struct *handle) /* Disk operations */ -static SMB_BIG_UINT vfswrap_disk_free(vfs_handle_struct *handle, const char *path, BOOL small_query, SMB_BIG_UINT *bsize, +static SMB_BIG_UINT vfswrap_disk_free(vfs_handle_struct *handle, const char *path, bool small_query, SMB_BIG_UINT *bsize, SMB_BIG_UINT *dfree, SMB_BIG_UINT *dsize) { SMB_BIG_UINT result; @@ -79,7 +79,7 @@ static int vfswrap_set_quota(struct vfs_handle_struct *handle, enum SMB_QUOTA_T #endif } -static int vfswrap_get_shadow_copy_data(struct vfs_handle_struct *handle, struct files_struct *fsp, SHADOW_COPY_DATA *shadow_copy_data, BOOL labels) +static int vfswrap_get_shadow_copy_data(struct vfs_handle_struct *handle, struct files_struct *fsp, SHADOW_COPY_DATA *shadow_copy_data, bool labels) { errno = ENOSYS; return -1; /* Not implemented. */ @@ -138,7 +138,7 @@ static void vfswrap_rewinddir(vfs_handle_struct *handle, SMB_STRUCT_DIR *dirp) static int vfswrap_mkdir(vfs_handle_struct *handle, const char *path, mode_t mode) { int result; - BOOL has_dacl = False; + bool has_dacl = False; START_PROFILE(syscall_mkdir); @@ -786,9 +786,9 @@ static int vfswrap_ftruncate(vfs_handle_struct *handle, files_struct *fsp, int f return result; } -static BOOL vfswrap_lock(vfs_handle_struct *handle, files_struct *fsp, int fd, int op, SMB_OFF_T offset, SMB_OFF_T count, int type) +static bool vfswrap_lock(vfs_handle_struct *handle, files_struct *fsp, int fd, int op, SMB_OFF_T offset, SMB_OFF_T count, int type) { - BOOL result; + bool result; START_PROFILE(syscall_fcntl_lock); result = fcntl_lock(fd, op, offset, count, type); @@ -805,9 +805,9 @@ static int vfswrap_kernel_flock(vfs_handle_struct *handle, files_struct *fsp, in return 0; } -static BOOL vfswrap_getlock(vfs_handle_struct *handle, files_struct *fsp, int fd, SMB_OFF_T *poffset, SMB_OFF_T *pcount, int *ptype, pid_t *ppid) +static bool vfswrap_getlock(vfs_handle_struct *handle, files_struct *fsp, int fd, SMB_OFF_T *poffset, SMB_OFF_T *pcount, int *ptype, pid_t *ppid) { - BOOL result; + bool result; START_PROFILE(syscall_fcntl_getlock); result = fcntl_getlock(fd, poffset, pcount, ptype, ppid); diff --git a/source3/modules/vfs_expand_msdfs.c b/source3/modules/vfs_expand_msdfs.c index 10194f17d3d..e2a4a18bf0b 100644 --- a/source3/modules/vfs_expand_msdfs.c +++ b/source3/modules/vfs_expand_msdfs.c @@ -37,12 +37,12 @@ extern userdom_struct current_user_info; This is to redirect a DFS client to a host close to it. ***********************************************************/ -static BOOL read_target_host(const char *mapfile, pstring targethost) +static bool read_target_host(const char *mapfile, pstring targethost) { XFILE *f; pstring buf; char *space = buf; - BOOL found = False; + bool found = False; f = x_fopen(mapfile, O_RDONLY, 0); @@ -103,7 +103,7 @@ static BOOL read_target_host(const char *mapfile, pstring targethost) ***********************************************************/ -static BOOL expand_msdfs_target(connection_struct* conn, pstring target) +static bool expand_msdfs_target(connection_struct* conn, pstring target) { pstring mapfilename; char *filename_start = strchr_m(target, '@'); diff --git a/source3/modules/vfs_full_audit.c b/source3/modules/vfs_full_audit.c index 18180bf3ef9..df49c86264f 100644 --- a/source3/modules/vfs_full_audit.c +++ b/source3/modules/vfs_full_audit.c @@ -78,7 +78,7 @@ static int smb_full_audit_connect(vfs_handle_struct *handle, static void smb_full_audit_disconnect(vfs_handle_struct *handle); static SMB_BIG_UINT smb_full_audit_disk_free(vfs_handle_struct *handle, const char *path, - BOOL small_query, SMB_BIG_UINT *bsize, + bool small_query, SMB_BIG_UINT *bsize, SMB_BIG_UINT *dfree, SMB_BIG_UINT *dsize); static int smb_full_audit_get_quota(struct vfs_handle_struct *handle, enum SMB_QUOTA_TYPE qtype, unid_t id, @@ -88,7 +88,7 @@ static int smb_full_audit_set_quota(struct vfs_handle_struct *handle, SMB_DISK_QUOTA *qt); static int smb_full_audit_get_shadow_copy_data(struct vfs_handle_struct *handle, struct files_struct *fsp, - SHADOW_COPY_DATA *shadow_copy_data, BOOL labels); + SHADOW_COPY_DATA *shadow_copy_data, bool labels); static int smb_full_audit_statvfs(struct vfs_handle_struct *handle, const char *path, struct vfs_statvfs_struct *statbuf); @@ -156,14 +156,14 @@ static int smb_full_audit_ntimes(vfs_handle_struct *handle, const char *path, const struct timespec ts[2]); static int smb_full_audit_ftruncate(vfs_handle_struct *handle, files_struct *fsp, int fd, SMB_OFF_T len); -static BOOL smb_full_audit_lock(vfs_handle_struct *handle, files_struct *fsp, int fd, +static bool smb_full_audit_lock(vfs_handle_struct *handle, files_struct *fsp, int fd, int op, SMB_OFF_T offset, SMB_OFF_T count, int type); static int smb_full_audit_kernel_flock(struct vfs_handle_struct *handle, struct files_struct *fsp, int fd, uint32 share_mode); static int smb_full_audit_linux_setlease(vfs_handle_struct *handle, files_struct *fsp, int fd, int leasetype); -static BOOL smb_full_audit_getlock(vfs_handle_struct *handle, files_struct *fsp, int fd, +static bool smb_full_audit_getlock(vfs_handle_struct *handle, files_struct *fsp, int fd, SMB_OFF_T *poffset, SMB_OFF_T *pcount, int *ptype, pid_t *ppid); static int smb_full_audit_symlink(vfs_handle_struct *handle, const char *oldpath, const char *newpath); @@ -689,7 +689,7 @@ static char *audit_prefix(connection_struct *conn) return prefix; } -static BOOL log_success(vfs_handle_struct *handle, vfs_op_type op) +static bool log_success(vfs_handle_struct *handle, vfs_op_type op) { struct vfs_full_audit_private_data *pd = NULL; @@ -704,7 +704,7 @@ static BOOL log_success(vfs_handle_struct *handle, vfs_op_type op) return bitmap_query(pd->success_ops, op); } -static BOOL log_failure(vfs_handle_struct *handle, vfs_op_type op) +static bool log_failure(vfs_handle_struct *handle, vfs_op_type op) { struct vfs_full_audit_private_data *pd = NULL; @@ -720,7 +720,7 @@ static BOOL log_failure(vfs_handle_struct *handle, vfs_op_type op) static void init_bitmap(struct bitmap **bm, const char **ops) { - BOOL log_all = False; + bool log_all = False; if (*bm != NULL) return; @@ -735,7 +735,7 @@ static void init_bitmap(struct bitmap **bm, const char **ops) while (*ops != NULL) { int i; - BOOL found = False; + bool found = False; if (strequal(*ops, "all")) { log_all = True; @@ -780,7 +780,7 @@ static const char *audit_opname(vfs_op_type op) return vfs_op_names[op].name; } -static void do_log(vfs_op_type op, BOOL success, vfs_handle_struct *handle, +static void do_log(vfs_op_type op, bool success, vfs_handle_struct *handle, const char *format, ...) { fstring err_msg; @@ -881,7 +881,7 @@ static void smb_full_audit_disconnect(vfs_handle_struct *handle) static SMB_BIG_UINT smb_full_audit_disk_free(vfs_handle_struct *handle, const char *path, - BOOL small_query, SMB_BIG_UINT *bsize, + bool small_query, SMB_BIG_UINT *bsize, SMB_BIG_UINT *dfree, SMB_BIG_UINT *dsize) { SMB_BIG_UINT result; @@ -925,7 +925,7 @@ static int smb_full_audit_set_quota(struct vfs_handle_struct *handle, static int smb_full_audit_get_shadow_copy_data(struct vfs_handle_struct *handle, struct files_struct *fsp, - SHADOW_COPY_DATA *shadow_copy_data, BOOL labels) + SHADOW_COPY_DATA *shadow_copy_data, bool labels) { int result; @@ -1329,10 +1329,10 @@ static int smb_full_audit_ftruncate(vfs_handle_struct *handle, files_struct *fsp return result; } -static BOOL smb_full_audit_lock(vfs_handle_struct *handle, files_struct *fsp, int fd, +static bool smb_full_audit_lock(vfs_handle_struct *handle, files_struct *fsp, int fd, int op, SMB_OFF_T offset, SMB_OFF_T count, int type) { - BOOL result; + bool result; result = SMB_VFS_NEXT_LOCK(handle, fsp, fd, op, offset, count, type); @@ -1368,10 +1368,10 @@ static int smb_full_audit_linux_setlease(vfs_handle_struct *handle, files_struct return result; } -static BOOL smb_full_audit_getlock(vfs_handle_struct *handle, files_struct *fsp, int fd, +static bool smb_full_audit_getlock(vfs_handle_struct *handle, files_struct *fsp, int fd, SMB_OFF_T *poffset, SMB_OFF_T *pcount, int *ptype, pid_t *ppid) { - BOOL result; + bool result; result = SMB_VFS_NEXT_GETLOCK(handle, fsp, fd, poffset, pcount, ptype, ppid); diff --git a/source3/modules/vfs_gpfs.c b/source3/modules/vfs_gpfs.c index b8e8209be07..0188e380e93 100644 --- a/source3/modules/vfs_gpfs.c +++ b/source3/modules/vfs_gpfs.c @@ -261,7 +261,7 @@ size_t gpfsacl_get_nt_acl(vfs_handle_struct *handle, return gpfsacl_get_nt_acl_common(fsp, security_info, ppdesc); } -static BOOL gpfsacl_process_smbacl(files_struct *fsp, SMB4ACL_T *smbacl) +static bool gpfsacl_process_smbacl(files_struct *fsp, SMB4ACL_T *smbacl) { int ret; gpfs_aclLen_t gacl_len; diff --git a/source3/modules/vfs_hpuxacl.c b/source3/modules/vfs_hpuxacl.c index fd40414d570..edce161c19e 100644 --- a/source3/modules/vfs_hpuxacl.c +++ b/source3/modules/vfs_hpuxacl.c @@ -104,32 +104,32 @@ struct hpux_acl_types { /* prototypes for private functions */ static HPUX_ACL_T hpux_acl_init(int count); -static BOOL smb_acl_to_hpux_acl(SMB_ACL_T smb_acl, +static bool smb_acl_to_hpux_acl(SMB_ACL_T smb_acl, HPUX_ACL_T *solariacl, int *count, SMB_ACL_TYPE_T type); static SMB_ACL_T hpux_acl_to_smb_acl(HPUX_ACL_T hpuxacl, int count, SMB_ACL_TYPE_T type); static HPUX_ACL_TAG_T smb_tag_to_hpux_tag(SMB_ACL_TAG_T smb_tag); static SMB_ACL_TAG_T hpux_tag_to_smb_tag(HPUX_ACL_TAG_T hpux_tag); -static BOOL hpux_add_to_acl(HPUX_ACL_T *hpux_acl, int *count, +static bool hpux_add_to_acl(HPUX_ACL_T *hpux_acl, int *count, HPUX_ACL_T add_acl, int add_count, SMB_ACL_TYPE_T type); -static BOOL hpux_acl_get_file(const char *name, HPUX_ACL_T *hpuxacl, +static bool hpux_acl_get_file(const char *name, HPUX_ACL_T *hpuxacl, int *count); static SMB_ACL_PERM_T hpux_perm_to_smb_perm(const HPUX_PERM_T perm); static HPUX_PERM_T smb_perm_to_hpux_perm(const SMB_ACL_PERM_T perm); #if 0 -static BOOL hpux_acl_check(HPUX_ACL_T hpux_acl, int count); +static bool hpux_acl_check(HPUX_ACL_T hpux_acl, int count); #endif /* aclsort (internal) and helpers: */ -static BOOL hpux_acl_sort(HPUX_ACL_T acl, int count); +static bool hpux_acl_sort(HPUX_ACL_T acl, int count); static int hpux_internal_aclsort(int acl_count, int calclass, HPUX_ACL_T aclp); static void hpux_count_obj(int acl_count, HPUX_ACL_T aclp, struct hpux_acl_types *acl_type_count); static void hpux_swap_acl_entries(HPUX_ACE_T *aclp0, HPUX_ACE_T *aclp1); -static BOOL hpux_prohibited_duplicate_type(int acl_type); +static bool hpux_prohibited_duplicate_type(int acl_type); -static BOOL hpux_acl_call_present(void); -static BOOL hpux_aclsort_call_present(void); +static bool hpux_acl_call_present(void); +static bool hpux_aclsort_call_present(void); /* public functions - the api */ @@ -404,11 +404,11 @@ static HPUX_ACL_T hpux_acl_init(int count) * Convert the SMB acl to the ACCESS or DEFAULT part of a * hpux ACL, as desired. */ -static BOOL smb_acl_to_hpux_acl(SMB_ACL_T smb_acl, +static bool smb_acl_to_hpux_acl(SMB_ACL_T smb_acl, HPUX_ACL_T *hpux_acl, int *count, SMB_ACL_TYPE_T type) { - BOOL ret = False; + bool ret = False; int i; int check_which, check_rc; @@ -640,10 +640,10 @@ static HPUX_PERM_T smb_perm_to_hpux_perm(const SMB_ACL_PERM_T perm) } -static BOOL hpux_acl_get_file(const char *name, HPUX_ACL_T *hpux_acl, +static bool hpux_acl_get_file(const char *name, HPUX_ACL_T *hpux_acl, int *count) { - BOOL result = False; + bool result = False; static HPUX_ACE_T dummy_ace; DEBUG(10, ("hpux_acl_get_file called for file '%s'\n", name)); @@ -703,7 +703,7 @@ static BOOL hpux_acl_get_file(const char *name, HPUX_ACL_T *hpux_acl, * time. If it should become necessary to add all of an ACL, one * would have to replace this parameter by another type. */ -static BOOL hpux_add_to_acl(HPUX_ACL_T *hpux_acl, int *count, +static bool hpux_add_to_acl(HPUX_ACL_T *hpux_acl, int *count, HPUX_ACL_T add_acl, int add_count, SMB_ACL_TYPE_T type) { @@ -749,7 +749,7 @@ static BOOL hpux_add_to_acl(HPUX_ACL_T *hpux_acl, int *count, * happen aclsort() will fail and return an error and someone will * have to fix it...) */ -static BOOL hpux_acl_sort(HPUX_ACL_T hpux_acl, int count) +static bool hpux_acl_sort(HPUX_ACL_T hpux_acl, int count) { int fixmask = (count <= 4); @@ -871,7 +871,7 @@ static void hpux_swap_acl_entries(HPUX_ACE_T *aclp0, HPUX_ACE_T *aclp1) * False - If the ACL type doesn't match any of the prohibited types. */ -static BOOL hpux_prohibited_duplicate_type(int acl_type) +static bool hpux_prohibited_duplicate_type(int acl_type) { switch(acl_type) { case USER: @@ -1054,13 +1054,13 @@ or DEF_USER_OBJ or DEF_GROUP_OBJ or DEF_OTHER_OBJ\n")); * calls if it isn't there. */ -static BOOL hpux_acl_call_present(void) +static bool hpux_acl_call_present(void) { shl_t handle = NULL; void *value; int ret_val=0; - static BOOL already_checked = False; + static bool already_checked = False; if(already_checked) return True; @@ -1089,12 +1089,12 @@ static BOOL hpux_acl_call_present(void) * a dispatcher function could be handy... */ -static BOOL hpux_aclsort_call_present(void) +static bool hpux_aclsort_call_present(void) { shl_t handle = NULL; void *value; int ret_val = 0; - static BOOL already_checked = False; + static bool already_checked = False; if (already_checked) { return True; @@ -1122,7 +1122,7 @@ static BOOL hpux_aclsort_call_present(void) * concrete error messages for debugging... * (acl sort just says that the acl is invalid...) */ -static BOOL hpux_acl_check(HPUX_ACL_T hpux_acl, int count) +static bool hpux_acl_check(HPUX_ACL_T hpux_acl, int count) { int check_rc; int check_which; diff --git a/source3/modules/vfs_netatalk.c b/source3/modules/vfs_netatalk.c index e0dbf9dcef6..2cc4a6c4ba9 100644 --- a/source3/modules/vfs_netatalk.c +++ b/source3/modules/vfs_netatalk.c @@ -194,7 +194,7 @@ static SMB_STRUCT_DIR *atalk_opendir(struct vfs_handle_struct *handle, const cha static int atalk_rmdir(struct vfs_handle_struct *handle, const char *path) { - BOOL add = False; + bool add = False; TALLOC_CTX *ctx = 0; char *dpath; diff --git a/source3/modules/vfs_notify_fam.c b/source3/modules/vfs_notify_fam.c index 0636a747a90..30cb0aa17c5 100644 --- a/source3/modules/vfs_notify_fam.c +++ b/source3/modules/vfs_notify_fam.c @@ -62,7 +62,7 @@ struct fam_watch_context { * We want one FAM connection per smbd, not one per tcon. */ static FAMConnection fam_connection; -static BOOL fam_connection_initialized = False; +static bool fam_connection_initialized = False; static struct fam_watch_context *fam_notify_list; static void fam_handler(struct event_context *event_ctx, diff --git a/source3/modules/vfs_posixacl.c b/source3/modules/vfs_posixacl.c index 8446b1be3a5..fb0c0bc8e90 100644 --- a/source3/modules/vfs_posixacl.c +++ b/source3/modules/vfs_posixacl.c @@ -22,7 +22,7 @@ /* prototypes for static functions first - for clarity */ -static BOOL smb_ace_to_internal(acl_entry_t posix_ace, +static bool smb_ace_to_internal(acl_entry_t posix_ace, struct smb_acl_entry *ace); static struct smb_acl_t *smb_acl_to_internal(acl_t acl); static int smb_acl_set_mode(acl_entry_t entry, SMB_ACL_PERM_T perm); @@ -135,7 +135,7 @@ int posixacl_sys_acl_delete_def_file(vfs_handle_struct *handle, /* private functions */ -static BOOL smb_ace_to_internal(acl_entry_t posix_ace, +static bool smb_ace_to_internal(acl_entry_t posix_ace, struct smb_acl_entry *ace) { acl_tag_t tag; diff --git a/source3/modules/vfs_readahead.c b/source3/modules/vfs_readahead.c index 5dab8cb9161..5b663a7b260 100644 --- a/source3/modules/vfs_readahead.c +++ b/source3/modules/vfs_readahead.c @@ -18,13 +18,13 @@ #include "includes.h" #if !defined(HAVE_LINUX_READAHEAD) && !defined(HAVE_POSIX_FADVISE) -static BOOL didmsg; +static bool didmsg; #endif struct readahead_data { SMB_OFF_T off_bound; SMB_OFF_T len; - BOOL didmsg; + bool didmsg; }; /* diff --git a/source3/modules/vfs_recycle.c b/source3/modules/vfs_recycle.c index 74fb48e89a6..fef65efa779 100644 --- a/source3/modules/vfs_recycle.c +++ b/source3/modules/vfs_recycle.c @@ -75,9 +75,9 @@ static const char *recycle_repository(vfs_handle_struct *handle) return tmp_str; } -static BOOL recycle_keep_dir_tree(vfs_handle_struct *handle) +static bool recycle_keep_dir_tree(vfs_handle_struct *handle) { - BOOL ret; + bool ret; ret = lp_parm_bool(SNUM(handle->conn), "recycle", "keeptree", False); @@ -86,9 +86,9 @@ static BOOL recycle_keep_dir_tree(vfs_handle_struct *handle) return ret; } -static BOOL recycle_versions(vfs_handle_struct *handle) +static bool recycle_versions(vfs_handle_struct *handle) { - BOOL ret; + bool ret; ret = lp_parm_bool(SNUM(handle->conn), "recycle", "versions", False); @@ -97,9 +97,9 @@ static BOOL recycle_versions(vfs_handle_struct *handle) return ret; } -static BOOL recycle_touch(vfs_handle_struct *handle) +static bool recycle_touch(vfs_handle_struct *handle) { - BOOL ret; + bool ret; ret = lp_parm_bool(SNUM(handle->conn), "recycle", "touch", False); @@ -108,9 +108,9 @@ static BOOL recycle_touch(vfs_handle_struct *handle) return ret; } -static BOOL recycle_touch_mtime(vfs_handle_struct *handle) +static bool recycle_touch_mtime(vfs_handle_struct *handle) { - BOOL ret; + bool ret; ret = lp_parm_bool(SNUM(handle->conn), "recycle", "touch_mtime", False); @@ -210,7 +210,7 @@ static mode_t recycle_subdir_mode(vfs_handle_struct *handle) return (mode_t)dirmode; } -static BOOL recycle_directory_exist(vfs_handle_struct *handle, const char *dname) +static bool recycle_directory_exist(vfs_handle_struct *handle, const char *dname) { SMB_STRUCT_STAT st; @@ -223,7 +223,7 @@ static BOOL recycle_directory_exist(vfs_handle_struct *handle, const char *dname return False; } -static BOOL recycle_file_exist(vfs_handle_struct *handle, const char *fname) +static bool recycle_file_exist(vfs_handle_struct *handle, const char *fname) { SMB_STRUCT_STAT st; @@ -260,7 +260,7 @@ static SMB_OFF_T recycle_get_file_size(vfs_handle_struct *handle, const char *fn * @param dname Directory tree to be created * @return Returns True for success **/ -static BOOL recycle_create_dir(vfs_handle_struct *handle, const char *dname) +static bool recycle_create_dir(vfs_handle_struct *handle, const char *dname) { size_t len; mode_t mode; @@ -268,7 +268,7 @@ static BOOL recycle_create_dir(vfs_handle_struct *handle, const char *dname) char *tmp_str = NULL; char *token; char *tok_str; - BOOL ret = False; + bool ret = False; mode = recycle_directory_mode(handle); @@ -314,7 +314,7 @@ done: * Return True if found **/ -static BOOL matchdirparam(const char **dir_exclude_list, char *path) +static bool matchdirparam(const char **dir_exclude_list, char *path) { char *startp = NULL, *endp = NULL; @@ -364,7 +364,7 @@ static BOOL matchdirparam(const char **dir_exclude_list, char *path) * @param needle string to be matched exectly to haystack including pattern matching * @return True if found **/ -static BOOL matchparam(const char **haystack_list, const char *needle) +static bool matchparam(const char **haystack_list, const char *needle) { int i; @@ -386,7 +386,7 @@ static BOOL matchparam(const char **haystack_list, const char *needle) * Touch access or modify date **/ static void recycle_do_touch(vfs_handle_struct *handle, const char *fname, - BOOL touch_mtime) + bool touch_mtime) { SMB_STRUCT_STAT st; struct timespec ts[2]; @@ -426,7 +426,7 @@ static int recycle_unlink(vfs_handle_struct *handle, const char *file_name) int i = 1; SMB_OFF_T maxsize, minsize; SMB_OFF_T file_size; /* space_avail; */ - BOOL exist; + bool exist; int rc = -1; repository = talloc_sub_advanced(NULL, lp_servicename(SNUM(conn)), diff --git a/source3/modules/vfs_shadow_copy.c b/source3/modules/vfs_shadow_copy.c index f2a838af145..fbd2960abae 100644 --- a/source3/modules/vfs_shadow_copy.c +++ b/source3/modules/vfs_shadow_copy.c @@ -61,7 +61,7 @@ typedef struct { SMB_STRUCT_DIRENT *dirs; } shadow_copy_Dir; -static BOOL shadow_copy_match_name(const char *name) +static bool shadow_copy_match_name(const char *name) { if (strncmp(SHADOW_COPY_PREFIX,name, sizeof(SHADOW_COPY_PREFIX)-1)==0 && (strlen(SHADOW_COPY_SAMPLE) == strlen(name))) { @@ -160,7 +160,7 @@ static int shadow_copy_closedir(vfs_handle_struct *handle, SMB_STRUCT_DIR *_dirp return 0; } -static int shadow_copy_get_shadow_copy_data(vfs_handle_struct *handle, files_struct *fsp, SHADOW_COPY_DATA *shadow_copy_data, BOOL labels) +static int shadow_copy_get_shadow_copy_data(vfs_handle_struct *handle, files_struct *fsp, SHADOW_COPY_DATA *shadow_copy_data, bool labels) { SMB_STRUCT_DIR *p = SMB_VFS_NEXT_OPENDIR(handle,fsp->conn->connectpath,NULL,0); diff --git a/source3/modules/vfs_solarisacl.c b/source3/modules/vfs_solarisacl.c index e6cdef42c12..b29c218ff42 100644 --- a/source3/modules/vfs_solarisacl.c +++ b/source3/modules/vfs_solarisacl.c @@ -39,22 +39,22 @@ typedef o_mode_t SOLARIS_PERM_T; /* prototypes for private functions */ static SOLARIS_ACL_T solaris_acl_init(int count); -static BOOL smb_acl_to_solaris_acl(SMB_ACL_T smb_acl, +static bool smb_acl_to_solaris_acl(SMB_ACL_T smb_acl, SOLARIS_ACL_T *solariacl, int *count, SMB_ACL_TYPE_T type); static SMB_ACL_T solaris_acl_to_smb_acl(SOLARIS_ACL_T solarisacl, int count, SMB_ACL_TYPE_T type); static SOLARIS_ACL_TAG_T smb_tag_to_solaris_tag(SMB_ACL_TAG_T smb_tag); static SMB_ACL_TAG_T solaris_tag_to_smb_tag(SOLARIS_ACL_TAG_T solaris_tag); -static BOOL solaris_add_to_acl(SOLARIS_ACL_T *solaris_acl, int *count, +static bool solaris_add_to_acl(SOLARIS_ACL_T *solaris_acl, int *count, SOLARIS_ACL_T add_acl, int add_count, SMB_ACL_TYPE_T type); -static BOOL solaris_acl_get_file(const char *name, SOLARIS_ACL_T *solarisacl, +static bool solaris_acl_get_file(const char *name, SOLARIS_ACL_T *solarisacl, int *count); -static BOOL solaris_acl_get_fd(int fd, SOLARIS_ACL_T *solarisacl, int *count); -static BOOL solaris_acl_sort(SOLARIS_ACL_T acl, int count); +static bool solaris_acl_get_fd(int fd, SOLARIS_ACL_T *solarisacl, int *count); +static bool solaris_acl_sort(SOLARIS_ACL_T acl, int count); static SMB_ACL_PERM_T solaris_perm_to_smb_perm(const SOLARIS_PERM_T perm); static SOLARIS_PERM_T smb_perm_to_solaris_perm(const SMB_ACL_PERM_T perm); -static BOOL solaris_acl_check(SOLARIS_ACL_T solaris_acl, int count); +static bool solaris_acl_check(SOLARIS_ACL_T solaris_acl, int count); /* public functions - the api */ @@ -342,11 +342,11 @@ static SOLARIS_ACL_T solaris_acl_init(int count) * Convert the SMB acl to the ACCESS or DEFAULT part of a * solaris ACL, as desired. */ -static BOOL smb_acl_to_solaris_acl(SMB_ACL_T smb_acl, +static bool smb_acl_to_solaris_acl(SMB_ACL_T smb_acl, SOLARIS_ACL_T *solaris_acl, int *count, SMB_ACL_TYPE_T type) { - BOOL ret = False; + bool ret = False; int i; int check_which, check_rc; @@ -573,10 +573,10 @@ static SOLARIS_PERM_T smb_perm_to_solaris_perm(const SMB_ACL_PERM_T perm) } -static BOOL solaris_acl_get_file(const char *name, SOLARIS_ACL_T *solaris_acl, +static bool solaris_acl_get_file(const char *name, SOLARIS_ACL_T *solaris_acl, int *count) { - BOOL result = False; + bool result = False; DEBUG(10, ("solaris_acl_get_file called for file '%s'\n", name)); @@ -610,9 +610,9 @@ static BOOL solaris_acl_get_file(const char *name, SOLARIS_ACL_T *solaris_acl, } -static BOOL solaris_acl_get_fd(int fd, SOLARIS_ACL_T *solaris_acl, int *count) +static bool solaris_acl_get_fd(int fd, SOLARIS_ACL_T *solaris_acl, int *count) { - BOOL ret = False; + bool ret = False; DEBUG(10, ("entering solaris_acl_get_fd\n")); @@ -661,7 +661,7 @@ static BOOL solaris_acl_get_fd(int fd, SOLARIS_ACL_T *solaris_acl, int *count) * should become necessary to add all of an ACL, one would have * to replace this parameter by another type. */ -static BOOL solaris_add_to_acl(SOLARIS_ACL_T *solaris_acl, int *count, +static bool solaris_add_to_acl(SOLARIS_ACL_T *solaris_acl, int *count, SOLARIS_ACL_T add_acl, int add_count, SMB_ACL_TYPE_T type) { @@ -707,7 +707,7 @@ static BOOL solaris_add_to_acl(SOLARIS_ACL_T *solaris_acl, int *count, * happen aclsort() will fail and return an error and someone will * have to fix it...) */ -static BOOL solaris_acl_sort(SOLARIS_ACL_T solaris_acl, int count) +static bool solaris_acl_sort(SOLARIS_ACL_T solaris_acl, int count) { int fixmask = (count <= 4); @@ -724,7 +724,7 @@ static BOOL solaris_acl_sort(SOLARIS_ACL_T solaris_acl, int count) * concrete error messages for debugging... * (acl sort just says that the acl is invalid...) */ -static BOOL solaris_acl_check(SOLARIS_ACL_T solaris_acl, int count) +static bool solaris_acl_check(SOLARIS_ACL_T solaris_acl, int count) { int check_rc; int check_which; diff --git a/source3/modules/vfs_tru64acl.c b/source3/modules/vfs_tru64acl.c index 60c08fdd574..43cae0f8266 100644 --- a/source3/modules/vfs_tru64acl.c +++ b/source3/modules/vfs_tru64acl.c @@ -22,7 +22,7 @@ /* prototypes for private functions first - for clarity */ static struct smb_acl_t *tru64_acl_to_smb_acl(const struct acl *tru64_acl); -static BOOL tru64_ace_to_smb_ace(acl_entry_t tru64_ace, +static bool tru64_ace_to_smb_ace(acl_entry_t tru64_ace, struct smb_acl_entry *smb_ace); static acl_t smb_acl_to_tru64_acl(const SMB_ACL_T smb_acl); static acl_tag_t smb_tag_to_tru64(SMB_ACL_TAG_T smb_tag); @@ -194,7 +194,7 @@ fail: return NULL; } -static BOOL tru64_ace_to_smb_ace(acl_entry_t tru64_ace, +static bool tru64_ace_to_smb_ace(acl_entry_t tru64_ace, struct smb_acl_entry *smb_ace) { acl_tag_t tru64_tag; diff --git a/source3/modules/vfs_zfsacl.c b/source3/modules/vfs_zfsacl.c index fd057fa0893..a8170220328 100644 --- a/source3/modules/vfs_zfsacl.c +++ b/source3/modules/vfs_zfsacl.c @@ -94,7 +94,7 @@ static size_t zfs_get_nt_acl(struct files_struct *fsp, uint32 security_info, } /* call-back function processing the NT acl -> ZFS acl using NFSv4 conv. */ -static BOOL zfs_process_smbacl(files_struct *fsp, SMB4ACL_T *smbacl) +static bool zfs_process_smbacl(files_struct *fsp, SMB4ACL_T *smbacl) { int naces = smb_get_naces(smbacl), i; ace_t *acebuf; |