summaryrefslogtreecommitdiff
path: root/source3/utils
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/utils
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/utils')
-rw-r--r--source3/utils/eventlogadm.c6
-rw-r--r--source3/utils/net.c20
-rw-r--r--source3/utils/net.h10
-rw-r--r--source3/utils/net_ads.c20
-rw-r--r--source3/utils/net_conf.c16
-rw-r--r--source3/utils/net_groupmap.c10
-rw-r--r--source3/utils/net_idmap.c6
-rw-r--r--source3/utils/net_lookup.c2
-rw-r--r--source3/utils/net_rpc.c40
-rw-r--r--source3/utils/net_rpc_audit.c2
-rw-r--r--source3/utils/net_rpc_printer.c66
-rw-r--r--source3/utils/net_rpc_registry.c6
-rw-r--r--source3/utils/net_rpc_samsync.c12
-rw-r--r--source3/utils/net_rpc_sh_acct.c2
-rw-r--r--source3/utils/net_rpc_shell.c4
-rw-r--r--source3/utils/net_sam.c4
-rw-r--r--source3/utils/net_status.c6
-rw-r--r--source3/utils/net_usershare.c10
-rw-r--r--source3/utils/net_util.c2
-rw-r--r--source3/utils/netlookup.c2
-rw-r--r--source3/utils/nmblookup.c22
-rw-r--r--source3/utils/ntlm_auth.c28
-rw-r--r--source3/utils/ntlm_auth_diagnostics.c54
-rw-r--r--source3/utils/passwd_util.c2
-rw-r--r--source3/utils/pdbedit.c50
-rw-r--r--source3/utils/profiles.c8
-rw-r--r--source3/utils/sharesec.c14
-rw-r--r--source3/utils/smbcacls.c20
-rw-r--r--source3/utils/smbcontrol.c72
-rw-r--r--source3/utils/smbcquotas.c24
-rw-r--r--source3/utils/smbpasswd.c10
-rw-r--r--source3/utils/smbtree.c12
-rw-r--r--source3/utils/status.c12
-rw-r--r--source3/utils/status_profile.c10
-rw-r--r--source3/utils/testparm.c8
35 files changed, 296 insertions, 296 deletions
diff --git a/source3/utils/eventlogadm.c b/source3/utils/eventlogadm.c
index f917f0144c..278a7e9be8 100644
--- a/source3/utils/eventlogadm.c
+++ b/source3/utils/eventlogadm.c
@@ -59,7 +59,7 @@ static void display_eventlog_names( void )
printf( "\t<None specified>\n");
}
-static int DoAddSourceCommand( int argc, char **argv, BOOL debugflag, char *exename )
+static int DoAddSourceCommand( int argc, char **argv, bool debugflag, char *exename )
{
if ( argc < 3 ) {
@@ -78,7 +78,7 @@ static int DoAddSourceCommand( int argc, char **argv, BOOL debugflag, char *exen
return 0;
}
-static int DoWriteCommand( int argc, char **argv, BOOL debugflag, char *exename )
+static int DoWriteCommand( int argc, char **argv, bool debugflag, char *exename )
{
FILE *f1;
char *argfname;
@@ -86,7 +86,7 @@ static int DoWriteCommand( int argc, char **argv, BOOL debugflag, char *exename
/* fixed constants are bad bad bad */
pstring linein;
- BOOL is_eor;
+ bool is_eor;
Eventlog_entry ee;
int rcnum;
diff --git a/source3/utils/net.c b/source3/utils/net.c
index f9af7a41ca..6cdc7f8671 100644
--- a/source3/utils/net.c
+++ b/source3/utils/net.c
@@ -59,7 +59,7 @@ const char *opt_requester_name = NULL;
const char *opt_host = NULL;
const char *opt_password = NULL;
const char *opt_user_name = NULL;
-BOOL opt_user_specified = False;
+bool opt_user_specified = False;
const char *opt_workgroup = NULL;
int opt_long_list_entries = 0;
int opt_reboot = 0;
@@ -74,9 +74,9 @@ int opt_flags = -1;
int opt_timeout = 0;
const char *opt_target_workgroup = NULL;
int opt_machine_pass = 0;
-BOOL opt_localgroup = False;
-BOOL opt_domaingroup = False;
-static BOOL do_talloc_report=False;
+bool opt_localgroup = False;
+bool opt_domaingroup = False;
+static bool do_talloc_report=False;
const char *opt_newntname = "";
int opt_rid = 0;
int opt_acls = 0;
@@ -84,12 +84,12 @@ int opt_attrs = 0;
int opt_timestamps = 0;
const char *opt_exclude = NULL;
const char *opt_destination = NULL;
-BOOL opt_testmode = False;
+bool opt_testmode = False;
-BOOL opt_have_ip = False;
+bool opt_have_ip = False;
struct in_addr opt_dest_ip;
-extern BOOL AllowDebugChange;
+extern bool AllowDebugChange;
uint32 get_sec_channel_type(const char *param)
{
@@ -381,7 +381,7 @@ int net_use_machine_account(void)
return 0;
}
-BOOL net_find_server(const char *domain, unsigned flags, struct in_addr *server_ip, char **server_name)
+bool net_find_server(const char *domain, unsigned flags, struct in_addr *server_ip, char **server_name)
{
const char *d = domain ? domain : opt_target_workgroup;
@@ -449,7 +449,7 @@ BOOL net_find_server(const char *domain, unsigned flags, struct in_addr *server_
}
-BOOL net_find_pdc(struct in_addr *server_ip, fstring server_name, const char *domain_name)
+bool net_find_pdc(struct in_addr *server_ip, fstring server_name, const char *domain_name)
{
if (get_pdc_ip(domain_name, server_ip)) {
if (is_zero_ip_v4(*server_ip))
@@ -809,7 +809,7 @@ static int net_afs(int argc, const char **argv)
#endif /* WITH_FAKE_KASERVER */
-static BOOL search_maxrid(struct pdb_search *search, const char *type,
+static bool search_maxrid(struct pdb_search *search, const char *type,
uint32 *max_rid)
{
struct samr_displayentry *entries;
diff --git a/source3/utils/net.h b/source3/utils/net.h
index 795cc4d71a..d2deb931b8 100644
--- a/source3/utils/net.h
+++ b/source3/utils/net.h
@@ -100,10 +100,10 @@ extern int opt_timeout;
extern const char *opt_host;
extern const char *opt_user_name;
extern const char *opt_password;
-extern BOOL opt_user_specified;
+extern bool opt_user_specified;
-extern BOOL opt_localgroup;
-extern BOOL opt_domaingroup;
+extern bool opt_localgroup;
+extern bool opt_domaingroup;
extern const char *opt_newntname;
extern int opt_rid;
extern int opt_acls;
@@ -111,9 +111,9 @@ extern int opt_attrs;
extern int opt_timestamps;
extern const char *opt_exclude;
extern const char *opt_destination;
-extern BOOL opt_testmode;
+extern bool opt_testmode;
-extern BOOL opt_have_ip;
+extern bool opt_have_ip;
extern struct in_addr opt_dest_ip;
extern const char *share_type[];
diff --git a/source3/utils/net_ads.c b/source3/utils/net_ads.c
index 08623d6834..bfbcbbde49 100644
--- a/source3/utils/net_ads.c
+++ b/source3/utils/net_ads.c
@@ -208,15 +208,15 @@ static void use_in_memory_ccache(void) {
setenv(KRB5_ENV_CCNAME, "MEMORY:net_ads", 1);
}
-static ADS_STATUS ads_startup_int(BOOL only_own_domain, uint32 auth_flags, ADS_STRUCT **ads_ret)
+static ADS_STATUS ads_startup_int(bool only_own_domain, uint32 auth_flags, ADS_STRUCT **ads_ret)
{
ADS_STRUCT *ads = NULL;
ADS_STATUS status;
- BOOL need_password = False;
- BOOL second_time = False;
+ bool need_password = False;
+ bool second_time = False;
char *cp;
const char *realm = NULL;
- BOOL tried_closest_dc = False;
+ bool tried_closest_dc = False;
/* lp_realm() should be handled by a command line param,
However, the join requires that realm be set in smb.conf
@@ -318,12 +318,12 @@ retry:
return status;
}
-ADS_STATUS ads_startup(BOOL only_own_domain, ADS_STRUCT **ads)
+ADS_STATUS ads_startup(bool only_own_domain, ADS_STRUCT **ads)
{
return ads_startup_int(only_own_domain, 0, ads);
}
-ADS_STATUS ads_startup_nobind(BOOL only_own_domain, ADS_STRUCT **ads)
+ADS_STATUS ads_startup_nobind(bool only_own_domain, ADS_STRUCT **ads)
{
return ads_startup_int(only_own_domain, ADS_AUTH_NO_BIND, ads);
}
@@ -395,7 +395,7 @@ static int net_ads_workgroup(int argc, const char **argv)
-static BOOL usergrp_display(ADS_STRUCT *ads, char *field, void **values, void *data_area)
+static bool usergrp_display(ADS_STRUCT *ads, char *field, void **values, void *data_area)
{
char **disp_fields = (char **) data_area;
@@ -1190,7 +1190,7 @@ static ADS_STATUS net_precreate_machine_acct( ADS_STRUCT *ads, const char *ou )
char *ou_str = NULL;
char *dn = NULL;
LDAPMessage *res = NULL;
- BOOL moved;
+ bool moved;
ou_str = ads_ou_string(ads, ou);
if (asprintf(&dn, "%s,%s", ou_str, ads->config.bind_path) == -1) {
@@ -1240,7 +1240,7 @@ done:
/************************************************************************
************************************************************************/
-static BOOL net_derive_salting_principal( TALLOC_CTX *ctx, ADS_STRUCT *ads )
+static bool net_derive_salting_principal( TALLOC_CTX *ctx, ADS_STRUCT *ads )
{
uint32 domain_func;
ADS_STATUS status;
@@ -1470,7 +1470,7 @@ int net_ads_join(int argc, const char **argv)
char *tmp_password, *password;
TALLOC_CTX *ctx = NULL;
DOM_SID *domain_sid = NULL;
- BOOL createupn = False;
+ bool createupn = False;
const char *machineupn = NULL;
const char *create_in_ou = NULL;
int i;
diff --git a/source3/utils/net_conf.c b/source3/utils/net_conf.c
index c18b733a89..6a601d8871 100644
--- a/source3/utils/net_conf.c
+++ b/source3/utils/net_conf.c
@@ -342,9 +342,9 @@ done:
/*
* check if a subkey of KEY_SMBCONF of a given name exists
*/
-static BOOL smbconf_key_exists(TALLOC_CTX *ctx, const char *subkeyname)
+static bool smbconf_key_exists(TALLOC_CTX *ctx, const char *subkeyname)
{
- BOOL ret = False;
+ bool ret = False;
WERROR werr = WERR_OK;
TALLOC_CTX *mem_ctx;
struct registry_key *key;
@@ -364,10 +364,10 @@ done:
return ret;
}
-static BOOL smbconf_value_exists(TALLOC_CTX *ctx, struct registry_key *key,
+static bool smbconf_value_exists(TALLOC_CTX *ctx, struct registry_key *key,
const char *param)
{
- BOOL ret = False;
+ bool ret = False;
WERROR werr = WERR_OK;
struct registry_value *value = NULL;
@@ -479,10 +479,10 @@ static char *parm_valstr(TALLOC_CTX *ctx, struct parm_struct *parm,
valstr = talloc_asprintf(ctx, "%s", (char *)ptr);
break;
case P_BOOL:
- valstr = talloc_asprintf(ctx, "%s", BOOLSTR(*(BOOL *)ptr));
+ valstr = talloc_asprintf(ctx, "%s", BOOLSTR(*(bool *)ptr));
break;
case P_BOOLREV:
- valstr = talloc_asprintf(ctx, "%s", BOOLSTR(!*(BOOL *)ptr));
+ valstr = talloc_asprintf(ctx, "%s", BOOLSTR(!*(bool *)ptr));
break;
case P_ENUM:
for (i = 0; parm->enum_list[i].name; i++) {
@@ -600,7 +600,7 @@ done:
}
/* return True iff there are nondefault globals */
-static BOOL globals_exist(void)
+static bool globals_exist(void)
{
int i = 0;
struct parm_struct *parm;
@@ -695,7 +695,7 @@ int net_conf_import(int argc, const char **argv)
int ret = -1;
const char *filename = NULL;
const char *servicename = NULL;
- BOOL service_found = False;
+ bool service_found = False;
TALLOC_CTX *ctx;
struct share_iterator *shares;
struct share_params *share;
diff --git a/source3/utils/net_groupmap.c b/source3/utils/net_groupmap.c
index 34e9f8c033..d2ed696eb1 100644
--- a/source3/utils/net_groupmap.c
+++ b/source3/utils/net_groupmap.c
@@ -59,7 +59,7 @@ static char* get_string_param( const char* param )
Figure out if the input was an NT group or a SID string.
Return the SID.
**********************************************************/
-static BOOL get_sid_from_input(DOM_SID *sid, char *input)
+static bool get_sid_from_input(DOM_SID *sid, char *input)
{
GROUP_MAP map;
@@ -84,7 +84,7 @@ static BOOL get_sid_from_input(DOM_SID *sid, char *input)
Dump a GROUP_MAP entry to stdout (long or short listing)
**********************************************************/
-static void print_map_entry ( GROUP_MAP map, BOOL long_list )
+static void print_map_entry ( GROUP_MAP map, bool long_list )
{
if (!long_list)
d_printf("%s (%s) -> %s\n", map.nt_name,
@@ -106,7 +106,7 @@ static void print_map_entry ( GROUP_MAP map, BOOL long_list )
static int net_groupmap_list(int argc, const char **argv)
{
size_t entries;
- BOOL long_list = False;
+ bool long_list = False;
size_t i;
fstring ntgroup = "";
fstring sid_string = "";
@@ -526,7 +526,7 @@ static int net_groupmap_set(int argc, const char **argv)
const char *ntgroup = NULL;
struct group *grp = NULL;
GROUP_MAP map;
- BOOL have_map = False;
+ bool have_map = False;
if ((argc < 1) || (argc > 2)) {
d_printf("Usage: net groupmap set \"NT Group\" "
@@ -729,7 +729,7 @@ static int net_groupmap_listmem(int argc, const char **argv)
return 0;
}
-static BOOL print_alias_memberships(TALLOC_CTX *mem_ctx,
+static bool print_alias_memberships(TALLOC_CTX *mem_ctx,
const DOM_SID *domain_sid,
const DOM_SID *member)
{
diff --git a/source3/utils/net_idmap.c b/source3/utils/net_idmap.c
index 679c3d6476..052566fa73 100644
--- a/source3/utils/net_idmap.c
+++ b/source3/utils/net_idmap.c
@@ -173,13 +173,13 @@ static int net_idmap_set(int argc, const char **argv)
d_printf("Not Implemented yet\n");
return -1;
}
-BOOL idmap_store_secret(const char *backend, bool alloc,
+bool idmap_store_secret(const char *backend, bool alloc,
const char *domain, const char *identity,
const char *secret)
{
char *tmp;
int r;
- BOOL ret;
+ bool ret;
if (alloc) {
r = asprintf(&tmp, "IDMAP_ALLOC_%s", backend);
@@ -205,7 +205,7 @@ static int net_idmap_secret(int argc, const char **argv)
char *domain;
char *backend;
char *opt = NULL;
- BOOL ret;
+ bool ret;
if (argc != 2) {
return net_help_idmap(argc, argv);
diff --git a/source3/utils/net_lookup.c b/source3/utils/net_lookup.c
index 29fea32c9b..a1e8c1a6ed 100644
--- a/source3/utils/net_lookup.c
+++ b/source3/utils/net_lookup.c
@@ -163,7 +163,7 @@ static int net_lookup_dc(int argc, const char **argv)
const char *domain = NULL;
char *sitename = NULL;
int count, i;
- BOOL sec_ads = (lp_security() == SEC_ADS);
+ bool sec_ads = (lp_security() == SEC_ADS);
if (sec_ads) {
domain = lp_realm();
diff --git a/source3/utils/net_rpc.c b/source3/utils/net_rpc.c
index cbccc95b47..bf5e4c6b6d 100644
--- a/source3/utils/net_rpc.c
+++ b/source3/utils/net_rpc.c
@@ -1547,7 +1547,7 @@ static NTSTATUS rpc_sh_user_flag_edit_internals(TALLOC_CTX *mem_ctx,
const char *username;
const char *oldval = "unknown";
uint32 oldflags, newflags;
- BOOL newval;
+ bool newval;
if ((argc > 1) ||
((argc == 1) && !strequal(argv[0], "yes") &&
@@ -1712,7 +1712,7 @@ static NTSTATUS rpc_group_delete_internals(const DOM_SID *domain_sid,
const char **argv)
{
POLICY_HND connect_pol, domain_pol, group_pol, user_pol;
- BOOL group_is_primary = False;
+ bool group_is_primary = False;
NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
uint32 *group_rids, num_rids, *name_types, num_members,
@@ -2447,9 +2447,9 @@ static NTSTATUS rpc_group_list_internals(const DOM_SID *domain_sid,
NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
uint32 start_idx=0, max_entries=250, num_entries, i, loop_count = 0;
struct acct_info *groups;
- BOOL global = False;
- BOOL local = False;
- BOOL builtin = False;
+ bool global = False;
+ bool local = False;
+ bool builtin = False;
if (argc == 0) {
global = True;
@@ -3328,7 +3328,7 @@ static int rpc_share_list(int argc, const char **argv)
return run_rpc_command(NULL, PI_SRVSVC, 0, rpc_share_list_internals, argc, argv);
}
-static BOOL check_share_availability(struct cli_state *cli, const char *netname)
+static bool check_share_availability(struct cli_state *cli, const char *netname)
{
if (!cli_send_tconX(cli, netname, "A:", "", 0)) {
d_printf("skipping [%s]: not a file share.\n", netname);
@@ -3341,7 +3341,7 @@ static BOOL check_share_availability(struct cli_state *cli, const char *netname)
return True;
}
-static BOOL check_share_sanity(struct cli_state *cli, fstring netname, uint32 type)
+static bool check_share_sanity(struct cli_state *cli, fstring netname, uint32 type)
{
/* only support disk shares */
if (! ( type == STYPE_DISKTREE || type == (STYPE_DISKTREE | STYPE_HIDDEN)) ) {
@@ -3588,7 +3588,7 @@ static void copy_fn(const char *mnt, file_info *f, const char *mask, void *state
*
* @return Boolean result
**/
-BOOL sync_files(struct copy_clistate *cp_clistate, pstring mask)
+bool sync_files(struct copy_clistate *cp_clistate, pstring mask)
{
struct cli_state *targetcli;
pstring targetpath;
@@ -3616,7 +3616,7 @@ BOOL sync_files(struct copy_clistate *cp_clistate, pstring mask)
* Should set up ACL inheritance.
**/
-BOOL copy_top_level_perms(struct copy_clistate *cp_clistate,
+bool copy_top_level_perms(struct copy_clistate *cp_clistate,
const char *sharename)
{
NTSTATUS nt_status = NT_STATUS_UNSUCCESSFUL;
@@ -3677,8 +3677,8 @@ static NTSTATUS rpc_share_migrate_files_internals(const DOM_SID *domain_sid,
uint32 i;
uint32 level = 502;
struct copy_clistate cp_clistate;
- BOOL got_src_share = False;
- BOOL got_dst_share = False;
+ bool got_src_share = False;
+ bool got_dst_share = False;
pstring mask = "\\*";
char *dst = NULL;
@@ -4184,7 +4184,7 @@ static void free_user_token(NT_USER_TOKEN *token)
SAFE_FREE(token->user_sids);
}
-static BOOL is_sid_in_token(NT_USER_TOKEN *token, DOM_SID *sid)
+static bool is_sid_in_token(NT_USER_TOKEN *token, DOM_SID *sid)
{
int i;
@@ -4226,7 +4226,7 @@ static void dump_user_token(struct user_token *token)
}
}
-static BOOL is_alias_member(DOM_SID *sid, struct full_alias *alias)
+static bool is_alias_member(DOM_SID *sid, struct full_alias *alias)
{
int i;
@@ -4265,7 +4265,7 @@ static void collect_alias_memberships(NT_USER_TOKEN *token)
}
}
-static BOOL get_user_sids(const char *domain, const char *user, NT_USER_TOKEN *token)
+static bool get_user_sids(const char *domain, const char *user, NT_USER_TOKEN *token)
{
struct winbindd_request request;
struct winbindd_response response;
@@ -4352,7 +4352,7 @@ static BOOL get_user_sids(const char *domain, const char *user, NT_USER_TOKEN *t
* Get a list of all user tokens we want to look at
**/
-static BOOL get_user_tokens(int *num_tokens, struct user_token **user_tokens)
+static bool get_user_tokens(int *num_tokens, struct user_token **user_tokens)
{
struct winbindd_request request;
struct winbindd_response response;
@@ -4431,7 +4431,7 @@ static BOOL get_user_tokens(int *num_tokens, struct user_token **user_tokens)
return True;
}
-static BOOL get_user_tokens_from_file(FILE *f,
+static bool get_user_tokens_from_file(FILE *f,
int *num_tokens,
struct user_token **tokens)
{
@@ -4624,7 +4624,7 @@ static NTSTATUS rpc_share_allowedusers_internals(const DOM_SID *domain_sid,
const char **argv)
{
int ret;
- BOOL r;
+ bool r;
ENUM_HND hnd;
uint32 i;
FILE *f;
@@ -6310,12 +6310,12 @@ static int rpc_trustdom(int argc, const char **argv)
* Check if a server will take rpc commands
* @param flags Type of server to connect to (PDC, DMB, localhost)
* if the host is not explicitly specified
- * @return BOOL (true means rpc supported)
+ * @return bool (true means rpc supported)
*/
-BOOL net_rpc_check(unsigned flags)
+bool net_rpc_check(unsigned flags)
{
struct cli_state *cli;
- BOOL ret = False;
+ bool ret = False;
struct in_addr server_ip;
char *server_name = NULL;
NTSTATUS status;
diff --git a/source3/utils/net_rpc_audit.c b/source3/utils/net_rpc_audit.c
index 5e87470fc5..b7fda2b8e3 100644
--- a/source3/utils/net_rpc_audit.c
+++ b/source3/utils/net_rpc_audit.c
@@ -217,7 +217,7 @@ static NTSTATUS rpc_audit_enable_internal_ext(struct rpc_pipe_client *pipe_hnd,
TALLOC_CTX *mem_ctx,
int argc,
const char **argv,
- BOOL enable)
+ bool enable)
{
POLICY_HND pol;
NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
diff --git a/source3/utils/net_rpc_printer.c b/source3/utils/net_rpc_printer.c
index cba88370db..20821cd2e6 100644
--- a/source3/utils/net_rpc_printer.c
+++ b/source3/utils/net_rpc_printer.c
@@ -63,7 +63,7 @@ static void display_print_driver_3(DRIVER_INFO_3 *i1)
fstring defaultdatatype = "";
int length=0;
- BOOL valid = True;
+ bool valid = True;
if (i1 == NULL)
return;
@@ -172,8 +172,8 @@ NTSTATUS net_copy_fileattr(TALLOC_CTX *mem_ctx,
struct cli_state *cli_share_src,
struct cli_state *cli_share_dst,
const char *src_name, const char *dst_name,
- BOOL copy_acls, BOOL copy_attrs,
- BOOL copy_timestamps, BOOL is_file)
+ bool copy_acls, bool copy_attrs,
+ bool copy_timestamps, bool is_file)
{
NTSTATUS nt_status = NT_STATUS_UNSUCCESSFUL;
int fnum_src = 0;
@@ -324,8 +324,8 @@ NTSTATUS net_copy_file(TALLOC_CTX *mem_ctx,
struct cli_state *cli_share_src,
struct cli_state *cli_share_dst,
const char *src_name, const char *dst_name,
- BOOL copy_acls, BOOL copy_attrs,
- BOOL copy_timestamps, BOOL is_file)
+ bool copy_acls, bool copy_attrs,
+ bool copy_timestamps, bool is_file)
{
NTSTATUS nt_status = NT_STATUS_UNSUCCESSFUL;
int fnum_src = 0;
@@ -608,7 +608,7 @@ static NTSTATUS copy_print_driver_3(TALLOC_CTX *mem_ctx,
{
NTSTATUS nt_status = NT_STATUS_UNSUCCESSFUL;
int length = 0;
- BOOL valid = True;
+ bool valid = True;
fstring name = "";
fstring driverpath = "";
@@ -683,7 +683,7 @@ static NTSTATUS copy_print_driver_3(TALLOC_CTX *mem_ctx,
*
**/
-static BOOL net_spoolss_enum_printers(struct rpc_pipe_client *pipe_hnd,
+static bool net_spoolss_enum_printers(struct rpc_pipe_client *pipe_hnd,
TALLOC_CTX *mem_ctx,
char *name,
uint32 flags,
@@ -705,7 +705,7 @@ static BOOL net_spoolss_enum_printers(struct rpc_pipe_client *pipe_hnd,
return True;
}
-static BOOL net_spoolss_open_printer_ex(struct rpc_pipe_client *pipe_hnd,
+static bool net_spoolss_open_printer_ex(struct rpc_pipe_client *pipe_hnd,
TALLOC_CTX *mem_ctx,
const char *printername,
uint32 access_required,
@@ -748,7 +748,7 @@ static BOOL net_spoolss_open_printer_ex(struct rpc_pipe_client *pipe_hnd,
return True;
}
-static BOOL net_spoolss_getprinter(struct rpc_pipe_client *pipe_hnd,
+static bool net_spoolss_getprinter(struct rpc_pipe_client *pipe_hnd,
TALLOC_CTX *mem_ctx,
POLICY_HND *hnd,
uint32 level,
@@ -767,7 +767,7 @@ static BOOL net_spoolss_getprinter(struct rpc_pipe_client *pipe_hnd,
return True;
}
-static BOOL net_spoolss_setprinter(struct rpc_pipe_client *pipe_hnd,
+static bool net_spoolss_setprinter(struct rpc_pipe_client *pipe_hnd,
TALLOC_CTX *mem_ctx,
POLICY_HND *hnd,
uint32 level,
@@ -787,7 +787,7 @@ static BOOL net_spoolss_setprinter(struct rpc_pipe_client *pipe_hnd,
}
-static BOOL net_spoolss_setprinterdata(struct rpc_pipe_client *pipe_hnd,
+static bool net_spoolss_setprinterdata(struct rpc_pipe_client *pipe_hnd,
TALLOC_CTX *mem_ctx,
POLICY_HND *hnd,
REGISTRY_VALUE *value)
@@ -806,7 +806,7 @@ static BOOL net_spoolss_setprinterdata(struct rpc_pipe_client *pipe_hnd,
}
-static BOOL net_spoolss_enumprinterkey(struct rpc_pipe_client *pipe_hnd,
+static bool net_spoolss_enumprinterkey(struct rpc_pipe_client *pipe_hnd,
TALLOC_CTX *mem_ctx,
POLICY_HND *hnd,
const char *keyname,
@@ -825,7 +825,7 @@ static BOOL net_spoolss_enumprinterkey(struct rpc_pipe_client *pipe_hnd,
return True;
}
-static BOOL net_spoolss_enumprinterdataex(struct rpc_pipe_client *pipe_hnd,
+static bool net_spoolss_enumprinterdataex(struct rpc_pipe_client *pipe_hnd,
TALLOC_CTX *mem_ctx,
uint32 offered,
POLICY_HND *hnd,
@@ -846,7 +846,7 @@ static BOOL net_spoolss_enumprinterdataex(struct rpc_pipe_client *pipe_hnd,
}
-static BOOL net_spoolss_setprinterdataex(struct rpc_pipe_client *pipe_hnd,
+static bool net_spoolss_setprinterdataex(struct rpc_pipe_client *pipe_hnd,
TALLOC_CTX *mem_ctx,
POLICY_HND *hnd,
char *keyname,
@@ -866,7 +866,7 @@ static BOOL net_spoolss_setprinterdataex(struct rpc_pipe_client *pipe_hnd,
return True;
}
-static BOOL net_spoolss_enumforms(struct rpc_pipe_client *pipe_hnd,
+static bool net_spoolss_enumforms(struct rpc_pipe_client *pipe_hnd,
TALLOC_CTX *mem_ctx,
POLICY_HND *hnd,
int level,
@@ -887,7 +887,7 @@ static BOOL net_spoolss_enumforms(struct rpc_pipe_client *pipe_hnd,
return True;
}
-static BOOL net_spoolss_enumprinterdrivers (struct rpc_pipe_client *pipe_hnd,
+static bool net_spoolss_enumprinterdrivers (struct rpc_pipe_client *pipe_hnd,
TALLOC_CTX *mem_ctx,
uint32 level, const char *env,
uint32 *num_drivers,
@@ -908,7 +908,7 @@ static BOOL net_spoolss_enumprinterdrivers (struct rpc_pipe_client *pipe_hnd,
return True;
}
-static BOOL net_spoolss_getprinterdriver(struct rpc_pipe_client *pipe_hnd,
+static bool net_spoolss_getprinterdriver(struct rpc_pipe_client *pipe_hnd,
TALLOC_CTX *mem_ctx,
POLICY_HND *hnd, uint32 level,
const char *env, int version,
@@ -935,7 +935,7 @@ static BOOL net_spoolss_getprinterdriver(struct rpc_pipe_client *pipe_hnd,
}
-static BOOL net_spoolss_addprinterdriver(struct rpc_pipe_client *pipe_hnd,
+static bool net_spoolss_addprinterdriver(struct rpc_pipe_client *pipe_hnd,
TALLOC_CTX *mem_ctx, uint32 level,
PRINTER_DRIVER_CTR *ctr)
{
@@ -962,7 +962,7 @@ static BOOL net_spoolss_addprinterdriver(struct rpc_pipe_client *pipe_hnd,
* for a single printer or for all printers depending on argc/argv
**/
-static BOOL get_printer_info(struct rpc_pipe_client *pipe_hnd,
+static bool get_printer_info(struct rpc_pipe_client *pipe_hnd,
TALLOC_CTX *mem_ctx,
int level,
int argc,
@@ -1151,7 +1151,7 @@ static NTSTATUS rpc_printer_publish_internals_args(struct rpc_pipe_client *pipe_
pstring printername, sharename;
PRINTER_INFO_CTR ctr, ctr_pub;
POLICY_HND hnd;
- BOOL got_hnd = False;
+ bool got_hnd = False;
WERROR result;
const char *action_str;
@@ -1278,7 +1278,7 @@ NTSTATUS rpc_printer_publish_list_internals(const DOM_SID *domain_sid,
pstring guid;
PRINTER_INFO_CTR ctr, ctr_pub;
POLICY_HND hnd;
- BOOL got_hnd = False;
+ bool got_hnd = False;
int state;
if (!get_printer_info(pipe_hnd, mem_ctx, 2, argc, argv, &num_printers, &ctr))
@@ -1368,8 +1368,8 @@ NTSTATUS rpc_printer_migrate_security_internals(const DOM_SID *domain_sid,
uint32 num_printers;
uint32 level = 2;
pstring printername = "", sharename = "";
- BOOL got_hnd_src = False;
- BOOL got_hnd_dst = False;
+ bool got_hnd_src = False;
+ bool got_hnd_dst = False;
struct rpc_pipe_client *pipe_hnd_dst = NULL;
POLICY_HND hnd_src, hnd_dst;
PRINTER_INFO_CTR ctr_src, ctr_dst, ctr_enum;
@@ -1516,8 +1516,8 @@ NTSTATUS rpc_printer_migrate_forms_internals(const DOM_SID *domain_sid,
uint32 num_printers;
uint32 level = 1;
pstring printername = "", sharename = "";
- BOOL got_hnd_src = False;
- BOOL got_hnd_dst = False;
+ bool got_hnd_src = False;
+ bool got_hnd_dst = False;
struct rpc_pipe_client *pipe_hnd_dst = NULL;
POLICY_HND hnd_src, hnd_dst;
PRINTER_INFO_CTR ctr_enum, ctr_dst;
@@ -1691,10 +1691,10 @@ NTSTATUS rpc_printer_migrate_drivers_internals(const DOM_SID *domain_sid,
uint32 num_printers;
uint32 level = 3;
pstring printername = "", sharename = "";
- BOOL got_hnd_src = False;
- BOOL got_hnd_dst = False;
- BOOL got_src_driver_share = False;
- BOOL got_dst_driver_share = False;
+ bool got_hnd_src = False;
+ bool got_hnd_dst = False;
+ bool got_src_driver_share = False;
+ bool got_dst_driver_share = False;
struct rpc_pipe_client *pipe_hnd_dst = NULL;
POLICY_HND hnd_src, hnd_dst;
PRINTER_DRIVER_CTR drv_ctr_src, drv_ctr_dst;
@@ -1913,8 +1913,8 @@ NTSTATUS rpc_printer_migrate_printers_internals(const DOM_SID *domain_sid,
struct cli_state *cli_dst = NULL;
POLICY_HND hnd_dst, hnd_src;
pstring printername, sharename;
- BOOL got_hnd_src = False;
- BOOL got_hnd_dst = False;
+ bool got_hnd_src = False;
+ bool got_hnd_dst = False;
struct rpc_pipe_client *pipe_hnd_dst = NULL;
DEBUG(3,("copying printers\n"));
@@ -2063,8 +2063,8 @@ NTSTATUS rpc_printer_migrate_settings_internals(const DOM_SID *domain_sid,
uint32 num_printers, val_needed, data_needed;
uint32 level = 2;
pstring printername = "", sharename = "";
- BOOL got_hnd_src = False;
- BOOL got_hnd_dst = False;
+ bool got_hnd_src = False;
+ bool got_hnd_dst = False;
struct rpc_pipe_client *pipe_hnd_dst = NULL;
POLICY_HND hnd_src, hnd_dst;
PRINTER_INFO_CTR ctr_enum, ctr_dst, ctr_dst_publish;
diff --git a/source3/utils/net_rpc_registry.c b/source3/utils/net_rpc_registry.c
index c43b5334e8..915ce5f9aa 100644
--- a/source3/utils/net_rpc_registry.c
+++ b/source3/utils/net_rpc_registry.c
@@ -22,7 +22,7 @@
#include "regfio.h"
#include "reg_objects.h"
-static BOOL reg_hive_key(const char *fullname, uint32 *reg_type,
+static bool reg_hive_key(const char *fullname, uint32 *reg_type,
const char **key_name)
{
const char *sep;
@@ -802,7 +802,7 @@ static void dump_values( REGF_NK_REC *nk )
/********************************************************************
********************************************************************/
-static BOOL dump_registry_tree( REGF_FILE *file, REGF_NK_REC *nk, const char *parent )
+static bool dump_registry_tree( REGF_FILE *file, REGF_NK_REC *nk, const char *parent )
{
REGF_NK_REC *key;
pstring regpath;
@@ -823,7 +823,7 @@ static BOOL dump_registry_tree( REGF_FILE *file, REGF_NK_REC *nk, const char *pa
/********************************************************************
********************************************************************/
-static BOOL write_registry_tree( REGF_FILE *infile, REGF_NK_REC *nk,
+static bool write_registry_tree( REGF_FILE *infile, REGF_NK_REC *nk,
REGF_NK_REC *parent, REGF_FILE *outfile,
const char *parentpath )
{
diff --git a/source3/utils/net_rpc_samsync.c b/source3/utils/net_rpc_samsync.c
index 72b7f63cc4..2b5eac6999 100644
--- a/source3/utils/net_rpc_samsync.c
+++ b/source3/utils/net_rpc_samsync.c
@@ -583,7 +583,7 @@ static NTSTATUS fetch_group_info(uint32 rid, SAM_GROUP_INFO *delta)
DOM_SID group_sid;
fstring sid_string;
GROUP_MAP map;
- BOOL insert = True;
+ bool insert = True;
unistr2_to_ascii(name, &delta->uni_grp_name, sizeof(name));
unistr2_to_ascii(comment, &delta->uni_grp_desc, sizeof(comment));
@@ -714,7 +714,7 @@ static NTSTATUS fetch_group_mem_info(uint32 rid, SAM_GROUP_MEM_INFO *delta)
unix_members = grp->gr_mem;
while (*unix_members) {
- BOOL is_nt_member = False;
+ bool is_nt_member = False;
for (i=0; i<delta->num_members; i++) {
if (nt_members[i] == NULL) {
/* This was a primary group */
@@ -736,7 +736,7 @@ static NTSTATUS fetch_group_mem_info(uint32 rid, SAM_GROUP_MEM_INFO *delta)
}
for (i=0; i<delta->num_members; i++) {
- BOOL is_unix_member = False;
+ bool is_unix_member = False;
if (nt_members[i] == NULL) {
/* This was the primary group */
@@ -774,7 +774,7 @@ static NTSTATUS fetch_alias_info(uint32 rid, SAM_ALIAS_INFO *delta,
DOM_SID alias_sid;
fstring sid_string;
GROUP_MAP map;
- BOOL insert = True;
+ bool insert = True;
unistr2_to_ascii(name, &delta->uni_als_name, sizeof(name));
unistr2_to_ascii(comment, &delta->uni_als_desc, sizeof(comment));
@@ -1338,7 +1338,7 @@ static int fprintf_attr(FILE *add_fd, const char *attr_name,
va_list ap;
char *value, *p, *base64;
DATA_BLOB base64_blob;
- BOOL do_base64 = False;
+ bool do_base64 = False;
int res;
va_start(ap, fmt);
@@ -1355,7 +1355,7 @@ static int fprintf_attr(FILE *add_fd, const char *attr_name,
}
if (!do_base64) {
- BOOL only_whitespace = True;
+ bool only_whitespace = True;
for (p=value; *p; p++) {
/*
* I know that this not multibyte safe, but we break
diff --git a/source3/utils/net_rpc_sh_acct.c b/source3/utils/net_rpc_sh_acct.c
index 5acc2fb7bc..ac0ffca1f3 100644
--- a/source3/utils/net_rpc_sh_acct.c
+++ b/source3/utils/net_rpc_sh_acct.c
@@ -29,7 +29,7 @@ static NTSTATUS rpc_sh_acct_do(TALLOC_CTX *mem_ctx,
struct rpc_sh_ctx *ctx,
struct rpc_pipe_client *pipe_hnd,
int argc, const char **argv,
- BOOL (*fn)(TALLOC_CTX *mem_ctx,
+ int (*fn)(TALLOC_CTX *mem_ctx,
struct rpc_sh_ctx *ctx,
SAM_UNK_INFO_1 *i1,
SAM_UNK_INFO_3 *i3,
diff --git a/source3/utils/net_rpc_shell.c b/source3/utils/net_rpc_shell.c
index 206e18776b..c9d57fcab7 100644
--- a/source3/utils/net_rpc_shell.c
+++ b/source3/utils/net_rpc_shell.c
@@ -45,7 +45,7 @@ static char **completion_fn(const char *text, int start, int end)
ADD_TO_ARRAY(NULL, char *, SMB_STRDUP(text), &cmds, &n_cmds);
for (c = this_ctx->cmds; c->name != NULL; c++) {
- BOOL match = (strncmp(text, c->name, strlen(text)) == 0);
+ bool match = (strncmp(text, c->name, strlen(text)) == 0);
if (match) {
ADD_TO_ARRAY(NULL, char *, SMB_STRDUP(c->name),
@@ -92,7 +92,7 @@ static NTSTATUS net_sh_run(struct rpc_sh_ctx *ctx, struct rpc_sh_cmd *cmd,
return status;
}
-static BOOL net_sh_process(struct rpc_sh_ctx *ctx,
+static bool net_sh_process(struct rpc_sh_ctx *ctx,
int argc, const char **argv)
{
struct rpc_sh_cmd *c;
diff --git a/source3/utils/net_sam.c b/source3/utils/net_sam.c
index 8f6ccffc51..b7e21c6849 100644
--- a/source3/utils/net_sam.c
+++ b/source3/utils/net_sam.c
@@ -26,7 +26,7 @@
*/
static int net_sam_userset(int argc, const char **argv, const char *field,
- BOOL (*fn)(struct samu *, const char *,
+ bool (*fn)(struct samu *, const char *,
enum pdb_value_state))
{
struct samu *sam_acct = NULL;
@@ -1108,7 +1108,7 @@ static int net_sam_listmem(int argc, const char **argv)
static int net_sam_do_list(int argc, const char **argv,
struct pdb_search *search, const char *what)
{
- BOOL verbose = (argc == 1);
+ bool verbose = (argc == 1);
if ((argc > 1) ||
((argc == 1) && !strequal(argv[0], "verbose"))) {
diff --git a/source3/utils/net_status.c b/source3/utils/net_status.c
index eae1fe7e3f..4a3c5895a7 100644
--- a/source3/utils/net_status.c
+++ b/source3/utils/net_status.c
@@ -22,7 +22,7 @@
static int show_session(TDB_CONTEXT *tdb, TDB_DATA kbuf, TDB_DATA dbuf,
void *state)
{
- BOOL *parseable = (BOOL *)state;
+ bool *parseable = (bool *)state;
struct sessionid sessionid;
if (dbuf.dsize != sizeof(sessionid))
@@ -52,7 +52,7 @@ static int show_session(TDB_CONTEXT *tdb, TDB_DATA kbuf, TDB_DATA dbuf,
static int net_status_sessions(int argc, const char **argv)
{
TDB_CONTEXT *tdb;
- BOOL parseable;
+ bool parseable;
if (argc == 0) {
parseable = False;
@@ -140,7 +140,7 @@ static int show_share_parseable(struct db_record *rec,
{
struct sessionids *ids = (struct sessionids *)state;
int i;
- BOOL guest = True;
+ bool guest = True;
if (crec->cnum == -1)
return 0;
diff --git a/source3/utils/net_usershare.c b/source3/utils/net_usershare.c
index 9b276141a6..ea817b31ad 100644
--- a/source3/utils/net_usershare.c
+++ b/source3/utils/net_usershare.c
@@ -188,7 +188,7 @@ static struct file_list *flist;
/***************************************************************************
***************************************************************************/
-static int get_share_list(TALLOC_CTX *ctx, const char *wcard, BOOL only_ours)
+static int get_share_list(TALLOC_CTX *ctx, const char *wcard, bool only_ours)
{
SMB_STRUCT_DIR *dp;
SMB_STRUCT_DIRENT *de;
@@ -304,7 +304,7 @@ static int info_fn(struct file_list *fl, void *priv)
int num_aces;
char sep_str[2];
enum usershare_err us_err;
- BOOL guest_ok = False;
+ bool guest_ok = False;
sep_str[0] = *lp_winbind_separator();
sep_str[1] = '\0';
@@ -419,7 +419,7 @@ static int info_fn(struct file_list *fl, void *priv)
static int net_usershare_info(int argc, const char **argv)
{
fstring wcard;
- BOOL only_ours = True;
+ bool only_ours = True;
int ret = -1;
struct us_priv_info pi;
TALLOC_CTX *ctx;
@@ -536,7 +536,7 @@ static int net_usershare_add(int argc, const char **argv)
const char *pacl;
size_t to_write;
uid_t myeuid = geteuid();
- BOOL guest_ok = False;
+ bool guest_ok = False;
int num_usershares;
us_comment = "";
@@ -857,7 +857,7 @@ static int list_fn(struct file_list *fl, void *priv)
static int net_usershare_list(int argc, const char **argv)
{
fstring wcard;
- BOOL only_ours = True;
+ bool only_ours = True;
int ret = -1;
struct us_priv_info pi;
TALLOC_CTX *ctx;
diff --git a/source3/utils/net_util.c b/source3/utils/net_util.c
index e418072569..c08eae3337 100644
--- a/source3/utils/net_util.c
+++ b/source3/utils/net_util.c
@@ -21,7 +21,7 @@
#include "includes.h"
#include "utils/net.h"
-BOOL is_valid_policy_hnd(const POLICY_HND *hnd)
+bool is_valid_policy_hnd(const POLICY_HND *hnd)
{
POLICY_HND tmp;
ZERO_STRUCT(tmp);
diff --git a/source3/utils/netlookup.c b/source3/utils/netlookup.c
index 998e77c68e..315a89d5a8 100644
--- a/source3/utils/netlookup.c
+++ b/source3/utils/netlookup.c
@@ -27,7 +27,7 @@
********************************************************/
struct con_struct {
- BOOL failed_connect;
+ bool failed_connect;
NTSTATUS err;
struct cli_state *cli;
struct rpc_pipe_client *lsapipe;
diff --git a/source3/utils/nmblookup.c b/source3/utils/nmblookup.c
index 52d7ad1a3c..6d17fb7982 100644
--- a/source3/utils/nmblookup.c
+++ b/source3/utils/nmblookup.c
@@ -21,22 +21,22 @@
#include "includes.h"
-extern BOOL AllowDebugChange;
+extern bool AllowDebugChange;
-static BOOL give_flags = False;
-static BOOL use_bcast = True;
-static BOOL got_bcast = False;
+static bool give_flags = False;
+static bool use_bcast = True;
+static bool got_bcast = False;
static struct in_addr bcast_addr;
-static BOOL recursion_desired = False;
-static BOOL translate_addresses = False;
+static bool recursion_desired = False;
+static bool translate_addresses = False;
static int ServerFD= -1;
static int RootPort = False;
-static BOOL find_status=False;
+static bool find_status=False;
/****************************************************************************
open the socket communication
**************************************************************************/
-static BOOL open_sockets(void)
+static bool open_sockets(void)
{
ServerFD = open_socket_in( SOCK_DGRAM,
(RootPort ? 137 : 0),
@@ -130,7 +130,7 @@ static void do_node_status(int fd, const char *name, int type, struct in_addr ip
/****************************************************************************
send out one query
****************************************************************************/
-static BOOL query_one(const char *lookup, unsigned int lookup_type)
+static bool query_one(const char *lookup, unsigned int lookup_type)
{
int j, count, flags = 0;
struct in_addr *ip_list=NULL;
@@ -193,8 +193,8 @@ int main(int argc,char *argv[])
int opt;
unsigned int lookup_type = 0x0;
fstring lookup;
- static BOOL find_master=False;
- static BOOL lookup_by_ip = False;
+ static bool find_master=False;
+ static bool lookup_by_ip = False;
poptContext pc;
TALLOC_CTX *frame = talloc_stackframe();
diff --git a/source3/utils/ntlm_auth.c b/source3/utils/ntlm_auth.c
index 7daf83afeb..b51827fd83 100644
--- a/source3/utils/ntlm_auth.c
+++ b/source3/utils/ntlm_auth.c
@@ -100,7 +100,7 @@ static const char *require_membership_of_sid;
static char winbind_separator(void)
{
struct winbindd_response response;
- static BOOL got_sep;
+ static bool got_sep;
static char sep;
if (got_sep)
@@ -193,7 +193,7 @@ DATA_BLOB get_challenge(void)
/* Copy of parse_domain_user from winbindd_util.c. Parse a string of the
form DOMAIN/user into a domain and a user */
-static BOOL parse_ntlm_auth_domain_user(const char *domuser, fstring domain,
+static bool parse_ntlm_auth_domain_user(const char *domuser, fstring domain,
fstring user)
{
@@ -211,7 +211,7 @@ static BOOL parse_ntlm_auth_domain_user(const char *domuser, fstring domain,
return True;
}
-static BOOL get_require_membership_sid(void) {
+static bool get_require_membership_sid(void) {
struct winbindd_request request;
struct winbindd_response response;
@@ -252,8 +252,8 @@ static BOOL get_require_membership_sid(void) {
}
/* Authenticate a user with a plaintext password */
-static BOOL check_plaintext_auth(const char *user, const char *pass,
- BOOL stdout_diagnostics)
+static bool check_plaintext_auth(const char *user, const char *pass,
+ bool stdout_diagnostics)
{
struct winbindd_request request;
struct winbindd_response response;
@@ -682,7 +682,7 @@ static void manage_squid_ntlmssp_request(enum stdio_helper_mode stdio_helper_mod
static NTLMSSP_STATE *ntlmssp_state = NULL;
static char* want_feature_list = NULL;
static uint32 neg_flags = 0;
- static BOOL have_session_key = False;
+ static bool have_session_key = False;
static DATA_BLOB session_key;
DATA_BLOB request, reply;
NTSTATUS nt_status;
@@ -804,11 +804,11 @@ static void manage_client_ntlmssp_request(enum stdio_helper_mode stdio_helper_mo
static DATA_BLOB initial_message;
static char* want_feature_list = NULL;
static uint32 neg_flags = 0;
- static BOOL have_session_key = False;
+ static bool have_session_key = False;
static DATA_BLOB session_key;
DATA_BLOB request, reply;
NTSTATUS nt_status;
- BOOL first = False;
+ bool first = False;
if (!opt_username || !*opt_username) {
x_fprintf(x_stderr, "username must be specified!\n\n");
@@ -1272,7 +1272,7 @@ static void manage_gss_spnego_request(enum stdio_helper_mode stdio_helper_mode,
static NTLMSSP_STATE *client_ntlmssp_state = NULL;
-static BOOL manage_client_ntlmssp_init(SPNEGO_DATA spnego)
+static bool manage_client_ntlmssp_init(SPNEGO_DATA spnego)
{
NTSTATUS status;
DATA_BLOB null_blob = data_blob_null;
@@ -1393,7 +1393,7 @@ static void manage_client_ntlmssp_targ(SPNEGO_DATA spnego)
#ifdef HAVE_KRB5
-static BOOL manage_client_krb5_init(SPNEGO_DATA spnego)
+static bool manage_client_krb5_init(SPNEGO_DATA spnego)
{
char *principal;
DATA_BLOB tkt, to_server;
@@ -1652,8 +1652,8 @@ static void manage_ntlm_server_1_request(enum stdio_helper_mode stdio_helper_mod
static char *username;
static char *domain;
static char *plaintext_password;
- static BOOL ntlm_server_1_user_session_key;
- static BOOL ntlm_server_1_lm_session_key;
+ static bool ntlm_server_1_user_session_key;
+ static bool ntlm_server_1_lm_session_key;
if (strequal(buf, ".")) {
if (!full_username && !username) {
@@ -2049,7 +2049,7 @@ static void manage_squid_request(enum stdio_helper_mode helper_mode, stdio_helpe
char buf[SQUID_BUFFER_SIZE+1];
int length;
char *c;
- static BOOL err;
+ static bool err;
/* this is not a typo - x_fgets doesn't work too well under squid */
if (fgets(buf, sizeof(buf)-1, stdin) == NULL) {
@@ -2101,7 +2101,7 @@ static void squid_stream(enum stdio_helper_mode stdio_mode, stdio_helper_functio
/* Authenticate a user with a challenge/response */
-static BOOL check_auth_crap(void)
+static bool check_auth_crap(void)
{
NTSTATUS nt_status;
uint32 flags = 0;
diff --git a/source3/utils/ntlm_auth_diagnostics.c b/source3/utils/ntlm_auth_diagnostics.c
index 0762e6c8ae..846b5ef42b 100644
--- a/source3/utils/ntlm_auth_diagnostics.c
+++ b/source3/utils/ntlm_auth_diagnostics.c
@@ -44,9 +44,9 @@ enum ntlm_break {
* Test the normal 'LM and NTLM' combination
*/
-static BOOL test_lm_ntlm_broken(enum ntlm_break break_which)
+static bool test_lm_ntlm_broken(enum ntlm_break break_which)
{
- BOOL pass = True;
+ bool pass = True;
NTSTATUS nt_status;
uint32 flags = 0;
DATA_BLOB lm_response = data_blob(NULL, 24);
@@ -149,7 +149,7 @@ static BOOL test_lm_ntlm_broken(enum ntlm_break break_which)
* Test LM authentication, no NT response supplied
*/
-static BOOL test_lm(void)
+static bool test_lm(void)
{
return test_lm_ntlm_broken(NO_NT);
@@ -159,7 +159,7 @@ static BOOL test_lm(void)
* Test the NTLM response only, no LM.
*/
-static BOOL test_ntlm(void)
+static bool test_ntlm(void)
{
return test_lm_ntlm_broken(NO_LM);
}
@@ -168,9 +168,9 @@ static BOOL test_ntlm(void)
* Test the NTLM response only, but in the LM field.
*/
-static BOOL test_ntlm_in_lm(void)
+static bool test_ntlm_in_lm(void)
{
- BOOL pass = True;
+ bool pass = True;
NTSTATUS nt_status;
uint32 flags = 0;
DATA_BLOB nt_response = data_blob(NULL, 24);
@@ -234,9 +234,9 @@ static BOOL test_ntlm_in_lm(void)
* Test the NTLM response only, but in the both the NT and LM fields.
*/
-static BOOL test_ntlm_in_both(void)
+static bool test_ntlm_in_both(void)
{
- BOOL pass = True;
+ bool pass = True;
NTSTATUS nt_status;
uint32 flags = 0;
DATA_BLOB nt_response = data_blob(NULL, 24);
@@ -308,9 +308,9 @@ static BOOL test_ntlm_in_both(void)
* Test the NTLMv2 and LMv2 responses
*/
-static BOOL test_lmv2_ntlmv2_broken(enum ntlm_break break_which)
+static bool test_lmv2_ntlmv2_broken(enum ntlm_break break_which)
{
- BOOL pass = True;
+ bool pass = True;
NTSTATUS nt_status;
uint32 flags = 0;
DATA_BLOB ntlmv2_response = data_blob_null;
@@ -389,7 +389,7 @@ static BOOL test_lmv2_ntlmv2_broken(enum ntlm_break break_which)
* Test the NTLMv2 and LMv2 responses
*/
-static BOOL test_lmv2_ntlmv2(void)
+static bool test_lmv2_ntlmv2(void)
{
return test_lmv2_ntlmv2_broken(BREAK_NONE);
}
@@ -398,7 +398,7 @@ static BOOL test_lmv2_ntlmv2(void)
* Test the LMv2 response only
*/
-static BOOL test_lmv2(void)
+static bool test_lmv2(void)
{
return test_lmv2_ntlmv2_broken(NO_NT);
}
@@ -407,37 +407,37 @@ static BOOL test_lmv2(void)
* Test the NTLMv2 response only
*/
-static BOOL test_ntlmv2(void)
+static bool test_ntlmv2(void)
{
return test_lmv2_ntlmv2_broken(NO_LM);
}
-static BOOL test_lm_ntlm(void)
+static bool test_lm_ntlm(void)
{
return test_lm_ntlm_broken(BREAK_NONE);
}
-static BOOL test_ntlm_lm_broken(void)
+static bool test_ntlm_lm_broken(void)
{
return test_lm_ntlm_broken(BREAK_LM);
}
-static BOOL test_ntlm_ntlm_broken(void)
+static bool test_ntlm_ntlm_broken(void)
{
return test_lm_ntlm_broken(BREAK_NT);
}
-static BOOL test_ntlmv2_lmv2_broken(void)
+static bool test_ntlmv2_lmv2_broken(void)
{
return test_lmv2_ntlmv2_broken(BREAK_LM);
}
-static BOOL test_ntlmv2_ntlmv2_broken(void)
+static bool test_ntlmv2_ntlmv2_broken(void)
{
return test_lmv2_ntlmv2_broken(BREAK_NT);
}
-static BOOL test_plaintext(enum ntlm_break break_which)
+static bool test_plaintext(enum ntlm_break break_which)
{
NTSTATUS nt_status;
uint32 flags = 0;
@@ -526,23 +526,23 @@ static BOOL test_plaintext(enum ntlm_break break_which)
return break_which != BREAK_NT;
}
-static BOOL test_plaintext_none_broken(void) {
+static bool test_plaintext_none_broken(void) {
return test_plaintext(BREAK_NONE);
}
-static BOOL test_plaintext_lm_broken(void) {
+static bool test_plaintext_lm_broken(void) {
return test_plaintext(BREAK_LM);
}
-static BOOL test_plaintext_nt_broken(void) {
+static bool test_plaintext_nt_broken(void) {
return test_plaintext(BREAK_NT);
}
-static BOOL test_plaintext_nt_only(void) {
+static bool test_plaintext_nt_only(void) {
return test_plaintext(NO_LM);
}
-static BOOL test_plaintext_lm_only(void) {
+static bool test_plaintext_lm_only(void) {
return test_plaintext(NO_NT);
}
@@ -565,7 +565,7 @@ static BOOL test_plaintext_lm_only(void) {
*/
static const struct ntlm_tests {
- BOOL (*fn)(void);
+ bool (*fn)(void);
const char *name;
} test_table[] = {
{test_lm, "LM"},
@@ -588,10 +588,10 @@ static const struct ntlm_tests {
{NULL, NULL}
};
-BOOL diagnose_ntlm_auth(void)
+bool diagnose_ntlm_auth(void)
{
unsigned int i;
- BOOL pass = True;
+ bool pass = True;
for (i=0; test_table[i].fn; i++) {
if (!test_table[i].fn()) {
diff --git a/source3/utils/passwd_util.c b/source3/utils/passwd_util.c
index 789f44d99e..293f16364e 100644
--- a/source3/utils/passwd_util.c
+++ b/source3/utils/passwd_util.c
@@ -56,7 +56,7 @@ char *stdin_new_passwd( void)
Used if the '-s' (smbpasswd) or '-t' (pdbedit) option is set
to silently get passwords to enable scripting.
*************************************************************/
-char *get_pass( const char *prompt, BOOL stdin_get)
+char *get_pass( const char *prompt, bool stdin_get)
{
char *p;
if (stdin_get) {
diff --git a/source3/utils/pdbedit.c b/source3/utils/pdbedit.c
index 66a706d1ce..b87e88e406 100644
--- a/source3/utils/pdbedit.c
+++ b/source3/utils/pdbedit.c
@@ -214,7 +214,7 @@ static int export_account_policies (struct pdb_methods *in, struct pdb_methods *
Print info from sam structure
**********************************************************/
-static int print_sam_info (struct samu *sam_pwent, BOOL verbosity, BOOL smbpwdstyle)
+static int print_sam_info (struct samu *sam_pwent, bool verbosity, bool smbpwdstyle)
{
uid_t uid;
time_t tmp;
@@ -298,10 +298,10 @@ static int print_sam_info (struct samu *sam_pwent, BOOL verbosity, BOOL smbpwdst
Get an Print User Info
**********************************************************/
-static int print_user_info (struct pdb_methods *in, const char *username, BOOL verbosity, BOOL smbpwdstyle)
+static int print_user_info (struct pdb_methods *in, const char *username, bool verbosity, bool smbpwdstyle)
{
struct samu *sam_pwent=NULL;
- BOOL ret;
+ bool ret;
if ( (sam_pwent = samu_new( NULL )) == NULL ) {
return -1;
@@ -324,10 +324,10 @@ static int print_user_info (struct pdb_methods *in, const char *username, BOOL v
/*********************************************************
List Users
**********************************************************/
-static int print_users_list (struct pdb_methods *in, BOOL verbosity, BOOL smbpwdstyle)
+static int print_users_list (struct pdb_methods *in, bool verbosity, bool smbpwdstyle)
{
struct samu *sam_pwent=NULL;
- BOOL check;
+ bool check;
check = NT_STATUS_IS_OK(in->setsampwent(in, False, 0));
if (!check) {
@@ -362,7 +362,7 @@ static int print_users_list (struct pdb_methods *in, BOOL verbosity, BOOL smbpwd
static int fix_users_list (struct pdb_methods *in)
{
struct samu *sam_pwent=NULL;
- BOOL check;
+ bool check;
check = NT_STATUS_IS_OK(in->setsampwent(in, False, 0));
if (!check) {
@@ -406,11 +406,11 @@ static int set_user_info (struct pdb_methods *in, const char *username,
const char *drive, const char *script,
const char *profile, const char *account_control,
const char *user_sid, const char *user_domain,
- const BOOL badpw, const BOOL hours)
+ const bool badpw, const bool hours)
{
- BOOL updated_autolock = False, updated_badpw = False;
+ bool updated_autolock = False, updated_badpw = False;
struct samu *sam_pwent=NULL;
- BOOL ret;
+ bool ret;
if ( (sam_pwent = samu_new( NULL )) == NULL ) {
return 1;
@@ -510,7 +510,7 @@ static int set_user_info (struct pdb_methods *in, const char *username,
static int new_user (struct pdb_methods *in, const char *username,
const char *fullname, const char *homedir,
const char *drive, const char *script,
- const char *profile, char *user_sid, BOOL stdin_get)
+ const char *profile, char *user_sid, bool stdin_get)
{
struct samu *sam_pwent;
char *password1, *password2;
@@ -723,13 +723,13 @@ static int delete_machine_entry (struct pdb_methods *in, const char *machinename
int main (int argc, char **argv)
{
- static BOOL list_users = False;
- static BOOL verbose = False;
- static BOOL spstyle = False;
- static BOOL machine = False;
- static BOOL add_user = False;
- static BOOL delete_user = False;
- static BOOL modify_user = False;
+ static bool list_users = False;
+ static bool verbose = False;
+ static bool spstyle = False;
+ static bool machine = False;
+ static bool add_user = False;
+ static bool delete_user = False;
+ static bool modify_user = False;
uint32 setparms, checkparms;
int opt;
static char *full_name = NULL;
@@ -740,10 +740,10 @@ int main (int argc, char **argv)
static char *backend = NULL;
static char *backend_in = NULL;
static char *backend_out = NULL;
- static BOOL transfer_groups = False;
- static BOOL transfer_account_policies = False;
- static BOOL reset_account_policies = False;
- static BOOL force_initialised_password = False;
+ static bool transfer_groups = False;
+ static bool transfer_account_policies = False;
+ static bool reset_account_policies = False;
+ static bool force_initialised_password = False;
static char *logon_script = NULL;
static char *profile_path = NULL;
static char *user_domain = NULL;
@@ -751,11 +751,11 @@ int main (int argc, char **argv)
static char *account_policy = NULL;
static char *user_sid = NULL;
static long int account_policy_value = 0;
- BOOL account_policy_value_set = False;
- static BOOL badpw_reset = False;
- static BOOL hours_reset = False;
+ bool account_policy_value_set = False;
+ static bool badpw_reset = False;
+ static bool hours_reset = False;
static char *pwd_time_format = NULL;
- static BOOL pw_from_stdin = False;
+ static bool pw_from_stdin = False;
struct pdb_methods *bin, *bout, *bdef;
char *configfile = NULL;
TALLOC_CTX *frame = talloc_stackframe();
diff --git a/source3/utils/profiles.c b/source3/utils/profiles.c
index 921af56657..d6094f8bae 100644
--- a/source3/utils/profiles.c
+++ b/source3/utils/profiles.c
@@ -26,7 +26,7 @@
DOM_SID old_sid, new_sid;
int change = 0, new_val = 0;
-BOOL opt_verbose = False;
+bool opt_verbose = False;
/********************************************************************
********************************************************************/
@@ -55,11 +55,11 @@ static void verbose_output(const char *format, ...)
/********************************************************************
********************************************************************/
-static BOOL swap_sid_in_acl( SEC_DESC *sd, DOM_SID *s1, DOM_SID *s2 )
+static bool swap_sid_in_acl( SEC_DESC *sd, DOM_SID *s1, DOM_SID *s2 )
{
SEC_ACL *acl;
int i;
- BOOL update = False;
+ bool update = False;
verbose_output(" Owner SID: %s\n", sid_string_static(sd->owner_sid));
if ( sid_equal( sd->owner_sid, s1 ) ) {
@@ -111,7 +111,7 @@ static BOOL swap_sid_in_acl( SEC_DESC *sd, DOM_SID *s1, DOM_SID *s2 )
/********************************************************************
********************************************************************/
-static BOOL copy_registry_tree( REGF_FILE *infile, REGF_NK_REC *nk,
+static bool copy_registry_tree( REGF_FILE *infile, REGF_NK_REC *nk,
REGF_NK_REC *parent, REGF_FILE *outfile,
const char *parentpath )
{
diff --git a/source3/utils/sharesec.c b/source3/utils/sharesec.c
index 45bde5cf8e..e03222b005 100644
--- a/source3/utils/sharesec.c
+++ b/source3/utils/sharesec.c
@@ -144,7 +144,7 @@ static void sec_desc_print(FILE *f, SEC_DESC *sd)
parse an ACE in the same format as print_ace()
********************************************************************/
-static BOOL parse_ace(SEC_ACE *ace, const char *orig_str)
+static bool parse_ace(SEC_ACE *ace, const char *orig_str)
{
char *p;
const char *cp;
@@ -243,7 +243,7 @@ static BOOL parse_ace(SEC_ACE *ace, const char *orig_str)
p = tok;
while(*p) {
- BOOL found = False;
+ bool found = False;
for (v = special_values; v->perm; v++) {
if (v->perm[0] == *p) {
@@ -319,7 +319,7 @@ static SEC_DESC* parse_acl_string(TALLOC_CTX *mem_ctx, const char *szACL, size_t
}
/* add an ACE to a list of ACEs in a SEC_ACL */
-static BOOL add_ace(TALLOC_CTX *mem_ctx, SEC_ACL **the_acl, SEC_ACE *ace)
+static bool add_ace(TALLOC_CTX *mem_ctx, SEC_ACL **the_acl, SEC_ACE *ace)
{
SEC_ACL *new_ace;
SEC_ACE *aces;
@@ -412,7 +412,7 @@ static int change_share_sec(TALLOC_CTX *mem_ctx, const char *sharename, char *th
return 0;
case SMB_ACL_DELETE:
for (i=0;sd->dacl && i<sd->dacl->num_aces;i++) {
- BOOL found = False;
+ bool found = False;
for (j=0;old->dacl && j<old->dacl->num_aces;j++) {
if (sec_ace_equal(&sd->dacl->aces[i], &old->dacl->aces[j])) {
@@ -436,7 +436,7 @@ static int change_share_sec(TALLOC_CTX *mem_ctx, const char *sharename, char *th
break;
case SMB_ACL_MODIFY:
for (i=0;sd->dacl && i<sd->dacl->num_aces;i++) {
- BOOL found = False;
+ bool found = False;
for (j=0;old->dacl && j<old->dacl->num_aces;j++) {
if (sid_equal(&sd->dacl->aces[i].trustee,
@@ -490,10 +490,10 @@ int main(int argc, const char *argv[])
enum acl_mode mode = SMB_ACL_SET;
static char *the_acl = NULL;
fstring sharename;
- BOOL force_acl = False;
+ bool force_acl = False;
int snum;
poptContext pc;
- BOOL initialize_sid = False;
+ bool initialize_sid = False;
struct poptOption long_options[] = {
POPT_AUTOHELP
{ "remove", 'r', POPT_ARG_STRING, &the_acl, 'r', "Delete an ACE", "ACL" },
diff --git a/source3/utils/smbcacls.c b/source3/utils/smbcacls.c
index dbb067477e..affebf38be 100644
--- a/source3/utils/smbcacls.c
+++ b/source3/utils/smbcacls.c
@@ -32,7 +32,7 @@ static TALLOC_CTX *ctx;
/* numeric is set when the user wants numeric SIDs and ACEs rather
than going via LSA calls to resolve them */
-static BOOL numeric = False;
+static bool numeric = False;
enum acl_mode {SMB_ACL_SET, SMB_ACL_DELETE, SMB_ACL_MODIFY, SMB_ACL_ADD };
enum chown_mode {REQUEST_NONE, REQUEST_CHOWN, REQUEST_CHGRP};
@@ -65,13 +65,13 @@ static const struct perm_value standard_values[] = {
static struct cli_state *global_hack_cli;
static struct rpc_pipe_client *global_pipe_hnd;
static POLICY_HND pol;
-static BOOL got_policy_hnd;
+static bool got_policy_hnd;
static struct cli_state *connect_one(const char *share);
/* Open cli connection and policy handle */
-static BOOL cacls_open_policy_hnd(void)
+static bool cacls_open_policy_hnd(void)
{
/* Initialise cli LSA connection */
@@ -132,11 +132,11 @@ static void SidToString(fstring str, DOM_SID *sid)
}
/* convert a string to a SID, either numeric or username/group */
-static BOOL StringToSid(DOM_SID *sid, const char *str)
+static bool StringToSid(DOM_SID *sid, const char *str)
{
enum lsa_SidType *types = NULL;
DOM_SID *sids = NULL;
- BOOL result = True;
+ bool result = True;
if (strncmp(str, "S-", 2) == 0) {
return string_to_sid(sid, str);
@@ -225,7 +225,7 @@ static void print_ace(FILE *f, SEC_ACE *ace)
/* parse an ACE in the same format as print_ace() */
-static BOOL parse_ace(SEC_ACE *ace, const char *orig_str)
+static bool parse_ace(SEC_ACE *ace, const char *orig_str)
{
char *p;
const char *cp;
@@ -323,7 +323,7 @@ static BOOL parse_ace(SEC_ACE *ace, const char *orig_str)
p = tok;
while(*p) {
- BOOL found = False;
+ bool found = False;
for (v = special_values; v->perm; v++) {
if (v->perm[0] == *p) {
@@ -354,7 +354,7 @@ static BOOL parse_ace(SEC_ACE *ace, const char *orig_str)
}
/* add an ACE to a list of ACEs in a SEC_ACL */
-static BOOL add_ace(SEC_ACL **the_acl, SEC_ACE *ace)
+static bool add_ace(SEC_ACL **the_acl, SEC_ACE *ace)
{
SEC_ACL *new_ace;
SEC_ACE *aces;
@@ -661,7 +661,7 @@ static int cacl_set(struct cli_state *cli, char *filename,
switch (mode) {
case SMB_ACL_DELETE:
for (i=0;sd->dacl && i<sd->dacl->num_aces;i++) {
- BOOL found = False;
+ bool found = False;
for (j=0;old->dacl && j<old->dacl->num_aces;j++) {
if (sec_ace_equal(&sd->dacl->aces[i],
@@ -686,7 +686,7 @@ static int cacl_set(struct cli_state *cli, char *filename,
case SMB_ACL_MODIFY:
for (i=0;sd->dacl && i<sd->dacl->num_aces;i++) {
- BOOL found = False;
+ bool found = False;
for (j=0;old->dacl && j<old->dacl->num_aces;j++) {
if (sid_equal(&sd->dacl->aces[i].trustee,
diff --git a/source3/utils/smbcontrol.c b/source3/utils/smbcontrol.c
index 79ab69918f..b79fa29cdb 100644
--- a/source3/utils/smbcontrol.c
+++ b/source3/utils/smbcontrol.c
@@ -46,11 +46,11 @@ static int num_replies; /* Used by message callback fns */
/* Send a message to a destination pid. Zero means broadcast smbd. */
-static BOOL send_message(struct messaging_context *msg_ctx,
+static bool send_message(struct messaging_context *msg_ctx,
struct server_id pid, int msg_type,
const void *buf, int len)
{
- BOOL ret;
+ bool ret;
int n_sent = 0;
if (procid_to_pid(&pid) != 0)
@@ -70,7 +70,7 @@ static void timeout_handler(struct event_context *event_ctx,
const struct timeval *now,
void *private_data)
{
- BOOL *timed_out = (BOOL *)private_data;
+ bool *timed_out = (bool *)private_data;
TALLOC_FREE(te);
*timed_out = True;
}
@@ -78,10 +78,10 @@ static void timeout_handler(struct event_context *event_ctx,
/* Wait for one or more reply messages */
static void wait_replies(struct messaging_context *msg_ctx,
- BOOL multiple_replies)
+ bool multiple_replies)
{
struct timed_event *te;
- BOOL timed_out = False;
+ bool timed_out = False;
if (!(te = event_add_timed(messaging_event_context(msg_ctx), NULL,
timeval_current_ofs(timeout, 0),
@@ -126,7 +126,7 @@ static void print_string_cb(struct messaging_context *msg,
/* Send no message. Useful for testing. */
-static BOOL do_noop(struct messaging_context *msg_ctx,
+static bool do_noop(struct messaging_context *msg_ctx,
const struct server_id pid,
const int argc, const char **argv)
{
@@ -142,7 +142,7 @@ static BOOL do_noop(struct messaging_context *msg_ctx,
/* Send a debug string */
-static BOOL do_debug(struct messaging_context *msg_ctx,
+static bool do_debug(struct messaging_context *msg_ctx,
const struct server_id pid,
const int argc, const char **argv)
{
@@ -267,7 +267,7 @@ static int stack_trace_connection(struct db_record *rec,
return 0;
}
-static BOOL do_daemon_stack_trace(struct messaging_context *msg_ctx,
+static bool do_daemon_stack_trace(struct messaging_context *msg_ctx,
const struct server_id pid,
const int argc, const char **argv)
{
@@ -297,7 +297,7 @@ static BOOL do_daemon_stack_trace(struct messaging_context *msg_ctx,
#else /* defined(HAVE_LIBUNWIND_PTRACE) && defined(HAVE_LINUX_PTRACE) */
-static BOOL do_daemon_stack_trace(struct messaging_context *msg_ctx,
+static bool do_daemon_stack_trace(struct messaging_context *msg_ctx,
const struct server_id pid,
const int argc, const char **argv)
{
@@ -310,7 +310,7 @@ static BOOL do_daemon_stack_trace(struct messaging_context *msg_ctx,
/* Inject a fault (fatal signal) into a running smbd */
-static BOOL do_inject_fault(struct messaging_context *msg_ctx,
+static bool do_inject_fault(struct messaging_context *msg_ctx,
const struct server_id pid,
const int argc, const char **argv)
{
@@ -352,7 +352,7 @@ static BOOL do_inject_fault(struct messaging_context *msg_ctx,
/* Force a browser election */
-static BOOL do_election(struct messaging_context *msg_ctx,
+static bool do_election(struct messaging_context *msg_ctx,
const struct server_id pid,
const int argc, const char **argv)
{
@@ -378,7 +378,7 @@ static void pong_cb(struct messaging_context *msg,
num_replies++;
}
-static BOOL do_ping(struct messaging_context *msg_ctx,
+static bool do_ping(struct messaging_context *msg_ctx,
const struct server_id pid,
const int argc, const char **argv)
{
@@ -408,7 +408,7 @@ static BOOL do_ping(struct messaging_context *msg_ctx,
/* Set profiling options */
-static BOOL do_profile(struct messaging_context *msg_ctx,
+static bool do_profile(struct messaging_context *msg_ctx,
const struct server_id pid,
const int argc, const char **argv)
{
@@ -491,7 +491,7 @@ static void profilelevel_rqst(struct messaging_context *msg_ctx,
send_message(msg_ctx, pid, MSG_PROFILELEVEL, &v, sizeof(int));
}
-static BOOL do_profilelevel(struct messaging_context *msg_ctx,
+static bool do_profilelevel(struct messaging_context *msg_ctx,
const struct server_id pid,
const int argc, const char **argv)
{
@@ -523,7 +523,7 @@ static BOOL do_profilelevel(struct messaging_context *msg_ctx,
/* Display debug level settings */
-static BOOL do_debuglevel(struct messaging_context *msg_ctx,
+static bool do_debuglevel(struct messaging_context *msg_ctx,
const struct server_id pid,
const int argc, const char **argv)
{
@@ -553,7 +553,7 @@ static BOOL do_debuglevel(struct messaging_context *msg_ctx,
/* Send a print notify message */
-static BOOL do_printnotify(struct messaging_context *msg_ctx,
+static bool do_printnotify(struct messaging_context *msg_ctx,
const struct server_id pid,
const int argc, const char **argv)
{
@@ -694,7 +694,7 @@ send:
/* Close a share */
-static BOOL do_closeshare(struct messaging_context *msg_ctx,
+static bool do_closeshare(struct messaging_context *msg_ctx,
const struct server_id pid,
const int argc, const char **argv)
{
@@ -710,7 +710,7 @@ static BOOL do_closeshare(struct messaging_context *msg_ctx,
/* force a blocking lock retry */
-static BOOL do_lockretry(struct messaging_context *msg_ctx,
+static bool do_lockretry(struct messaging_context *msg_ctx,
const struct server_id pid,
const int argc, const char **argv)
{
@@ -724,7 +724,7 @@ static BOOL do_lockretry(struct messaging_context *msg_ctx,
/* force a validation of all brl entries, including re-sends. */
-static BOOL do_brl_revalidate(struct messaging_context *msg_ctx,
+static bool do_brl_revalidate(struct messaging_context *msg_ctx,
const struct server_id pid,
const int argc, const char **argv)
{
@@ -738,7 +738,7 @@ static BOOL do_brl_revalidate(struct messaging_context *msg_ctx,
/* Force a SAM synchronisation */
-static BOOL do_samsync(struct messaging_context *msg_ctx,
+static bool do_samsync(struct messaging_context *msg_ctx,
const struct server_id pid,
const int argc, const char **argv)
{
@@ -752,7 +752,7 @@ static BOOL do_samsync(struct messaging_context *msg_ctx,
/* Force a SAM replication */
-static BOOL do_samrepl(struct messaging_context *msg_ctx,
+static bool do_samrepl(struct messaging_context *msg_ctx,
const struct server_id pid,
const int argc, const char **argv)
{
@@ -766,7 +766,7 @@ static BOOL do_samrepl(struct messaging_context *msg_ctx,
/* Display talloc pool usage */
-static BOOL do_poolusage(struct messaging_context *msg_ctx,
+static bool do_poolusage(struct messaging_context *msg_ctx,
const struct server_id pid,
const int argc, const char **argv)
{
@@ -796,7 +796,7 @@ static BOOL do_poolusage(struct messaging_context *msg_ctx,
/* Perform a dmalloc mark */
-static BOOL do_dmalloc_mark(struct messaging_context *msg_ctx,
+static bool do_dmalloc_mark(struct messaging_context *msg_ctx,
const struct server_id pid,
const int argc, const char **argv)
{
@@ -810,7 +810,7 @@ static BOOL do_dmalloc_mark(struct messaging_context *msg_ctx,
/* Perform a dmalloc changed */
-static BOOL do_dmalloc_changed(struct messaging_context *msg_ctx,
+static bool do_dmalloc_changed(struct messaging_context *msg_ctx,
const struct server_id pid,
const int argc, const char **argv)
{
@@ -826,7 +826,7 @@ static BOOL do_dmalloc_changed(struct messaging_context *msg_ctx,
/* Shutdown a server process */
-static BOOL do_shutdown(struct messaging_context *msg_ctx,
+static bool do_shutdown(struct messaging_context *msg_ctx,
const struct server_id pid,
const int argc, const char **argv)
{
@@ -840,7 +840,7 @@ static BOOL do_shutdown(struct messaging_context *msg_ctx,
/* Notify a driver upgrade */
-static BOOL do_drvupgrade(struct messaging_context *msg_ctx,
+static bool do_drvupgrade(struct messaging_context *msg_ctx,
const struct server_id pid,
const int argc, const char **argv)
{
@@ -854,7 +854,7 @@ static BOOL do_drvupgrade(struct messaging_context *msg_ctx,
strlen(argv[1]) + 1);
}
-static BOOL do_winbind_online(struct messaging_context *msg_ctx,
+static bool do_winbind_online(struct messaging_context *msg_ctx,
const struct server_id pid,
const int argc, const char **argv)
{
@@ -888,12 +888,12 @@ static BOOL do_winbind_online(struct messaging_context *msg_ctx,
return send_message(msg_ctx, pid, MSG_WINBIND_ONLINE, NULL, 0);
}
-static BOOL do_winbind_offline(struct messaging_context *msg_ctx,
+static bool do_winbind_offline(struct messaging_context *msg_ctx,
const struct server_id pid,
const int argc, const char **argv)
{
TDB_CONTEXT *tdb;
- BOOL ret = False;
+ bool ret = False;
int retry = 0;
if (argc != 1) {
@@ -960,7 +960,7 @@ static BOOL do_winbind_offline(struct messaging_context *msg_ctx,
return ret;
}
-static BOOL do_winbind_onlinestatus(struct messaging_context *msg_ctx,
+static bool do_winbind_onlinestatus(struct messaging_context *msg_ctx,
const struct server_id pid,
const int argc, const char **argv)
{
@@ -992,7 +992,7 @@ static BOOL do_winbind_onlinestatus(struct messaging_context *msg_ctx,
return num_replies;
}
-static BOOL do_dump_event_list(struct messaging_context *msg_ctx,
+static bool do_dump_event_list(struct messaging_context *msg_ctx,
const struct server_id pid,
const int argc, const char **argv)
{
@@ -1021,7 +1021,7 @@ static void winbind_validate_cache_cb(struct messaging_context *msg,
num_replies++;
}
-static BOOL do_winbind_validate_cache(struct messaging_context *msg_ctx,
+static bool do_winbind_validate_cache(struct messaging_context *msg_ctx,
const struct server_id pid,
const int argc, const char **argv)
{
@@ -1051,7 +1051,7 @@ static BOOL do_winbind_validate_cache(struct messaging_context *msg_ctx,
return num_replies;
}
-static BOOL do_reload_config(struct messaging_context *msg_ctx,
+static bool do_reload_config(struct messaging_context *msg_ctx,
const struct server_id pid,
const int argc, const char **argv)
{
@@ -1074,7 +1074,7 @@ static void my_make_nmb_name( struct nmb_name *n, const char *name, int type)
push_ascii(n->scope, global_scope(), 64, STR_TERMINATE);
}
-static BOOL do_nodestatus(struct messaging_context *msg_ctx,
+static bool do_nodestatus(struct messaging_context *msg_ctx,
const struct server_id pid,
const int argc, const char **argv)
{
@@ -1115,7 +1115,7 @@ static BOOL do_nodestatus(struct messaging_context *msg_ctx,
static const struct {
const char *name; /* Option name */
- BOOL (*fn)(struct messaging_context *msg_ctx,
+ bool (*fn)(struct messaging_context *msg_ctx,
const struct server_id pid,
const int argc, const char **argv);
const char *help; /* Short help text */
@@ -1227,7 +1227,7 @@ static struct server_id parse_dest(const char *dest)
/* Execute smbcontrol command */
-static BOOL do_command(struct messaging_context *msg_ctx,
+static bool do_command(struct messaging_context *msg_ctx,
int argc, const char **argv)
{
const char *dest = argv[0], *command = argv[1];
diff --git a/source3/utils/smbcquotas.c b/source3/utils/smbcquotas.c
index 1f718b7cef..387c296385 100644
--- a/source3/utils/smbcquotas.c
+++ b/source3/utils/smbcquotas.c
@@ -27,8 +27,8 @@ static pstring server;
/* numeric is set when the user wants numeric SIDs and ACEs rather
than going via LSA calls to resolve them */
-static BOOL numeric;
-static BOOL verbose;
+static bool numeric;
+static bool verbose;
enum todo_values {NOOP_QUOTA=0,FS_QUOTA,USER_QUOTA,LIST_QUOTA,SET_QUOTA};
enum exit_values {EXIT_OK, EXIT_FAILED, EXIT_PARSE_ERROR};
@@ -36,13 +36,13 @@ enum exit_values {EXIT_OK, EXIT_FAILED, EXIT_PARSE_ERROR};
static struct cli_state *cli_ipc;
static struct rpc_pipe_client *global_pipe_hnd;
static POLICY_HND pol;
-static BOOL got_policy_hnd;
+static bool got_policy_hnd;
static struct cli_state *connect_one(const char *share);
/* Open cli connection and policy handle */
-static BOOL cli_open_policy_hnd(void)
+static bool cli_open_policy_hnd(void)
{
/* Initialise cli LSA connection */
@@ -74,7 +74,7 @@ static BOOL cli_open_policy_hnd(void)
}
/* convert a SID to a string, either numeric or username/group */
-static void SidToString(fstring str, DOM_SID *sid, BOOL _numeric)
+static void SidToString(fstring str, DOM_SID *sid, bool _numeric)
{
char **domains = NULL;
char **names = NULL;
@@ -103,11 +103,11 @@ static void SidToString(fstring str, DOM_SID *sid, BOOL _numeric)
}
/* convert a string to a SID, either numeric or username/group */
-static BOOL StringToSid(DOM_SID *sid, const char *str)
+static bool StringToSid(DOM_SID *sid, const char *str)
{
enum lsa_SidType *types = NULL;
DOM_SID *sids = NULL;
- BOOL result = True;
+ bool result = True;
if (strncmp(str, "S-", 2) == 0) {
return string_to_sid(sid, str);
@@ -138,9 +138,9 @@ static int parse_quota_set(pstring set_str, pstring username_str, enum SMB_QUOTA
{
char *p = set_str,*p2;
int todo;
- BOOL stop = False;
- BOOL enable = False;
- BOOL deny = False;
+ bool stop = False;
+ bool enable = False;
+ bool deny = False;
if (strnequal(set_str,"UQLIM:",6)) {
p += 6;
@@ -397,9 +397,9 @@ static struct cli_state *connect_one(const char *share)
pstring set_str = {0};
enum SMB_QUOTA_TYPE qtype = SMB_INVALID_QUOTA_TYPE;
int cmd = 0;
- static BOOL test_args = False;
+ static bool test_args = False;
struct cli_state *cli;
- BOOL fix_user = False;
+ bool fix_user = False;
SMB_NTQUOTA_STRUCT qt;
TALLOC_CTX *frame = talloc_stackframe();
poptContext pc;
diff --git a/source3/utils/smbpasswd.c b/source3/utils/smbpasswd.c
index f1a2387090..296c0630d8 100644
--- a/source3/utils/smbpasswd.c
+++ b/source3/utils/smbpasswd.c
@@ -18,7 +18,7 @@
#include "includes.h"
-extern BOOL AllowDebugChange;
+extern bool AllowDebugChange;
/*
* Next two lines needed for SunOS and don't
@@ -28,8 +28,8 @@ extern char *optarg;
extern int optind;
/* forced running in root-mode */
-static BOOL got_username = False;
-static BOOL stdin_passwd_get = False;
+static bool got_username = False;
+static bool stdin_passwd_get = False;
static fstring user_name;
static char *new_passwd = NULL;
static const char *remote_machine = NULL;
@@ -199,7 +199,7 @@ static int process_options(int argc, char **argv, int local_flags)
/*************************************************************
Utility function to prompt for new password.
*************************************************************/
-static char *prompt_for_new_password(BOOL stdin_get)
+static char *prompt_for_new_password(bool stdin_get)
{
char *p;
fstring new_pw;
@@ -263,7 +263,7 @@ static NTSTATUS password_change(const char *remote_mach, char *username,
/*******************************************************************
Store the LDAP admin password in secrets.tdb
******************************************************************/
-static BOOL store_ldap_admin_pw (char* pw)
+static bool store_ldap_admin_pw (char* pw)
{
if (!pw)
return False;
diff --git a/source3/utils/smbtree.c b/source3/utils/smbtree.c
index 7d62d65b05..d3c95c024c 100644
--- a/source3/utils/smbtree.c
+++ b/source3/utils/smbtree.c
@@ -21,7 +21,7 @@
#include "includes.h"
-static BOOL use_bcast;
+static bool use_bcast;
/* How low can we go? */
@@ -67,7 +67,7 @@ static void add_name(const char *machine_name, uint32 server_type,
/****************************************************************************
display tree of smb workgroups, servers and shares
****************************************************************************/
-static BOOL get_workgroups(struct user_auth_info *user_info)
+static bool get_workgroups(struct user_auth_info *user_info)
{
struct cli_state *cli;
struct in_addr server_ip;
@@ -103,7 +103,7 @@ static BOOL get_workgroups(struct user_auth_info *user_info)
/* Retrieve the list of servers for a given workgroup */
-static BOOL get_servers(char *workgroup, struct user_auth_info *user_info)
+static bool get_servers(char *workgroup, struct user_auth_info *user_info)
{
struct cli_state *cli;
struct in_addr server_ip;
@@ -126,7 +126,7 @@ static BOOL get_servers(char *workgroup, struct user_auth_info *user_info)
return True;
}
-static BOOL get_rpc_shares(struct cli_state *cli,
+static bool get_rpc_shares(struct cli_state *cli,
void (*fn)(const char *, uint32, const char *, void *),
void *state)
{
@@ -180,7 +180,7 @@ static BOOL get_rpc_shares(struct cli_state *cli,
}
-static BOOL get_shares(char *server_name, struct user_auth_info *user_info)
+static bool get_shares(char *server_name, struct user_auth_info *user_info)
{
struct cli_state *cli;
@@ -196,7 +196,7 @@ static BOOL get_shares(char *server_name, struct user_auth_info *user_info)
return True;
}
-static BOOL print_tree(struct user_auth_info *user_info)
+static bool print_tree(struct user_auth_info *user_info)
{
struct name_list *wg, *sv, *sh;
diff --git a/source3/utils/status.c b/source3/utils/status.c
index 96f4ae6888..d5e482f6fb 100644
--- a/source3/utils/status.c
+++ b/source3/utils/status.c
@@ -41,14 +41,14 @@ static unsigned int Ucrit_IsActive = 0; /* added by OH */
static int verbose, brief;
static int shares_only = 0; /* Added by RJS */
static int locks_only = 0; /* Added by RJS */
-static BOOL processes_only=False;
+static bool processes_only=False;
static int show_brl;
-static BOOL numeric_only = False;
+static bool numeric_only = False;
const char *username = NULL;
-extern BOOL status_profile_dump(BOOL be_verbose);
-extern BOOL status_profile_rates(BOOL be_verbose);
+extern bool status_profile_dump(bool be_verbose);
+extern bool status_profile_rates(bool be_verbose);
/* added by OH */
static void Ucrit_addUid(uid_t uid)
@@ -83,7 +83,7 @@ static unsigned int Ucrit_checkPid(struct server_id pid)
return 0;
}
-static BOOL Ucrit_addPid( struct server_id pid )
+static bool Ucrit_addPid( struct server_id pid )
{
if ( !Ucrit_IsActive )
return True;
@@ -277,7 +277,7 @@ static int traverse_sessionid(struct db_record *db, void *state)
{
int c;
int profile_only = 0;
- BOOL show_processes, show_locks, show_shares;
+ bool show_processes, show_locks, show_shares;
poptContext pc;
struct poptOption long_options[] = {
POPT_AUTOHELP
diff --git a/source3/utils/status_profile.c b/source3/utils/status_profile.c
index bbf3645fd9..6e75f99d35 100644
--- a/source3/utils/status_profile.c
+++ b/source3/utils/status_profile.c
@@ -20,8 +20,8 @@
#include "includes.h"
-BOOL status_profile_dump(BOOL be_verbose);
-BOOL status_profile_rates(BOOL be_verbose);
+bool status_profile_dump(bool be_verbose);
+bool status_profile_rates(bool be_verbose);
#ifdef WITH_PROFILE
static void profile_separator(const char * title)
@@ -43,7 +43,7 @@ static void profile_separator(const char * title)
/*******************************************************************
dump the elements of the profile structure
******************************************************************/
-BOOL status_profile_dump(BOOL verbose)
+bool status_profile_dump(bool verbose)
{
#ifdef WITH_PROFILE
if (!profile_setup(NULL, True)) {
@@ -471,7 +471,7 @@ static int print_count_samples(
static struct profile_stats sample_data[2];
static SMB_BIG_UINT sample_time[2];
-BOOL status_profile_rates(BOOL verbose)
+bool status_profile_rates(bool verbose)
{
SMB_BIG_UINT remain_usec;
SMB_BIG_UINT next_usec;
@@ -533,7 +533,7 @@ BOOL status_profile_rates(BOOL verbose)
#else /* WITH_PROFILE */
-BOOL status_profile_rates(BOOL verbose)
+bool status_profile_rates(bool verbose)
{
fprintf(stderr, "Profile data unavailable\n");
return False;
diff --git a/source3/utils/testparm.c b/source3/utils/testparm.c
index 19c7ee1623..dbfecf0a03 100644
--- a/source3/utils/testparm.c
+++ b/source3/utils/testparm.c
@@ -33,7 +33,7 @@
#include "includes.h"
-extern BOOL AllowDebugChange;
+extern bool AllowDebugChange;
/***********************************************
Here we do a set of 'hard coded' checks for bad
@@ -199,8 +199,8 @@ via the %%o substitution. With encrypted passwords this is not possible.\n", lp_
{
const char *config_file = dyn_CONFIGFILE;
int s;
- static BOOL silent_mode = False;
- static BOOL show_all_parameters = False;
+ static bool silent_mode = False;
+ static bool show_all_parameters = False;
int ret = 0;
poptContext pc;
static const char *term_code = "";
@@ -356,7 +356,7 @@ print command parameter is ignored when using CUPS libraries.\n",
getc(stdin);
}
if (parameter_name || section_name) {
- BOOL isGlobal = False;
+ bool isGlobal = False;
s = GLOBAL_SECTION_SNUM;
if (!section_name) {