summaryrefslogtreecommitdiff
path: root/source3/include
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2007-10-18 17:40:25 -0700
committerJeremy Allison <jra@samba.org>2007-10-18 17:40:25 -0700
commit30191d1a5704ad2b158386b511558972d539ce47 (patch)
tree4f46e5c4f28f672ab661aa18f45745860970a88c /source3/include
parent789856f63ff73fec66298e95c91c60db7bdaf14e (diff)
downloadsamba-30191d1a5704ad2b158386b511558972d539ce47.tar.gz
samba-30191d1a5704ad2b158386b511558972d539ce47.tar.bz2
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/include')
-rw-r--r--source3/include/ads_protos.h12
-rw-r--r--source3/include/adt_tree.h8
-rw-r--r--source3/include/asn_1.h2
-rw-r--r--source3/include/auth.h10
-rw-r--r--source3/include/client.h20
-rw-r--r--source3/include/ctdbd_conn.h2
-rw-r--r--source3/include/debug.h6
-rw-r--r--source3/include/idmap.h6
-rw-r--r--source3/include/includes.h15
-rw-r--r--source3/include/libmsrpc.h22
-rw-r--r--source3/include/libmsrpc_internal.h6
-rw-r--r--source3/include/libsmb_internal.h14
-rw-r--r--source3/include/locking.h4
-rw-r--r--source3/include/mangle.h12
-rw-r--r--source3/include/messages.h2
-rw-r--r--source3/include/msdfs.h2
-rw-r--r--source3/include/nameserv.h30
-rw-r--r--source3/include/nt_printing.h12
-rw-r--r--source3/include/nt_status.h2
-rw-r--r--source3/include/ntdomain.h30
-rw-r--r--source3/include/ntlmssp.h6
-rw-r--r--source3/include/ntquotas.h2
-rw-r--r--source3/include/packet.h4
-rw-r--r--source3/include/passdb.h34
-rw-r--r--source3/include/popt_common.h4
-rw-r--r--source3/include/printing.h4
-rw-r--r--source3/include/privileges.h7
-rw-r--r--[-rwxr-xr-x]source3/include/rap.h0
-rw-r--r--source3/include/reg_objects.h6
-rw-r--r--source3/include/regfio.h2
-rw-r--r--source3/include/rpc_misc.h2
-rw-r--r--[-rwxr-xr-x]source3/include/rpc_spoolss.h0
-rw-r--r--source3/include/smb.h96
-rw-r--r--source3/include/smb_ldap.h8
-rw-r--r--source3/include/smbldap.h8
-rw-r--r--source3/include/smbprofile.h4
-rw-r--r--source3/include/util_tdb.h21
-rw-r--r--source3/include/vfs.h9
38 files changed, 207 insertions, 227 deletions
diff --git a/source3/include/ads_protos.h b/source3/include/ads_protos.h
index 093b45d7c7..0292d91f4f 100644
--- a/source3/include/ads_protos.h
+++ b/source3/include/ads_protos.h
@@ -17,15 +17,15 @@ char **ads_pull_strings_range(ADS_STRUCT *ads,
char **current_strings,
const char **next_attribute,
size_t *num_strings,
- BOOL *more_strings);
-BOOL ads_pull_uint32(ADS_STRUCT *ads, LDAPMessage *msg, const char *field,
+ bool *more_strings);
+bool ads_pull_uint32(ADS_STRUCT *ads, LDAPMessage *msg, const char *field,
uint32 *v);
-BOOL ads_pull_guid(ADS_STRUCT *ads, LDAPMessage *msg, struct GUID *guid);
-BOOL ads_pull_sid(ADS_STRUCT *ads, LDAPMessage *msg, const char *field,
+bool ads_pull_guid(ADS_STRUCT *ads, LDAPMessage *msg, struct GUID *guid);
+bool ads_pull_sid(ADS_STRUCT *ads, LDAPMessage *msg, const char *field,
DOM_SID *sid);
int ads_pull_sids(ADS_STRUCT *ads, TALLOC_CTX *mem_ctx,
LDAPMessage *msg, const char *field, DOM_SID **sids);
-BOOL ads_pull_sd(ADS_STRUCT *ads, TALLOC_CTX *mem_ctx,
+bool ads_pull_sd(ADS_STRUCT *ads, TALLOC_CTX *mem_ctx,
LDAPMessage *msg, const char *field, SEC_DESC **sd);
char *ads_pull_username(ADS_STRUCT *ads, TALLOC_CTX *mem_ctx,
LDAPMessage *msg);
@@ -90,7 +90,7 @@ ADS_STATUS ads_search_retry_sid(ADS_STRUCT *ads, LDAPMessage **res,
LDAPMessage *ads_first_entry(ADS_STRUCT *ads, LDAPMessage *res);
LDAPMessage *ads_next_entry(ADS_STRUCT *ads, LDAPMessage *res);
void ads_process_results(ADS_STRUCT *ads, LDAPMessage *res,
- BOOL(*fn)(ADS_STRUCT *,char *, void **, void *),
+ bool (*fn)(ADS_STRUCT *,char *, void **, void *),
void *data_area);
void ads_dump(ADS_STRUCT *ads, LDAPMessage *res);
diff --git a/source3/include/adt_tree.h b/source3/include/adt_tree.h
index b647412e5d..3e2f10001e 100644
--- a/source3/include/adt_tree.h
+++ b/source3/include/adt_tree.h
@@ -20,12 +20,6 @@
#ifndef ADT_TREE_H
#define ADT_TREE_H
-#ifndef _UPPER_BOOL
-typedef int BOOL;
-#define _UPPER_BOOL
-#endif
-
-
/* data structure used to build the tree */
typedef struct _tree_node {
@@ -53,7 +47,7 @@ SORTED_TREE* pathtree_init( void *data_p, int (cmp_fn)(void*, void*) );
/* add a new path component */
-BOOL pathtree_add( SORTED_TREE *tree, const char *path, void *data_p );
+bool pathtree_add( SORTED_TREE *tree, const char *path, void *data_p );
/* search path */
diff --git a/source3/include/asn_1.h b/source3/include/asn_1.h
index 152662ccbf..dd345cd601 100644
--- a/source3/include/asn_1.h
+++ b/source3/include/asn_1.h
@@ -31,7 +31,7 @@ typedef struct asn1_data {
size_t length;
off_t ofs;
struct nesting *nesting;
- BOOL has_error;
+ bool has_error;
} ASN1_DATA;
diff --git a/source3/include/auth.h b/source3/include/auth.h
index a58d150c51..a7531b35cd 100644
--- a/source3/include/auth.h
+++ b/source3/include/auth.h
@@ -26,9 +26,9 @@ typedef struct auth_usersupplied_info {
DATA_BLOB nt_interactive_pwd;
DATA_BLOB plaintext_password;
- BOOL encrypted;
+ bool encrypted;
- BOOL was_mapped; /* Did the username map actually match? */
+ bool was_mapped; /* Did the username map actually match? */
char *client_domain; /* domain name string */
char *domain; /* domain name after mapping */
char *internal_username; /* username after mapping */
@@ -41,7 +41,7 @@ typedef struct auth_usersupplied_info {
} auth_usersupplied_info;
typedef struct auth_serversupplied_info {
- BOOL guest;
+ bool guest;
DOM_SID *sids; /* These SIDs are preliminary between
check_ntlm_password and the token creation. */
@@ -67,7 +67,7 @@ typedef struct auth_serversupplied_info {
void *pam_handle;
- BOOL was_mapped; /* Did the username map match? */
+ bool was_mapped; /* Did the username map match? */
char *unix_name;
} auth_serversupplied_info;
@@ -78,7 +78,7 @@ struct auth_context {
/* Who set this up in the first place? */
const char *challenge_set_by;
- BOOL challenge_may_be_modified;
+ bool challenge_may_be_modified;
struct auth_methods *challenge_set_method;
/* What order are the various methods in? Try to stop it changing under us */
diff --git a/source3/include/client.h b/source3/include/client.h
index 5165b85df1..597348d162 100644
--- a/source3/include/client.h
+++ b/source3/include/client.h
@@ -128,10 +128,10 @@ struct cli_state {
unsigned int bufsize;
int initialised;
int win95;
- BOOL is_samba;
+ bool is_samba;
uint32 capabilities;
uint32 posix_capabilities;
- BOOL dfsroot;
+ bool dfsroot;
TALLOC_CTX *mem_ctx;
@@ -144,18 +144,18 @@ struct cli_state {
/* The list of pipes currently open on this connection. */
struct rpc_pipe_client *pipe_list;
- BOOL use_kerberos;
- BOOL fallback_after_kerberos;
- BOOL use_spnego;
+ bool use_kerberos;
+ bool fallback_after_kerberos;
+ bool use_spnego;
- BOOL use_oplocks; /* should we use oplocks? */
- BOOL use_level_II_oplocks; /* should we use level II oplocks? */
+ bool use_oplocks; /* should we use oplocks? */
+ bool use_level_II_oplocks; /* should we use level II oplocks? */
/* a oplock break request handler */
- BOOL (*oplock_handler)(struct cli_state *cli, int fnum, unsigned char level);
+ bool (*oplock_handler)(struct cli_state *cli, int fnum, unsigned char level);
- BOOL force_dos_errors;
- BOOL case_sensitive; /* False by default. */
+ bool force_dos_errors;
+ bool case_sensitive; /* False by default. */
};
typedef struct file_info {
diff --git a/source3/include/ctdbd_conn.h b/source3/include/ctdbd_conn.h
index eecc100ee6..425cc65a00 100644
--- a/source3/include/ctdbd_conn.h
+++ b/source3/include/ctdbd_conn.h
@@ -33,7 +33,7 @@ NTSTATUS ctdbd_messaging_send(struct ctdbd_connection *conn,
uint32 dst_vnn, uint64 dst_srvid,
struct messaging_rec *msg);
-BOOL ctdbd_process_exists(struct ctdbd_connection *conn, uint32 vnn,
+bool ctdbd_process_exists(struct ctdbd_connection *conn, uint32 vnn,
pid_t pid);
char *ctdbd_dbpath(struct ctdbd_connection *conn,
diff --git a/source3/include/debug.h b/source3/include/debug.h
index eb7dc76c1c..51850925e8 100644
--- a/source3/include/debug.h
+++ b/source3/include/debug.h
@@ -39,8 +39,8 @@
/* PRINTFLIKE1 */
int Debug1( const char *, ... ) PRINTF_ATTRIBUTE(1,2);
/* PRINTFLIKE1 */
-BOOL dbgtext( const char *, ... ) PRINTF_ATTRIBUTE(1,2);
-BOOL dbghdr( int level, int cls, const char *file, const char *func, int line );
+bool dbgtext( const char *, ... ) PRINTF_ATTRIBUTE(1,2);
+bool dbghdr( int level, int cls, const char *file, const char *func, int line );
#if defined(sgi) && (_COMPILER_VERSION >= 730)
#pragma mips_frequency_hint NEVER Debug1
@@ -110,7 +110,7 @@ extern int DEBUGLEVEL;
#endif
extern int *DEBUGLEVEL_CLASS;
-extern BOOL *DEBUGLEVEL_CLASS_ISSET;
+extern bool *DEBUGLEVEL_CLASS_ISSET;
/* Debugging macros
*
diff --git a/source3/include/idmap.h b/source3/include/idmap.h
index bc5e2eeb01..e059ab2337 100644
--- a/source3/include/idmap.h
+++ b/source3/include/idmap.h
@@ -36,11 +36,11 @@
struct idmap_domain {
const char *name;
- BOOL default_domain;
- BOOL readonly;
+ bool default_domain;
+ bool readonly;
void *private_data;
struct idmap_methods *methods;
- BOOL initialized;
+ bool initialized;
const char *params;
};
diff --git a/source3/include/includes.h b/source3/include/includes.h
index a57891b763..0d51c3d049 100644
--- a/source3/include/includes.h
+++ b/source3/include/includes.h
@@ -608,11 +608,6 @@ struct timespec {
#define MAX(a,b) ((a)>(b)?(a):(b))
#endif
-#ifndef _UPPER_BOOL
-typedef int BOOL;
-#define _UPPER_BOOL
-#endif
-
#ifdef HAVE_BROKEN_GETGROUPS
#define GID_T int
#else
@@ -1131,18 +1126,18 @@ void krb5_free_unparsed_name(krb5_context ctx, char *val);
void setup_kaddr( krb5_address *pkaddr, struct sockaddr *paddr);
int create_kerberos_key_from_string(krb5_context context, krb5_principal host_princ, krb5_data *password, krb5_keyblock *key, krb5_enctype enctype);
int create_kerberos_key_from_string_direct(krb5_context context, krb5_principal host_princ, krb5_data *password, krb5_keyblock *key, krb5_enctype enctype);
-BOOL get_auth_data_from_tkt(TALLOC_CTX *mem_ctx, DATA_BLOB *auth_data, krb5_ticket *tkt);
+bool get_auth_data_from_tkt(TALLOC_CTX *mem_ctx, DATA_BLOB *auth_data, krb5_ticket *tkt);
krb5_const_principal get_principal_from_tkt(krb5_ticket *tkt);
krb5_error_code smb_krb5_locate_kdc(krb5_context ctx, const krb5_data *realm, struct sockaddr **addr_pp, int *naddrs, int get_masters);
#if defined(HAVE_KRB5_LOCATE_KDC)
krb5_error_code krb5_locate_kdc(krb5_context ctx, const krb5_data *realm, struct sockaddr **addr_pp, int *naddrs, int get_masters);
#endif
krb5_error_code get_kerberos_allowed_etypes(krb5_context context, krb5_enctype **enctypes);
-BOOL get_krb5_smb_session_key(krb5_context context, krb5_auth_context auth_context, DATA_BLOB *session_key, BOOL remote);
+bool get_krb5_smb_session_key(krb5_context context, krb5_auth_context auth_context, DATA_BLOB *session_key, bool remote);
krb5_error_code smb_krb5_kt_free_entry(krb5_context context, krb5_keytab_entry *kt_entry);
krb5_principal kerberos_fetch_salt_princ_for_host_princ(krb5_context context, krb5_principal host_princ, int enctype);
void kerberos_set_creds_enctype(krb5_creds *pcreds, int enctype);
-BOOL kerberos_compatible_enctypes(krb5_context context, krb5_enctype enctype1, krb5_enctype enctype2);
+bool kerberos_compatible_enctypes(krb5_context context, krb5_enctype enctype1, krb5_enctype enctype2);
void kerberos_free_data_contents(krb5_context context, krb5_data *pdata);
NTSTATUS decode_pac_data(TALLOC_CTX *mem_ctx,
DATA_BLOB *pac_data_blob,
@@ -1177,7 +1172,7 @@ krb5_error_code krb5_rd_req_return_keyblock_from_keytab(krb5_context context,
krb5_error_code smb_krb5_parse_name_norealm(krb5_context context,
const char *name,
krb5_principal *principal);
-BOOL smb_krb5_principal_compare_any_realm(krb5_context context,
+bool smb_krb5_principal_compare_any_realm(krb5_context context,
krb5_const_principal princ1,
krb5_const_principal princ2);
int cli_krb5_get_ticket(const char *principal, time_t time_offset,
@@ -1207,7 +1202,7 @@ krb5_error_code smb_krb5_enctype_to_string(krb5_context context,
char **etype_s);
krb5_error_code smb_krb5_open_keytab(krb5_context context,
const char *keytab_name,
- BOOL write_access,
+ bool write_access,
krb5_keytab *keytab);
#endif /* HAVE_KRB5 */
diff --git a/source3/include/libmsrpc.h b/source3/include/libmsrpc.h
index 9bbe371677..3f2a7260ca 100644
--- a/source3/include/libmsrpc.h
+++ b/source3/include/libmsrpc.h
@@ -184,7 +184,7 @@ typedef struct _CACLOOKUPRIDSRECORD {
uint32 type;
/*if the name or RID was looked up, then found = True*/
- BOOL found;
+ bool found;
} CacLookupRidsRecord;
typedef struct _CACUSERINFO {
@@ -228,7 +228,7 @@ typedef struct _CACUSERINFO {
uint16 logon_count;
/**Change password at next logon?*/
- BOOL pass_must_change;
+ bool pass_must_change;
/**Username*/
char *username;
@@ -464,7 +464,7 @@ void cac_Init(int debug);
* @return - un-initialized server handle
* - NULL if no memory could be allocated
*/
-CacServerHandle * cac_NewServerHandle(BOOL allocate_fields);
+CacServerHandle * cac_NewServerHandle(bool allocate_fields);
/**
* Specifies the smbc_get_auth_data_fn to use if you do not want to use the default.
@@ -553,7 +553,7 @@ struct LsaOpenPolicy {
uint32 access;
/**Use security quality of service? (True/False)*/
- BOOL security_qos;
+ bool security_qos;
} in;
/**Outputs*/
@@ -1238,7 +1238,7 @@ struct RegDeleteKey {
char *name;
/**delete recursively. WARNING: this might not always work as planned*/
- BOOL recursive;
+ bool recursive;
} in;
};
@@ -1576,10 +1576,10 @@ struct Shutdown {
uint32 timeout;
/**False = shutdown, True = reboot*/
- BOOL reboot;
+ bool reboot;
/**force the*/
- BOOL force;
+ bool force;
/*FIXME: make this useful*/
uint32 reason;
@@ -1776,7 +1776,7 @@ struct SamEnumUsers {
/**Array storing the names of all the users returned*/
char **names;
- BOOL done;
+ bool done;
} out;
};
@@ -2068,7 +2068,7 @@ struct SamEnumGroups {
/**Array storing the descriptions of all the groups returned*/
char **descriptions;
- BOOL done;
+ bool done;
} out;
};
@@ -2104,7 +2104,7 @@ struct SamEnumAliases {
/**Array storing the descriptions of all the groups returned*/
char **descriptions;
- BOOL done;
+ bool done;
} out;
};
@@ -2634,7 +2634,7 @@ struct SamGetDisplayInfo {
/**Internal value. Do not modify.*/
uint32 loop_count;
- BOOL done;
+ bool done;
} out;
};
diff --git a/source3/include/libmsrpc_internal.h b/source3/include/libmsrpc_internal.h
index f051272eef..623c43f9c3 100644
--- a/source3/include/libmsrpc_internal.h
+++ b/source3/include/libmsrpc_internal.h
@@ -29,19 +29,19 @@ struct CacServerHandleInternal {
uint16 srv_level;
/*stores the initialized/active pipes*/
- BOOL pipes[PI_MAX_PIPES];
+ bool pipes[PI_MAX_PIPES];
/*underlying smbc context*/
SMBCCTX *ctx;
/*did the user supply this SMBCCTX?*/
- BOOL user_supplied_ctx;
+ bool user_supplied_ctx;
};
/*used to get a struct rpc_pipe_client* to be passed into rpccli* calls*/
/*nessecary prototypes*/
-BOOL rid_in_list(uint32 rid, uint32 *list, uint32 list_len);
+bool rid_in_list(uint32 rid, uint32 *list, uint32 list_len);
int cac_ParseRegPath(char *path, uint32 *reg_type, char **key_name);
diff --git a/source3/include/libsmb_internal.h b/source3/include/libsmb_internal.h
index 41f72d5fb3..19a3edc9bf 100644
--- a/source3/include/libsmb_internal.h
+++ b/source3/include/libsmb_internal.h
@@ -12,9 +12,9 @@
struct _SMBCSRV {
struct cli_state *cli;
dev_t dev;
- BOOL no_pathinfo;
- BOOL no_pathinfo2;
- BOOL no_nt_session;
+ bool no_pathinfo;
+ bool no_pathinfo2;
+ bool no_nt_session;
SMBCSRV *next, *prev;
@@ -37,7 +37,7 @@ struct _SMBCFILE {
char *fname;
SMB_OFF_T offset;
struct _SMBCSRV *srv;
- BOOL file;
+ bool file;
struct smbc_dir_list *dir_list, *dir_end, *dir_next;
int dir_type, dir_error;
@@ -50,7 +50,7 @@ struct smbc_internal_data {
/*
* Is this handle initialized ?
*/
- BOOL _initialized;
+ bool _initialized;
/* dirent pointer location
*
@@ -78,7 +78,7 @@ struct smbc_internal_data {
/*
* Log to standard error instead of the more typical standard output
*/
- BOOL _debug_stderr;
+ bool _debug_stderr;
/*
* Support "Create Time" in get/set with the *xattr() functions, if
@@ -87,7 +87,7 @@ struct smbc_internal_data {
* CREATE_TIME. Default is FALSE, i.e. to use the old-style shorter
* names and to not support CREATE time, for backward compatibility.
*/
- BOOL _full_time_names;
+ bool _full_time_names;
/*
* The share mode of a file being opened. To match POSIX semantics
diff --git a/source3/include/locking.h b/source3/include/locking.h
index 35d9f48467..b2b7236721 100644
--- a/source3/include/locking.h
+++ b/source3/include/locking.h
@@ -54,8 +54,8 @@ struct file_id {
struct byte_range_lock {
struct files_struct *fsp;
unsigned int num_locks;
- BOOL modified;
- BOOL read_only;
+ bool modified;
+ bool read_only;
struct file_id key;
struct lock_struct *lock_data;
struct db_record *record;
diff --git a/source3/include/mangle.h b/source3/include/mangle.h
index 382bf1c630..c07b852453 100644
--- a/source3/include/mangle.h
+++ b/source3/include/mangle.h
@@ -6,17 +6,17 @@
struct mangle_fns {
void (*reset)(void);
- BOOL (*is_mangled)(const char *s, const struct share_params *p);
- BOOL (*must_mangle)(const char *s, const struct share_params *p);
- BOOL (*is_8_3)(const char *fname, BOOL check_case, BOOL allow_wildcards,
+ bool (*is_mangled)(const char *s, const struct share_params *p);
+ bool (*must_mangle)(const char *s, const struct share_params *p);
+ bool (*is_8_3)(const char *fname, bool check_case, bool allow_wildcards,
const struct share_params *p);
- BOOL (*lookup_name_from_8_3)(TALLOC_CTX *ctx,
+ bool (*lookup_name_from_8_3)(TALLOC_CTX *ctx,
const char *in,
char **out, /* talloced on the given context. */
const struct share_params *p);
- BOOL (*name_to_8_3)(const char *in,
+ bool (*name_to_8_3)(const char *in,
char out[13],
- BOOL cache83,
+ bool cache83,
int default_case,
const struct share_params *p);
};
diff --git a/source3/include/messages.h b/source3/include/messages.h
index b3ae85ec9c..8de41ca049 100644
--- a/source3/include/messages.h
+++ b/source3/include/messages.h
@@ -192,7 +192,7 @@ NTSTATUS messaging_ctdbd_init(struct messaging_context *msg_ctx,
struct messaging_backend **presult);
struct ctdbd_connection *messaging_ctdbd_connection(void);
-BOOL message_send_all(struct messaging_context *msg_ctx,
+bool message_send_all(struct messaging_context *msg_ctx,
int msg_type,
const void *buf, size_t len,
int *n_sent);
diff --git a/source3/include/msdfs.h b/source3/include/msdfs.h
index 717bc85ed5..c5bfac68d1 100644
--- a/source3/include/msdfs.h
+++ b/source3/include/msdfs.h
@@ -61,7 +61,7 @@ struct dfs_path {
char *hostname;
char *servicename;
char *reqpath;
- BOOL posix_path;
+ bool posix_path;
};
#define init_dfsroot(conn, inbuf, outbuf) \
diff --git a/source3/include/nameserv.h b/source3/include/nameserv.h
index 46ea68574e..46236970a6 100644
--- a/source3/include/nameserv.h
+++ b/source3/include/nameserv.h
@@ -271,14 +271,14 @@ struct work_record {
/* Announce info. */
time_t lastannounce_time;
int announce_interval;
- BOOL needannounce;
+ bool needannounce;
/* Timeout time for this workgroup. 0 means permanent. */
time_t death_time;
/* Election info */
- BOOL RunningElection;
- BOOL needelection;
+ bool RunningElection;
+ bool needelection;
int ElectionCount;
uint32 ElectionCriterion;
@@ -398,7 +398,7 @@ struct response_record {
int repeat_count;
/* Recursion protection. */
- BOOL in_expiration_processing;
+ bool in_expiration_processing;
};
/* A subnet structure. It contains a list of workgroups and netbios names. */
@@ -427,8 +427,8 @@ struct subnet_record {
struct name_record *namelist; /* List of netbios names. */
struct response_record *responselist; /* List of responses expected. */
- BOOL namelist_changed;
- BOOL work_changed;
+ bool namelist_changed;
+ bool work_changed;
struct in_addr bcast_ip;
struct in_addr mask_ip;
@@ -460,13 +460,13 @@ struct nmb_packet {
struct {
int name_trn_id;
int opcode;
- BOOL response;
+ bool response;
struct {
- BOOL bcast;
- BOOL recursion_available;
- BOOL recursion_desired;
- BOOL trunc;
- BOOL authoritative;
+ bool bcast;
+ bool recursion_available;
+ bool recursion_desired;
+ bool trunc;
+ bool authoritative;
} nm_flags;
int rcode;
int qdcount;
@@ -503,8 +503,8 @@ struct dgram_packet {
int msg_type;
struct {
enum node_type node_type;
- BOOL first;
- BOOL more;
+ bool first;
+ bool more;
} flags;
int dgm_id;
struct in_addr source_ip;
@@ -525,7 +525,7 @@ struct packet_struct
{
struct packet_struct *next;
struct packet_struct *prev;
- BOOL locked;
+ bool locked;
struct in_addr ip;
int port;
int fd;
diff --git a/source3/include/nt_printing.h b/source3/include/nt_printing.h
index 968e63d8e2..8e8d87bc55 100644
--- a/source3/include/nt_printing.h
+++ b/source3/include/nt_printing.h
@@ -365,7 +365,7 @@ typedef struct {
uint32 dblspool;
fstring ipaddr;
uint32 port;
- BOOL enable_snmp;
+ bool enable_snmp;
uint32 snmp_index;
} NT_PORT_DATA_1;
@@ -448,10 +448,10 @@ typedef struct {
/* that's the central struct */
typedef struct _Printer{
struct _Printer *prev, *next;
- BOOL document_started;
- BOOL page_started;
+ bool document_started;
+ bool page_started;
uint32 jobid; /* jobid in printing backend */
- BOOL printer_type;
+ int printer_type;
TALLOC_CTX *ctx;
fstring servername;
fstring sharename;
@@ -464,10 +464,10 @@ typedef struct _Printer{
uint32 printerlocal;
SPOOL_NOTIFY_OPTION *option;
POLICY_HND client_hnd;
- BOOL client_connected;
+ bool client_connected;
uint32 change;
/* are we in a FindNextPrinterChangeNotify() call? */
- BOOL fnpcn;
+ bool fnpcn;
} notify;
struct {
fstring machine;
diff --git a/source3/include/nt_status.h b/source3/include/nt_status.h
index f2dab1a7f5..ef862685e7 100644
--- a/source3/include/nt_status.h
+++ b/source3/include/nt_status.h
@@ -30,7 +30,7 @@
/* the following rather strange looking definitions of NTSTATUS and WERROR
and there in order to catch common coding errors where different error types
are mixed up. This is especially important as we slowly convert Samba
- from using BOOL for internal functions
+ from using bool for internal functions
*/
#if defined(HAVE_IMMEDIATE_STRUCTURES)
diff --git a/source3/include/ntdomain.h b/source3/include/ntdomain.h
index 6ce0ef6464..25d7e44e53 100644
--- a/source3/include/ntdomain.h
+++ b/source3/include/ntdomain.h
@@ -29,14 +29,14 @@
*/
typedef struct _prs_struct {
- BOOL io; /* parsing in or out of data stream */
+ bool io; /* parsing in or out of data stream */
/*
* If the (incoming) data is big-endian. On output we are
* always little-endian.
*/
- BOOL bigendian_data;
+ bool bigendian_data;
uint8 align; /* data alignment */
- BOOL is_dynamic; /* Do we own this memory or not ? */
+ bool is_dynamic; /* Do we own this memory or not ? */
uint32 data_offset; /* Current working offset into data. */
uint32 buffer_size; /* Current allocated size of the buffer. */
uint32 grow_size; /* size requested via prs_grow() calls */
@@ -147,8 +147,8 @@ struct dcinfo {
fstring remote_machine; /* Machine name we've authenticated. */
fstring domain;
- BOOL challenge_sent;
- BOOL authenticated;
+ bool challenge_sent;
+ bool authenticated;
};
typedef struct pipe_rpc_fns {
@@ -251,31 +251,31 @@ typedef struct pipes_struct {
* Set to true when an RPC bind has been done on this pipe.
*/
- BOOL pipe_bound;
+ bool pipe_bound;
/*
* Set to true when we should return fault PDU's for everything.
*/
- BOOL fault_state;
+ bool fault_state;
/*
* Set to true when we should return fault PDU's for a bad handle.
*/
- BOOL bad_handle_fault_state;
+ bool bad_handle_fault_state;
/*
* Set to true when the backend does not support a call.
*/
- BOOL rng_fault_state;
+ bool rng_fault_state;
/*
* Set to RPC_BIG_ENDIAN when dealing with big-endian PDU's
*/
- BOOL endian;
+ bool endian;
/*
* Struct to deal with multiple pdu inputs.
@@ -303,7 +303,7 @@ typedef struct smb_np_struct {
int pnum;
connection_struct *conn;
uint16 vuid; /* points to the unauthenticated user that opened this pipe. */
- BOOL open; /* open connection */
+ bool open; /* open connection */
uint16 device_state;
uint16 priority;
fstring name;
@@ -341,7 +341,7 @@ typedef struct smb_np_struct {
ssize_t (*namedpipe_transact)(void *np_state,
char *data, int len,
char *rdata, int rlen,
- BOOL *pipe_outstanding);
+ bool *pipe_outstanding);
/* call to perform a write namedpipe operation
*/
@@ -361,7 +361,7 @@ typedef struct smb_np_struct {
*/
ssize_t (*namedpipe_read)(void * np_state,
char *data, size_t max_len,
- BOOL *pipe_outstanding);
+ bool *pipe_outstanding);
/* call to close a namedpipe.
* function is expected to perform all cleanups
@@ -370,14 +370,14 @@ typedef struct smb_np_struct {
* returns True if cleanup was successful (not that
* we particularly care).
*/
- BOOL (*namedpipe_close)(void * np_state);
+ bool (*namedpipe_close)(void * np_state);
} smb_np_struct;
struct api_struct {
const char *name;
uint8 opnum;
- BOOL (*fn) (pipes_struct *);
+ bool (*fn) (pipes_struct *);
};
typedef struct {
diff --git a/source3/include/ntlmssp.h b/source3/include/ntlmssp.h
index fe38bd3568..7fe1442b4c 100644
--- a/source3/include/ntlmssp.h
+++ b/source3/include/ntlmssp.h
@@ -83,8 +83,8 @@ typedef struct ntlmssp_state
enum server_types server_role;
uint32 expected_state;
- BOOL unicode;
- BOOL use_ntlmv2;
+ bool unicode;
+ bool use_ntlmv2;
char *user;
char *domain;
char *workstation;
@@ -122,7 +122,7 @@ typedef struct ntlmssp_state
* @return Can the challenge be set to arbitary values?
*
*/
- BOOL (*may_set_challenge)(const struct ntlmssp_state *ntlmssp_state);
+ bool (*may_set_challenge)(const struct ntlmssp_state *ntlmssp_state);
/**
* Callback to set the 'challenge' used for NTLM authentication.
diff --git a/source3/include/ntquotas.h b/source3/include/ntquotas.h
index 12ff1788e8..8fd54e8df9 100644
--- a/source3/include/ntquotas.h
+++ b/source3/include/ntquotas.h
@@ -83,7 +83,7 @@ typedef struct _SMB_NTQUOTA_LIST {
} SMB_NTQUOTA_LIST;
typedef struct _SMB_NTQUOTA_HANDLE {
- BOOL valid;
+ bool valid;
SMB_NTQUOTA_LIST *quota_list;
SMB_NTQUOTA_LIST *tmp_list;
} SMB_NTQUOTA_HANDLE;
diff --git a/source3/include/packet.h b/source3/include/packet.h
index 71a7cd36da..d5174229ca 100644
--- a/source3/include/packet.h
+++ b/source3/include/packet.h
@@ -45,8 +45,8 @@ NTSTATUS packet_fd_read_sync(struct packet_context *ctx);
* Return False if none is available
* Otherwise return True and store the callback result in *status
*/
-BOOL packet_handler(struct packet_context *ctx,
- BOOL (*full_req)(const struct data_blob *data,
+bool packet_handler(struct packet_context *ctx,
+ bool (*full_req)(const struct data_blob *data,
size_t *length,
void *private_data),
NTSTATUS (*callback)(const struct data_blob *data,
diff --git a/source3/include/passdb.h b/source3/include/passdb.h
index 60e8a63f90..bb8a336b8c 100644
--- a/source3/include/passdb.h
+++ b/source3/include/passdb.h
@@ -221,9 +221,9 @@ struct pdb_search {
struct samr_displayentry *cache;
uint32 num_entries;
ssize_t cache_size;
- BOOL search_ended;
+ bool search_ended;
void *private_data;
- BOOL (*next_entry)(struct pdb_search *search,
+ bool (*next_entry)(struct pdb_search *search,
struct samr_displayentry *entry);
void (*search_end)(struct pdb_search *search);
};
@@ -250,7 +250,7 @@ struct pdb_methods
{
const char *name; /* What name got this module */
- NTSTATUS (*setsampwent)(struct pdb_methods *, BOOL update, uint32 acb_mask);
+ NTSTATUS (*setsampwent)(struct pdb_methods *, bool update, uint32 acb_mask);
void (*endsampwent)(struct pdb_methods *);
@@ -275,7 +275,7 @@ struct pdb_methods
NTSTATUS (*rename_sam_account)(struct pdb_methods *, struct samu *oldname, const char *newname);
- NTSTATUS (*update_login_attempts)(struct pdb_methods *methods, struct samu *sam_acct, BOOL success);
+ NTSTATUS (*update_login_attempts)(struct pdb_methods *methods, struct samu *sam_acct, bool success);
NTSTATUS (*getgrsid)(struct pdb_methods *methods, GROUP_MAP *map, DOM_SID sid);
@@ -302,7 +302,7 @@ struct pdb_methods
NTSTATUS (*enum_group_mapping)(struct pdb_methods *methods,
const DOM_SID *sid, enum lsa_SidType sid_name_use,
GROUP_MAP **pp_rmap, size_t *p_num_entries,
- BOOL unix_only);
+ bool unix_only);
NTSTATUS (*enum_group_members)(struct pdb_methods *methods,
TALLOC_CTX *mem_ctx,
@@ -379,35 +379,35 @@ struct pdb_methods
NTSTATUS (*get_seq_num)(struct pdb_methods *methods, time_t *seq_num);
- BOOL (*search_users)(struct pdb_methods *methods,
+ bool (*search_users)(struct pdb_methods *methods,
struct pdb_search *search,
uint32 acct_flags);
- BOOL (*search_groups)(struct pdb_methods *methods,
+ bool (*search_groups)(struct pdb_methods *methods,
struct pdb_search *search);
- BOOL (*search_aliases)(struct pdb_methods *methods,
+ bool (*search_aliases)(struct pdb_methods *methods,
struct pdb_search *search,
const DOM_SID *sid);
- BOOL (*uid_to_rid)(struct pdb_methods *methods, uid_t uid,
+ bool (*uid_to_rid)(struct pdb_methods *methods, uid_t uid,
uint32 *rid);
- BOOL (*uid_to_sid)(struct pdb_methods *methods, uid_t uid,
+ bool (*uid_to_sid)(struct pdb_methods *methods, uid_t uid,
DOM_SID *sid);
- BOOL (*gid_to_sid)(struct pdb_methods *methods, gid_t gid,
+ bool (*gid_to_sid)(struct pdb_methods *methods, gid_t gid,
DOM_SID *sid);
- BOOL (*sid_to_id)(struct pdb_methods *methods, const DOM_SID *sid,
+ bool (*sid_to_id)(struct pdb_methods *methods, const DOM_SID *sid,
union unid_t *id, enum lsa_SidType *type);
- BOOL (*rid_algorithm)(struct pdb_methods *methods);
- BOOL (*new_rid)(struct pdb_methods *methods, uint32 *rid);
+ bool (*rid_algorithm)(struct pdb_methods *methods);
+ bool (*new_rid)(struct pdb_methods *methods, uint32 *rid);
- BOOL (*get_trusteddom_pw)(struct pdb_methods *methods,
+ bool (*get_trusteddom_pw)(struct pdb_methods *methods,
const char *domain, char** pwd,
DOM_SID *sid, time_t *pass_last_set_time);
- BOOL (*set_trusteddom_pw)(struct pdb_methods *methods,
+ bool (*set_trusteddom_pw)(struct pdb_methods *methods,
const char* domain, const char* pwd,
const DOM_SID *sid);
- BOOL (*del_trusteddom_pw)(struct pdb_methods *methods,
+ bool (*del_trusteddom_pw)(struct pdb_methods *methods,
const char *domain);
NTSTATUS (*enum_trusteddoms)(struct pdb_methods *methods,
TALLOC_CTX *mem_ctx, uint32 *num_domains,
diff --git a/source3/include/popt_common.h b/source3/include/popt_common.h
index 24c0bbf49c..274cd1ba70 100644
--- a/source3/include/popt_common.h
+++ b/source3/include/popt_common.h
@@ -44,8 +44,8 @@ extern const struct poptOption popt_common_dynconfig[];
struct user_auth_info {
pstring username;
pstring password;
- BOOL got_pass;
- BOOL use_kerberos;
+ bool got_pass;
+ bool use_kerberos;
int signing_state;
};
diff --git a/source3/include/printing.h b/source3/include/printing.h
index 2efc65d383..2788143cc5 100644
--- a/source3/include/printing.h
+++ b/source3/include/printing.h
@@ -34,8 +34,8 @@ struct printjob {
int status; /* the status of this job */
size_t size; /* the size of the job so far */
int page_count; /* then number of pages so far */
- BOOL spooled; /* has it been sent to the spooler yet? */
- BOOL smbjob; /* set if the job is a SMB job */
+ bool spooled; /* has it been sent to the spooler yet? */
+ bool smbjob; /* set if the job is a SMB job */
fstring filename; /* the filename used to spool the file */
fstring jobname; /* the job name given to us by the client */
fstring user; /* the user who started the job */
diff --git a/source3/include/privileges.h b/source3/include/privileges.h
index b579bd0cb2..9a5d928da0 100644
--- a/source3/include/privileges.h
+++ b/source3/include/privileges.h
@@ -94,14 +94,9 @@ typedef struct {
uint32 attr;
} LUID_ATTR;
-#ifndef _UPPER_BOOL
-typedef int BOOL;
-#define _UPPER_BOOL
-#endif
-
typedef struct {
TALLOC_CTX *mem_ctx;
- BOOL ext_ctx;
+ bool ext_ctx;
uint32 count;
uint32 control;
LUID_ATTR *set;
diff --git a/source3/include/rap.h b/source3/include/rap.h
index a7efb67d60..a7efb67d60 100755..100644
--- a/source3/include/rap.h
+++ b/source3/include/rap.h
diff --git a/source3/include/reg_objects.h b/source3/include/reg_objects.h
index 7a5d82cee9..f6cf9cccb7 100644
--- a/source3/include/reg_objects.h
+++ b/source3/include/reg_objects.h
@@ -119,9 +119,9 @@ typedef struct {
/* functions for enumerating subkeys and values */
int (*fetch_subkeys)( const char *key, REGSUBKEY_CTR *subkeys);
int (*fetch_values) ( const char *key, REGVAL_CTR *val );
- BOOL (*store_subkeys)( const char *key, REGSUBKEY_CTR *subkeys );
- BOOL (*store_values)( const char *key, REGVAL_CTR *val );
- BOOL (*reg_access_check)( const char *keyname, uint32 requested,
+ bool (*store_subkeys)( const char *key, REGSUBKEY_CTR *subkeys );
+ bool (*store_values)( const char *key, REGVAL_CTR *val );
+ bool (*reg_access_check)( const char *keyname, uint32 requested,
uint32 *granted,
const NT_USER_TOKEN *token );
WERROR (*get_secdesc)(TALLOC_CTX *mem_ctx, const char *key,
diff --git a/source3/include/regfio.h b/source3/include/regfio.h
index 40b3f2ed2f..63516a358d 100644
--- a/source3/include/regfio.h
+++ b/source3/include/regfio.h
@@ -71,7 +71,7 @@ typedef struct regf_hbin {
prs_struct ps; /* data */
- BOOL dirty; /* has this hbin block been modified? */
+ bool dirty; /* has this hbin block been modified? */
} REGF_HBIN;
/* ??? List -- list of key offsets and hashed names for consistency */
diff --git a/source3/include/rpc_misc.h b/source3/include/rpc_misc.h
index 53073c85be..3a3c61ecec 100644
--- a/source3/include/rpc_misc.h
+++ b/source3/include/rpc_misc.h
@@ -24,7 +24,7 @@
#define _RPC_MISC_H
#define SMB_RPC_INTERFACE_VERSION 1
-#define PRS_POINTER_CAST BOOL (*)(const char*, prs_struct*, int, void*)
+#define PRS_POINTER_CAST bool (*)(const char*, prs_struct*, int, void*)
enum unistr2_term_codes { UNI_FLAGS_NONE = 0, UNI_STR_TERMINATE = 1, UNI_MAXLEN_TERMINATE = 2, UNI_BROKEN_NON_NULL = 3, UNI_STR_DBLTERMINATE = 4 };
diff --git a/source3/include/rpc_spoolss.h b/source3/include/rpc_spoolss.h
index aff0bba444..aff0bba444 100755..100644
--- a/source3/include/rpc_spoolss.h
+++ b/source3/include/rpc_spoolss.h
diff --git a/source3/include/smb.h b/source3/include/smb.h
index 7386613029..6d4effda5e 100644
--- a/source3/include/smb.h
+++ b/source3/include/smb.h
@@ -46,8 +46,8 @@
#define SMB_PORTS "445 139"
#define Undefined (-1)
-#define False (0)
-#define True (1)
+#define False false
+#define True true
#define Auto (2)
#define Required (3)
@@ -311,7 +311,7 @@ struct id_map {
#include "librpc/gen_ndr/svcctl.h"
struct lsa_dom_info {
- BOOL valid;
+ bool valid;
DOM_SID sid;
const char *name;
int num_idxs;
@@ -483,7 +483,7 @@ typedef struct files_struct {
struct timeval open_time;
uint32 access_mask; /* NTCreateX access bits (FILE_READ_DATA etc.) */
uint32 share_access; /* NTCreateX share constants (FILE_SHARE_READ|FILE_SHARE_WRITE|FILE_SHARE_DELETE). */
- BOOL pending_modtime_owner;
+ bool pending_modtime_owner;
struct timespec pending_modtime;
struct timespec last_write_time;
int oplock_type;
@@ -495,17 +495,17 @@ typedef struct files_struct {
struct share_mode_entry *pending_break_messages;
int num_pending_break_messages;
- BOOL can_lock;
- BOOL can_read;
- BOOL can_write;
- BOOL print_file;
- BOOL modified;
- BOOL is_directory;
- BOOL is_stat;
- BOOL aio_write_behind;
- BOOL lockdb_clean;
- BOOL initial_delete_on_close; /* Only set at NTCreateX if file was created. */
- BOOL posix_open;
+ bool can_lock;
+ bool can_read;
+ bool can_write;
+ bool print_file;
+ bool modified;
+ bool is_directory;
+ bool is_stat;
+ bool aio_write_behind;
+ bool lockdb_clean;
+ bool initial_delete_on_close; /* Only set at NTCreateX if file was created. */
+ bool posix_open;
char *fsp_name;
struct vfs_fsp_data *vfs_extension;
@@ -538,8 +538,8 @@ typedef struct {
struct vuid_cache_entry {
uint16 vuid;
- BOOL read_only;
- BOOL admin_user;
+ bool read_only;
+ bool admin_user;
};
struct vuid_cache {
@@ -549,7 +549,7 @@ struct vuid_cache {
typedef struct {
char *name;
- BOOL is_wild;
+ bool is_wild;
} name_compare_entry;
struct trans_state {
@@ -566,8 +566,8 @@ struct trans_state {
fstring name; /* for trans requests */
uint16 call; /* for trans2 and nttrans requests */
- BOOL close_on_completion;
- BOOL one_way;
+ bool close_on_completion;
+ bool one_way;
unsigned int setup_count;
uint16 *setup;
@@ -610,14 +610,14 @@ typedef struct connection_struct {
TALLOC_CTX *mem_ctx; /* long-lived memory context for things hanging off this struct. */
unsigned cnum; /* an index passed over the wire */
struct share_params *params;
- BOOL force_user;
- BOOL force_group;
+ bool force_user;
+ bool force_group;
struct vuid_cache vuid_cache;
struct dptr_struct *dirptr;
- BOOL printer;
- BOOL ipc;
- BOOL read_only; /* Attributes for the current user of the share. */
- BOOL admin_user; /* Attributes for the current user of the share. */
+ bool printer;
+ bool ipc;
+ bool read_only; /* Attributes for the current user of the share. */
+ bool admin_user; /* Attributes for the current user of the share. */
char *dirpath;
char *connectpath;
char *origpath;
@@ -642,13 +642,13 @@ typedef struct connection_struct {
time_t lastused;
time_t lastused_count;
- BOOL used;
+ bool used;
int num_files_open;
unsigned int num_smb_operations; /* Count of smb operations on this tree. */
- BOOL case_sensitive;
- BOOL case_preserve;
- BOOL short_case_preserve;
+ bool case_sensitive;
+ bool case_preserve;
+ bool short_case_preserve;
name_compare_entry *hide_list; /* Per-share list of files to return as hidden. */
name_compare_entry *veto_list; /* Per-share list of files to veto (never show). */
@@ -720,7 +720,7 @@ struct server_info_struct {
uint32 type;
fstring comment;
fstring domain; /* used ONLY in ipc.c NOT namework.c */
- BOOL server_added; /* used ONLY in ipc.c NOT namework.c */
+ bool server_added; /* used ONLY in ipc.c NOT namework.c */
};
/* used for network interfaces */
@@ -795,9 +795,9 @@ struct share_mode_lock {
int num_share_modes;
struct share_mode_entry *share_modes;
UNIX_USER_TOKEN *delete_token;
- BOOL delete_on_close;
- BOOL fresh;
- BOOL modified;
+ bool delete_on_close;
+ bool fresh;
+ bool modified;
struct db_record *record;
};
@@ -810,7 +810,7 @@ struct locking_data {
union {
struct {
int num_share_mode_entries;
- BOOL delete_on_close;
+ bool delete_on_close;
uint32 delete_token_size; /* Only valid if either of
the two previous fields
are True. */
@@ -914,11 +914,11 @@ struct parm_struct {
parm_type type;
parm_class p_class;
void *ptr;
- BOOL (*special)(int snum, const char *, char **);
+ bool (*special)(int snum, const char *, char **);
const struct enum_list *enum_list;
unsigned flags;
union {
- BOOL bvalue;
+ bool bvalue;
int ivalue;
char *svalue;
char cvalue;
@@ -1699,9 +1699,9 @@ enum smbd_capability {
typee is used to describe how to interact with the kernel */
struct kernel_oplocks {
files_struct * (*receive_message)(fd_set *fds);
- BOOL (*set_oplock)(files_struct *fsp, int oplock_type);
+ bool (*set_oplock)(files_struct *fsp, int oplock_type);
void (*release_oplock)(files_struct *fsp);
- BOOL (*msg_waiting)(fd_set *fds);
+ bool (*msg_waiting)(fd_set *fds);
int notification_fd;
};
@@ -1734,8 +1734,8 @@ struct node_status_extra {
};
struct pwd_info {
- BOOL null_pwd;
- BOOL cleartext;
+ bool null_pwd;
+ bool cleartext;
fstring password;
};
@@ -1760,7 +1760,7 @@ typedef struct user_struct {
const char *unix_homedir;
const char *logon_script;
- BOOL guest;
+ bool guest;
/* following groups stuff added by ih */
/* This groups info is needed for when we become_user() for this uid */
@@ -1861,15 +1861,15 @@ struct ip_service {
typedef struct smb_sign_info {
void (*sign_outgoing_message)(char *outbuf, struct smb_sign_info *si);
- BOOL (*check_incoming_message)(const char *inbuf, struct smb_sign_info *si, BOOL must_be_ok);
+ bool (*check_incoming_message)(const char *inbuf, struct smb_sign_info *si, bool must_be_ok);
void (*free_signing_context)(struct smb_sign_info *si);
void *signing_context;
- BOOL negotiated_smb_signing;
- BOOL allow_smb_signing;
- BOOL doing_signing;
- BOOL mandatory_signing;
- BOOL seen_valid; /* Have I ever seen a validly signed packet? */
+ bool negotiated_smb_signing;
+ bool allow_smb_signing;
+ bool doing_signing;
+ bool mandatory_signing;
+ bool seen_valid; /* Have I ever seen a validly signed packet? */
} smb_sign_info;
struct ea_struct {
diff --git a/source3/include/smb_ldap.h b/source3/include/smb_ldap.h
index 8fb3015094..a3c270d95c 100644
--- a/source3/include/smb_ldap.h
+++ b/source3/include/smb_ldap.h
@@ -114,7 +114,7 @@ struct ldap_SearchRequest {
enum ldap_deref deref;
uint32 timelimit;
uint32 sizelimit;
- BOOL attributesonly;
+ bool attributesonly;
char *filter;
int num_attributes;
const char **attributes;
@@ -162,7 +162,7 @@ struct ldap_DelRequest {
struct ldap_ModifyDNRequest {
const char *dn;
const char *newrdn;
- BOOL deleteolddn;
+ bool deleteolddn;
const char *newsuperior;
};
@@ -212,7 +212,7 @@ union ldap_Request {
struct ldap_Control {
const char *oid;
- BOOL critical;
+ bool critical;
DATA_BLOB value;
};
@@ -237,7 +237,7 @@ struct ldap_connection {
int next_msgid;
char *host;
uint16 port;
- BOOL ldaps;
+ bool ldaps;
const char *auth_dn;
const char *simple_pw;
diff --git a/source3/include/smbldap.h b/source3/include/smbldap.h
index c05f53ae31..3e2c878dbe 100644
--- a/source3/include/smbldap.h
+++ b/source3/include/smbldap.h
@@ -138,10 +138,10 @@ void smbldap_set_mod (LDAPMod *** modlist, int modop, const char *attribute, con
void smbldap_make_mod(LDAP *ldap_struct, LDAPMessage *existing,
LDAPMod ***mods,
const char *attribute, const char *newval);
-BOOL smbldap_get_single_attribute (LDAP * ldap_struct, LDAPMessage * entry,
+bool smbldap_get_single_attribute (LDAP * ldap_struct, LDAPMessage * entry,
const char *attribute, char *value,
int max_len);
-BOOL smbldap_get_single_pstring (LDAP * ldap_struct, LDAPMessage * entry,
+bool smbldap_get_single_pstring (LDAP * ldap_struct, LDAPMessage * entry,
const char *attribute, pstring value);
char *smbldap_get_dn(LDAP *ld, LDAPMessage *entry);
int smbldap_modify(struct smbldap_state *ldap_state,
@@ -161,11 +161,11 @@ struct smbldap_state {
const char *uri;
/* credentials */
- BOOL anonymous;
+ bool anonymous;
char *bind_dn;
char *bind_secret;
- BOOL paged_results;
+ bool paged_results;
unsigned int num_failures;
diff --git a/source3/include/smbprofile.h b/source3/include/smbprofile.h
index 2c25a69601..c89815598b 100644
--- a/source3/include/smbprofile.h
+++ b/source3/include/smbprofile.h
@@ -764,8 +764,8 @@ struct profile_header {
extern struct profile_header *profile_h;
extern struct profile_stats *profile_p;
-extern BOOL do_profile_flag;
-extern BOOL do_profile_times;
+extern bool do_profile_flag;
+extern bool do_profile_times;
#ifdef WITH_PROFILE
diff --git a/source3/include/util_tdb.h b/source3/include/util_tdb.h
index cb128422d5..a970806166 100644
--- a/source3/include/util_tdb.h
+++ b/source3/include/util_tdb.h
@@ -22,11 +22,6 @@
#include "tdb.h"
-#ifndef _BOOL
-typedef int BOOL;
-#define _BOOL
-#endif
-
/* single node of a list returned by tdb_search_keys */
typedef struct keys_node
{
@@ -41,11 +36,11 @@ struct tdb_wrap {
};
struct tdb_validation_status {
- BOOL tdb_error;
- BOOL bad_freelist;
- BOOL bad_entry;
- BOOL unknown_key;
- BOOL success;
+ bool tdb_error;
+ bool bad_freelist;
+ bool bad_entry;
+ bool unknown_key;
+ bool success;
};
typedef int (*tdb_validate_data_func)(TDB_CONTEXT *the_tdb, TDB_DATA kbuf, TDB_DATA dbuf, void *state);
@@ -61,9 +56,9 @@ int tdb_read_lock_bystring_with_timeout(TDB_CONTEXT *tdb, const char *keyval,
unsigned int timeout);
void tdb_read_unlock_bystring(TDB_CONTEXT *tdb, const char *keyval);
int32 tdb_fetch_int32(struct tdb_context *tdb, const char *keystr);
-int tdb_store_uint32(struct tdb_context *tdb, const char *keystr, uint32 value);
+bool tdb_store_uint32(struct tdb_context *tdb, const char *keystr, uint32 value);
int tdb_store_int32(struct tdb_context *tdb, const char *keystr, int32 v);
-int tdb_fetch_uint32(struct tdb_context *tdb, const char *keystr, uint32 *value);
+bool tdb_fetch_uint32(struct tdb_context *tdb, const char *keystr, uint32 *value);
int tdb_traverse_delete_fn(struct tdb_context *the_tdb, TDB_DATA key, TDB_DATA dbuf,
void *state);
int tdb_store_bystring(struct tdb_context *tdb, const char *keystr, TDB_DATA data, int flags);
@@ -78,7 +73,7 @@ TDB_DATA string_tdb_data(const char *string);
TDB_DATA string_term_tdb_data(const char *string);
int tdb_trans_store(struct tdb_context *tdb, TDB_DATA key, TDB_DATA dbuf,
int flag);
-BOOL tdb_change_uint32_atomic(TDB_CONTEXT *tdb, const char *keystr,
+bool tdb_change_uint32_atomic(TDB_CONTEXT *tdb, const char *keystr,
uint32 *oldval, uint32 change_val);
int tdb_chainlock_with_timeout( TDB_CONTEXT *tdb, TDB_DATA key,
unsigned int timeout);
diff --git a/source3/include/vfs.h b/source3/include/vfs.h
index a5fe4afe6a..9dadacb7ef 100644
--- a/source3/include/vfs.h
+++ b/source3/include/vfs.h
@@ -72,6 +72,7 @@
/* Changed to version22 to add lchown operation -- jra */
/* Leave at 22 - not yet released. But change set_nt_acl to return an NTSTATUS. jra. */
/* Leave at 22 - not yet released. Add file_id_create operation. --metze */
+/* Leave at 22 - not yet released. Change all BOOL parameters (int) to bool. jra. */
#define SMB_VFS_INTERFACE_VERSION 22
@@ -237,11 +238,11 @@ struct vfs_ops {
int (*connect_fn)(struct vfs_handle_struct *handle, const char *service, const char *user);
void (*disconnect)(struct vfs_handle_struct *handle);
- SMB_BIG_UINT (*disk_free)(struct vfs_handle_struct *handle, const char *path, BOOL small_query, SMB_BIG_UINT *bsize,
+ SMB_BIG_UINT (*disk_free)(struct vfs_handle_struct *handle, const char *path, bool small_query, SMB_BIG_UINT *bsize,
SMB_BIG_UINT *dfree, SMB_BIG_UINT *dsize);
int (*get_quota)(struct vfs_handle_struct *handle, enum SMB_QUOTA_TYPE qtype, unid_t id, SMB_DISK_QUOTA *qt);
int (*set_quota)(struct vfs_handle_struct *handle, enum SMB_QUOTA_TYPE qtype, unid_t id, SMB_DISK_QUOTA *qt);
- int (*get_shadow_copy_data)(struct vfs_handle_struct *handle, struct files_struct *fsp, SHADOW_COPY_DATA *shadow_copy_data, BOOL labels);
+ int (*get_shadow_copy_data)(struct vfs_handle_struct *handle, struct files_struct *fsp, SHADOW_COPY_DATA *shadow_copy_data, bool labels);
int (*statvfs)(struct vfs_handle_struct *handle, const char *path, struct vfs_statvfs_struct *statbuf);
/* Directory operations */
@@ -280,10 +281,10 @@ struct vfs_ops {
char *(*getwd)(struct vfs_handle_struct *handle, char *buf);
int (*ntimes)(struct vfs_handle_struct *handle, const char *path, const struct timespec ts[2]);
int (*ftruncate)(struct vfs_handle_struct *handle, struct files_struct *fsp, int fd, SMB_OFF_T offset);
- BOOL (*lock)(struct vfs_handle_struct *handle, struct files_struct *fsp, int fd, int op, SMB_OFF_T offset, SMB_OFF_T count, int type);
+ bool (*lock)(struct vfs_handle_struct *handle, struct files_struct *fsp, int fd, int op, SMB_OFF_T offset, SMB_OFF_T count, int type);
int (*kernel_flock)(struct vfs_handle_struct *handle, struct files_struct *fsp, int fd, uint32 share_mode);
int (*linux_setlease)(struct vfs_handle_struct *handle, struct files_struct *fsp, int fd, int leasetype);
- BOOL (*getlock)(struct vfs_handle_struct *handle, struct files_struct *fsp, int fd, SMB_OFF_T *poffset, SMB_OFF_T *pcount, int *ptype, pid_t *ppid);
+ bool (*getlock)(struct vfs_handle_struct *handle, struct files_struct *fsp, int fd, SMB_OFF_T *poffset, SMB_OFF_T *pcount, int *ptype, pid_t *ppid);
int (*symlink)(struct vfs_handle_struct *handle, const char *oldpath, const char *newpath);
int (*readlink)(struct vfs_handle_struct *handle, const char *path, char *buf, size_t bufsiz);
int (*link)(struct vfs_handle_struct *handle, const char *oldpath, const char *newpath);