summaryrefslogtreecommitdiff
path: root/source3/utils
diff options
context:
space:
mode:
Diffstat (limited to 'source3/utils')
-rw-r--r--source3/utils/net.c16
-rw-r--r--source3/utils/net_ads.c26
-rw-r--r--source3/utils/net_groupmap.c18
-rw-r--r--source3/utils/net_rpc.c92
-rw-r--r--source3/utils/net_rpc_join.c2
-rw-r--r--source3/utils/net_rpc_printer.c148
-rw-r--r--source3/utils/net_rpc_registry.c8
-rw-r--r--source3/utils/net_rpc_rights.c10
-rw-r--r--source3/utils/net_rpc_samsync.c26
-rw-r--r--source3/utils/net_rpc_shell.c18
-rw-r--r--source3/utils/net_sam.c6
-rw-r--r--source3/utils/net_status.c8
-rw-r--r--source3/utils/net_usershare.c18
-rw-r--r--source3/utils/net_util.c2
-rw-r--r--source3/utils/netlookup.c8
15 files changed, 203 insertions, 203 deletions
diff --git a/source3/utils/net.c b/source3/utils/net.c
index db7f6c090c..477c354cb8 100644
--- a/source3/utils/net.c
+++ b/source3/utils/net.c
@@ -445,7 +445,7 @@ bool net_find_server(struct net_context *c,
}
if (!name_status_find(d, 0x1b, 0x20, &pdc_ss, dc_name)) {
- return False;
+ return false;
}
*server_name = SMB_STRDUP(dc_name);
@@ -484,10 +484,10 @@ bool net_find_server(struct net_context *c,
if (!*server_name) {
DEBUG(1,("no server to connect to\n"));
- return False;
+ return false;
}
- return True;
+ return true;
}
bool net_find_pdc(struct sockaddr_storage *server_ss,
@@ -672,7 +672,7 @@ static int net_getlocalsid(struct net_context *c, int argc, const char **argv)
name = global_myname();
}
- if(!initialize_password_db(False, NULL)) {
+ if(!initialize_password_db(false, NULL)) {
DEBUG(0, ("WARNING: Could not open passdb - local sid may not reflect passdb\n"
"backend knowledge (such as the sid stored in LDAP)\n"));
}
@@ -747,7 +747,7 @@ static int net_getdomainsid(struct net_context *c, int argc, const char **argv)
return 1;
}
- if(!initialize_password_db(False, NULL)) {
+ if(!initialize_password_db(false, NULL)) {
DEBUG(0, ("WARNING: Could not open passdb - domain SID may "
"not reflect passdb\n"
"backend knowledge (such as the SID stored in "
@@ -875,14 +875,14 @@ static bool search_maxrid(struct pdb_search *search, const char *type,
if (search == NULL) {
d_fprintf(stderr, "get_maxrid: Could not search %s\n", type);
- return False;
+ return false;
}
num_entries = pdb_search_entries(search, 0, 0xffffffff, &entries);
for (i=0; i<num_entries; i++)
*max_rid = MAX(*max_rid, entries[i].rid);
pdb_search_destroy(search);
- return True;
+ return true;
}
static uint32 get_maxrid(void)
@@ -1080,7 +1080,7 @@ static struct functable net_func[] = {
}
break;
case 'U':
- c->opt_user_specified = True;
+ c->opt_user_specified = true;
c->opt_user_name = SMB_STRDUP(c->opt_user_name);
p = strchr(c->opt_user_name,'%');
if (p) {
diff --git a/source3/utils/net_ads.c b/source3/utils/net_ads.c
index 77d1629714..d1480961b4 100644
--- a/source3/utils/net_ads.c
+++ b/source3/utils/net_ads.c
@@ -219,11 +219,11 @@ static ADS_STATUS ads_startup_int(struct net_context *c, bool only_own_domain,
{
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
@@ -246,7 +246,7 @@ retry_connect:
}
if (c->opt_user_specified) {
- need_password = True;
+ need_password = true;
}
retry:
@@ -292,8 +292,8 @@ retry:
}
if (!need_password && !second_time && !(auth_flags & ADS_AUTH_NO_BIND)) {
- need_password = True;
- second_time = True;
+ need_password = true;
+ second_time = true;
goto retry;
} else {
ads_destroy(&ads);
@@ -307,7 +307,7 @@ retry:
if ((only_own_domain || !c->opt_host) && !tried_closest_dc) {
- tried_closest_dc = True; /* avoid loop */
+ tried_closest_dc = true; /* avoid loop */
if (!ads->config.tried_closest_dc) {
@@ -420,16 +420,16 @@ static bool usergrp_display(ADS_STRUCT *ads, char *field, void **values, void *d
}
SAFE_FREE(disp_fields[0]);
SAFE_FREE(disp_fields[1]);
- return True;
+ return true;
}
if (!values) /* must be new field, indicate string field */
- return True;
+ return true;
if (StrCaseCmp(field, "sAMAccountName") == 0) {
disp_fields[0] = SMB_STRDUP((char *) values[0]);
}
if (StrCaseCmp(field, "description") == 0)
disp_fields[1] = SMB_STRDUP((char *) values[0]);
- return True;
+ return true;
}
static int net_ads_user_usage(struct net_context *c, int argc, const char **argv)
@@ -1104,7 +1104,7 @@ int net_ads_join(struct net_context *c, int argc, const char **argv)
struct libnet_JoinCtx *r = NULL;
const char *domain = lp_realm();
WERROR werr = WERR_SETUP_NOT_JOINED;
- bool createupn = False;
+ bool createupn = false;
const char *machineupn = NULL;
const char *create_in_ou = NULL;
int i;
@@ -1138,7 +1138,7 @@ int net_ads_join(struct net_context *c, int argc, const char **argv)
for ( i=0; i<argc; i++ ) {
if ( !StrnCaseCmp(argv[i], "createupn", strlen("createupn")) ) {
- createupn = True;
+ createupn = true;
machineupn = get_string_param(argv[i]);
}
else if ( !StrnCaseCmp(argv[i], "createcomputer", strlen("createcomputer")) ) {
@@ -1296,7 +1296,7 @@ static int net_ads_dns_register(struct net_context *c, int argc, const char **ar
return -1;
}
- status = ads_startup(c, True, &ads);
+ status = ads_startup(c, true, &ads);
if ( !ADS_ERR_OK(status) ) {
DEBUG(1, ("error on ads_startup: %s\n", ads_errstr(status)));
TALLOC_FREE(ctx);
diff --git a/source3/utils/net_groupmap.c b/source3/utils/net_groupmap.c
index 9f54bdaa08..55ba0ba80c 100644
--- a/source3/utils/net_groupmap.c
+++ b/source3/utils/net_groupmap.c
@@ -36,17 +36,17 @@ static bool get_sid_from_input(DOM_SID *sid, char *input)
/* Perhaps its the NT group name? */
if (!pdb_getgrnam(&map, input)) {
printf("NT Group %s doesn't exist in mapping DB\n", input);
- return False;
+ return false;
} else {
*sid = map.sid;
}
} else {
if (!string_to_sid(sid, input)) {
printf("converting sid %s from a string failed!\n", input);
- return False;
+ return false;
}
}
- return True;
+ return true;
}
/*********************************************************
@@ -75,18 +75,18 @@ static void print_map_entry ( GROUP_MAP map, bool long_list )
static int net_groupmap_list(struct net_context *c, int argc, const char **argv)
{
size_t entries;
- bool long_list = False;
+ bool long_list = false;
size_t i;
fstring ntgroup = "";
fstring sid_string = "";
if (c->opt_verbose || c->opt_long_list_entries)
- long_list = True;
+ long_list = true;
/* get the options */
for ( i=0; i<argc; i++ ) {
if ( !StrCaseCmp(argv[i], "verbose")) {
- long_list = True;
+ long_list = true;
}
else if ( !StrnCaseCmp(argv[i], "ntgroup", strlen("ntgroup")) ) {
fstrcpy( ntgroup, get_string_param( argv[i] ) );
@@ -494,7 +494,7 @@ static int net_groupmap_set(struct net_context *c, 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\" "
@@ -712,7 +712,7 @@ static bool print_alias_memberships(TALLOC_CTX *mem_ctx,
&alias_rids, &num_alias_rids))) {
d_fprintf(stderr, "Could not list memberships for sid %s\n",
sid_string_tos(member));
- return False;
+ return false;
}
for (i = 0; i < num_alias_rids; i++) {
@@ -722,7 +722,7 @@ static bool print_alias_memberships(TALLOC_CTX *mem_ctx,
printf("%s\n", sid_string_tos(&alias));
}
- return True;
+ return true;
}
static int net_groupmap_memberships(struct net_context *c, int argc, const char **argv)
diff --git a/source3/utils/net_rpc.c b/source3/utils/net_rpc.c
index 642a4baa45..759cfa7adb 100644
--- a/source3/utils/net_rpc.c
+++ b/source3/utils/net_rpc.c
@@ -65,7 +65,7 @@ NTSTATUS net_get_remote_domain_sid(struct cli_state *cli, TALLOC_CTX *mem_ctx,
return result;
}
- result = rpccli_lsa_open_policy(lsa_pipe, mem_ctx, False,
+ result = rpccli_lsa_open_policy(lsa_pipe, mem_ctx, false,
SEC_RIGHTS_MAXIMUM_ALLOWED,
&pol);
if (!NT_STATUS_IS_OK(result)) {
@@ -1615,7 +1615,7 @@ static NTSTATUS rpc_group_delete_internals(struct net_context *c,
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_t group_rid;
struct samr_RidTypeArray *rids = NULL;
@@ -1727,7 +1727,7 @@ static NTSTATUS rpc_group_delete_internals(struct net_context *c,
d_printf("Group is primary group of %s\n",
info->info21.account_name.string);
}
- group_is_primary = True;
+ group_is_primary = true;
}
rpccli_samr_Close(pipe_hnd, mem_ctx, &user_pol);
@@ -1978,7 +1978,7 @@ static NTSTATUS get_sid_from_name(struct cli_state *cli,
goto done;
}
- result = rpccli_lsa_open_policy(pipe_hnd, mem_ctx, False,
+ result = rpccli_lsa_open_policy(pipe_hnd, mem_ctx, false,
SEC_RIGHTS_MAXIMUM_ALLOWED, &lsa_pol);
if (!NT_STATUS_IS_OK(result)) {
@@ -2443,25 +2443,25 @@ static NTSTATUS rpc_group_list_internals(struct net_context *c,
NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
uint32 start_idx=0, max_entries=250, num_entries, i, loop_count = 0;
struct samr_SamArray *groups = NULL;
- bool global = False;
- bool local = False;
- bool builtin = False;
+ bool global = false;
+ bool local = false;
+ bool builtin = false;
if (argc == 0) {
- global = True;
- local = True;
- builtin = True;
+ global = true;
+ local = true;
+ builtin = true;
}
for (i=0; i<argc; i++) {
if (strequal(argv[i], "global"))
- global = True;
+ global = true;
if (strequal(argv[i], "local"))
- local = True;
+ local = true;
if (strequal(argv[i], "builtin"))
- builtin = True;
+ builtin = true;
}
/* Get sam policy handle */
@@ -2774,7 +2774,7 @@ static NTSTATUS rpc_list_alias_members(struct net_context *c,
return result;
}
- result = rpccli_lsa_open_policy(lsa_pipe, mem_ctx, True,
+ result = rpccli_lsa_open_policy(lsa_pipe, mem_ctx, true,
SEC_RIGHTS_MAXIMUM_ALLOWED, &lsa_pol);
if (!NT_STATUS_IS_OK(result)) {
@@ -3371,13 +3371,13 @@ 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);
- return False;
+ return false;
}
if (!cli_tdis(cli))
- return False;
+ return false;
- return True;
+ return true;
}
static bool check_share_sanity(struct net_context *c, struct cli_state *cli,
@@ -3386,18 +3386,18 @@ static bool check_share_sanity(struct net_context *c, struct cli_state *cli,
/* only support disk shares */
if (! ( type == STYPE_DISKTREE || type == (STYPE_DISKTREE | STYPE_HIDDEN)) ) {
printf("share [%s] is not a diskshare (type: %x)\n", netname, type);
- return False;
+ return false;
}
/* skip builtin shares */
/* FIXME: should print$ be added too ? */
if (strequal(netname,"IPC$") || strequal(netname,"ADMIN$") ||
strequal(netname,"global"))
- return False;
+ return false;
- if (c->opt_exclude && in_list(netname, c->opt_exclude, False)) {
+ if (c->opt_exclude && in_list(netname, c->opt_exclude, false)) {
printf("excluding [%s]\n", netname);
- return False;
+ return false;
}
return check_share_availability(cli, netname);
@@ -3644,16 +3644,16 @@ static bool sync_files(struct copy_clistate *cp_clistate, const char *mask)
mask, &targetcli, &targetpath ) ) {
d_fprintf(stderr, "cli_resolve_path %s failed with error: %s\n",
mask, cli_errstr(cp_clistate->cli_share_src));
- return False;
+ return false;
}
if (cli_list(targetcli, targetpath, cp_clistate->attribute, copy_fn, cp_clistate) == -1) {
d_fprintf(stderr, "listing %s failed with error: %s\n",
mask, cli_errstr(targetcli));
- return False;
+ return false;
}
- return True;
+ return true;
}
@@ -3689,10 +3689,10 @@ bool copy_top_level_perms(struct net_context *c,
if (!NT_STATUS_IS_OK(nt_status)) {
printf("Could handle directory attributes for top level directory of share %s. Error %s\n",
sharename, nt_errstr(nt_status));
- return False;
+ return false;
}
- return True;
+ return true;
}
/**
@@ -3726,8 +3726,8 @@ static NTSTATUS rpc_share_migrate_files_internals(struct net_context *c,
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;
const char *mask = "\\*";
char *dst = NULL;
@@ -3782,7 +3782,7 @@ static NTSTATUS rpc_share_migrate_files_internals(struct net_context *c,
if (!NT_STATUS_IS_OK(nt_status))
goto done;
- got_src_share = True;
+ got_src_share = true;
if (net_mode_share == NET_MODE_SHARE_MIGRATE) {
/* open share destination */
@@ -3791,7 +3791,7 @@ static NTSTATUS rpc_share_migrate_files_internals(struct net_context *c,
if (!NT_STATUS_IS_OK(nt_status))
goto done;
- got_dst_share = True;
+ got_dst_share = true;
}
if (!copy_top_level_perms(c, &cp_clistate, info502.name)) {
@@ -4138,7 +4138,7 @@ static NTSTATUS rpc_aliaslist_dump(struct net_context *c,
NTSTATUS result;
POLICY_HND lsa_pol;
- result = rpccli_lsa_open_policy(pipe_hnd, mem_ctx, True,
+ result = rpccli_lsa_open_policy(pipe_hnd, mem_ctx, true,
SEC_RIGHTS_MAXIMUM_ALLOWED,
&lsa_pol);
if (!NT_STATUS_IS_OK(result))
@@ -4252,9 +4252,9 @@ static bool is_sid_in_token(NT_USER_TOKEN *token, DOM_SID *sid)
for (i=0; i<token->num_sids; i++) {
if (sid_compare(sid, &token->user_sids[i]) == 0)
- return True;
+ return true;
}
- return False;
+ return false;
}
static void add_sid_to_token(NT_USER_TOKEN *token, DOM_SID *sid)
@@ -4294,10 +4294,10 @@ static bool is_alias_member(DOM_SID *sid, struct full_alias *alias)
for (i=0; i<alias->num_members; i++) {
if (sid_compare(sid, &alias->members[i]) == 0)
- return True;
+ return true;
}
- return False;
+ return false;
}
static void collect_sid_memberships(NT_USER_TOKEN *token, DOM_SID sid)
@@ -4489,7 +4489,7 @@ static bool get_user_tokens_from_file(FILE *f,
fstring line;
if (fgets(line, sizeof(line)-1, f) == NULL) {
- return True;
+ return true;
}
if (line[strlen(line)-1] == '\n')
@@ -4503,7 +4503,7 @@ static bool get_user_tokens_from_file(FILE *f,
if (token == NULL) {
DEBUG(0, ("File does not begin with username"));
- return False;
+ return false;
}
add_sid_to_token(&token->token, &sid);
@@ -4516,7 +4516,7 @@ static bool get_user_tokens_from_file(FILE *f,
*tokens = SMB_REALLOC_ARRAY(*tokens, struct user_token, *num_tokens);
if (*tokens == NULL) {
DEBUG(0, ("Could not realloc tokens\n"));
- return False;
+ return false;
}
token = &((*tokens)[*num_tokens-1]);
@@ -4527,7 +4527,7 @@ static bool get_user_tokens_from_file(FILE *f,
continue;
}
- return False;
+ return false;
}
@@ -5867,7 +5867,7 @@ static int rpc_trustdom_establish(struct net_context *c, int argc,
return -1;
}
- nt_status = rpccli_lsa_open_policy2(pipe_hnd, mem_ctx, True, SEC_RIGHTS_QUERY_VALUE,
+ nt_status = rpccli_lsa_open_policy2(pipe_hnd, mem_ctx, true, SEC_RIGHTS_QUERY_VALUE,
&connect_hnd);
if (NT_STATUS_IS_ERR(nt_status)) {
DEBUG(0, ("Couldn't open policy handle. Error was %s\n",
@@ -6131,7 +6131,7 @@ static int rpc_trustdom_vampire(struct net_context *c, int argc,
return -1;
};
- nt_status = rpccli_lsa_open_policy2(pipe_hnd, mem_ctx, False, SEC_RIGHTS_QUERY_VALUE,
+ nt_status = rpccli_lsa_open_policy2(pipe_hnd, mem_ctx, false, SEC_RIGHTS_QUERY_VALUE,
&connect_hnd);
if (NT_STATUS_IS_ERR(nt_status)) {
DEBUG(0, ("Couldn't open policy handle. Error was %s\n",
@@ -6280,7 +6280,7 @@ static int rpc_trustdom_list(struct net_context *c, int argc, const char **argv)
return -1;
};
- nt_status = rpccli_lsa_open_policy2(pipe_hnd, mem_ctx, False, SEC_RIGHTS_QUERY_VALUE,
+ nt_status = rpccli_lsa_open_policy2(pipe_hnd, mem_ctx, false, SEC_RIGHTS_QUERY_VALUE,
&connect_hnd);
if (NT_STATUS_IS_ERR(nt_status)) {
DEBUG(0, ("Couldn't open policy handle. Error was %s\n",
@@ -6527,17 +6527,17 @@ static int rpc_trustdom(struct net_context *c, int argc, const char **argv)
bool net_rpc_check(struct net_context *c, unsigned flags)
{
struct cli_state *cli;
- bool ret = False;
+ bool ret = false;
struct sockaddr_storage server_ss;
char *server_name = NULL;
NTSTATUS status;
/* flags (i.e. server type) may depend on command */
if (!net_find_server(c, NULL, flags, &server_ss, &server_name))
- return False;
+ return false;
if ((cli = cli_initialise()) == NULL) {
- return False;
+ return false;
}
status = cli_connect(cli, server_name, &server_ss);
@@ -6551,7 +6551,7 @@ bool net_rpc_check(struct net_context *c, unsigned flags)
if (cli->protocol < PROTOCOL_NT1)
goto done;
- ret = True;
+ ret = true;
done:
cli_shutdown(cli);
return ret;
diff --git a/source3/utils/net_rpc_join.c b/source3/utils/net_rpc_join.c
index 87a90550fa..b037e9c612 100644
--- a/source3/utils/net_rpc_join.c
+++ b/source3/utils/net_rpc_join.c
@@ -207,7 +207,7 @@ int net_rpc_join_newstyle(struct net_context *c, int argc, const char **argv)
}
- CHECK_RPC_ERR(rpccli_lsa_open_policy(pipe_hnd, mem_ctx, True,
+ CHECK_RPC_ERR(rpccli_lsa_open_policy(pipe_hnd, mem_ctx, true,
SEC_RIGHTS_MAXIMUM_ALLOWED,
&lsa_pol),
"error opening lsa policy handle");
diff --git a/source3/utils/net_rpc_printer.c b/source3/utils/net_rpc_printer.c
index 9fcbb2272c..fd938cbeaa 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;
@@ -94,7 +94,7 @@ static void display_print_driver_3(DRIVER_INFO_3 *i1)
if (strlen(dependentfiles) > 0) {
d_printf ("\tDependentfiles: [%s]\n", dependentfiles);
} else {
- valid = False;
+ valid = false;
}
}
@@ -621,7 +621,7 @@ static NTSTATUS copy_print_driver_3(struct net_context *c,
{
NTSTATUS nt_status = NT_STATUS_UNSUCCESSFUL;
int length = 0;
- bool valid = True;
+ bool valid = true;
fstring name = "";
fstring driverpath = "";
@@ -677,7 +677,7 @@ static NTSTATUS copy_print_driver_3(struct net_context *c,
if (!NT_STATUS_IS_OK(nt_status))
return nt_status;
} else {
- valid = False;
+ valid = false;
}
}
@@ -712,10 +712,10 @@ static bool net_spoolss_enum_printers(struct rpc_pipe_client *pipe_hnd,
if (!W_ERROR_IS_OK(result)) {
printf("cannot enum printers: %s\n", dos_errstr(result));
- return False;
+ return false;
}
- return True;
+ return true;
}
static bool net_spoolss_open_printer_ex(struct rpc_pipe_client *pipe_hnd,
@@ -747,19 +747,19 @@ static bool net_spoolss_open_printer_ex(struct rpc_pipe_client *pipe_hnd,
if (W_ERROR_V(result) == W_ERROR_V(WERR_ACCESS_DENIED)) {
d_fprintf(stderr, "no access to printer [%s] on [%s] for user [%s] granted\n",
printername2, servername, username);
- return False;
+ return false;
}
if (!W_ERROR_IS_OK(result)) {
d_fprintf(stderr, "cannot open printer %s on server %s: %s\n",
printername2, servername, dos_errstr(result));
- return False;
+ return false;
}
DEBUG(2,("got printer handle for printer: %s, server: %s\n",
printername2, servername));
- return True;
+ return true;
}
static bool net_spoolss_getprinter(struct rpc_pipe_client *pipe_hnd,
@@ -775,10 +775,10 @@ static bool net_spoolss_getprinter(struct rpc_pipe_client *pipe_hnd,
if (!W_ERROR_IS_OK(result)) {
printf("cannot get printer-info: %s\n", dos_errstr(result));
- return False;
+ return false;
}
- return True;
+ return true;
}
static bool net_spoolss_setprinter(struct rpc_pipe_client *pipe_hnd,
@@ -794,10 +794,10 @@ static bool net_spoolss_setprinter(struct rpc_pipe_client *pipe_hnd,
if (!W_ERROR_IS_OK(result)) {
printf("cannot set printer-info: %s\n", dos_errstr(result));
- return False;
+ return false;
}
- return True;
+ return true;
}
@@ -813,10 +813,10 @@ static bool net_spoolss_setprinterdata(struct rpc_pipe_client *pipe_hnd,
if (!W_ERROR_IS_OK(result)) {
printf ("unable to set printerdata: %s\n", dos_errstr(result));
- return False;
+ return false;
}
- return True;
+ return true;
}
@@ -833,10 +833,10 @@ static bool net_spoolss_enumprinterkey(struct rpc_pipe_client *pipe_hnd,
if (!W_ERROR_IS_OK(result)) {
printf("enumprinterkey failed: %s\n", dos_errstr(result));
- return False;
+ return false;
}
- return True;
+ return true;
}
static bool net_spoolss_enumprinterdataex(struct rpc_pipe_client *pipe_hnd,
@@ -853,10 +853,10 @@ static bool net_spoolss_enumprinterdataex(struct rpc_pipe_client *pipe_hnd,
if (!W_ERROR_IS_OK(result)) {
printf("enumprinterdataex failed: %s\n", dos_errstr(result));
- return False;
+ return false;
}
- return True;
+ return true;
}
@@ -874,10 +874,10 @@ static bool net_spoolss_setprinterdataex(struct rpc_pipe_client *pipe_hnd,
if (!W_ERROR_IS_OK(result)) {
printf("could not set printerdataex: %s\n", dos_errstr(result));
- return False;
+ return false;
}
- return True;
+ return true;
}
static bool net_spoolss_enumforms(struct rpc_pipe_client *pipe_hnd,
@@ -894,10 +894,10 @@ static bool net_spoolss_enumforms(struct rpc_pipe_client *pipe_hnd,
if (!W_ERROR_IS_OK(result)) {
printf("could not enum forms: %s\n", dos_errstr(result));
- return False;
+ return false;
}
- return True;
+ return true;
}
static bool net_spoolss_enumprinterdrivers (struct rpc_pipe_client *pipe_hnd,
@@ -915,10 +915,10 @@ static bool net_spoolss_enumprinterdrivers (struct rpc_pipe_client *pipe_hnd,
if (!W_ERROR_IS_OK(result)) {
printf("cannot enum drivers: %s\n", dos_errstr(result));
- return False;
+ return false;
}
- return True;
+ return true;
}
static bool net_spoolss_getprinterdriver(struct rpc_pipe_client *pipe_hnd,
@@ -941,10 +941,10 @@ static bool net_spoolss_getprinterdriver(struct rpc_pipe_client *pipe_hnd,
W_ERROR_V(result) != W_ERROR_V(WERR_INVALID_ENVIRONMENT)) {
printf("cannot get driver: %s\n", dos_errstr(result));
}
- return False;
+ return false;
}
- return True;
+ return true;
}
@@ -960,14 +960,14 @@ static bool net_spoolss_addprinterdriver(struct rpc_pipe_client *pipe_hnd,
/* be more verbose */
if (W_ERROR_V(result) == W_ERROR_V(WERR_ACCESS_DENIED)) {
printf("You are not allowed to add drivers\n");
- return False;
+ return false;
}
if (!W_ERROR_IS_OK(result)) {
printf("cannot add driver: %s\n", dos_errstr(result));
- return False;
+ return false;
}
- return True;
+ return true;
}
/**
@@ -992,7 +992,7 @@ static bool get_printer_info(struct rpc_pipe_client *pipe_hnd,
if (!net_spoolss_enum_printers(pipe_hnd, mem_ctx, NULL,
PRINTER_ENUM_LOCAL|PRINTER_ENUM_SHARED,
level, num_printers, ctr))
- return False;
+ return false;
goto out;
}
@@ -1003,11 +1003,11 @@ static bool get_printer_info(struct rpc_pipe_client *pipe_hnd,
MAXIMUM_ALLOWED_ACCESS,
pipe_hnd->auth->user_name,
&hnd))
- return False;
+ return false;
if (!net_spoolss_getprinter(pipe_hnd, mem_ctx, &hnd, level, ctr)) {
rpccli_spoolss_close_printer(pipe_hnd, mem_ctx, &hnd);
- return False;
+ return false;
}
rpccli_spoolss_close_printer(pipe_hnd, mem_ctx, &hnd);
@@ -1017,7 +1017,7 @@ static bool get_printer_info(struct rpc_pipe_client *pipe_hnd,
out:
DEBUG(3,("got %d printers\n", *num_printers));
- return True;
+ return true;
}
@@ -1176,7 +1176,7 @@ static NTSTATUS rpc_printer_publish_internals_args(struct rpc_pipe_client *pipe_
char *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;
@@ -1204,7 +1204,7 @@ static NTSTATUS rpc_printer_publish_internals_args(struct rpc_pipe_client *pipe_
PRINTER_ALL_ACCESS, pipe_hnd->auth->user_name, &hnd))
goto done;
- got_hnd = True;
+ got_hnd = true;
/* check for existing dst printer */
if (!net_spoolss_getprinter(pipe_hnd, mem_ctx, &hnd, level, &ctr_pub))
@@ -1316,7 +1316,7 @@ NTSTATUS rpc_printer_publish_list_internals(struct net_context *c,
char *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))
@@ -1345,7 +1345,7 @@ NTSTATUS rpc_printer_publish_list_internals(struct net_context *c,
PRINTER_ALL_ACCESS, cli->user_name, &hnd))
goto done;
- got_hnd = True;
+ got_hnd = true;
/* check for existing dst printer */
if (!net_spoolss_getprinter(pipe_hnd, mem_ctx, &hnd, level, &ctr_pub))
@@ -1422,8 +1422,8 @@ NTSTATUS rpc_printer_migrate_security_internals(struct net_context *c,
uint32 num_printers;
uint32 level = 2;
char *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;
@@ -1487,14 +1487,14 @@ NTSTATUS rpc_printer_migrate_security_internals(struct net_context *c,
MAXIMUM_ALLOWED_ACCESS, cli->user_name, &hnd_src))
goto done;
- got_hnd_src = True;
+ got_hnd_src = true;
/* open dst printer handle */
if (!net_spoolss_open_printer_ex(pipe_hnd_dst, mem_ctx, sharename,
PRINTER_ALL_ACCESS, cli_dst->user_name, &hnd_dst))
goto done;
- got_hnd_dst = True;
+ got_hnd_dst = true;
/* check for existing dst printer */
if (!net_spoolss_getprinter(pipe_hnd_dst, mem_ctx, &hnd_dst, level, &ctr_dst))
@@ -1522,12 +1522,12 @@ NTSTATUS rpc_printer_migrate_security_internals(struct net_context *c,
/* close printer handles here */
if (got_hnd_src) {
rpccli_spoolss_close_printer(pipe_hnd, mem_ctx, &hnd_src);
- got_hnd_src = False;
+ got_hnd_src = false;
}
if (got_hnd_dst) {
rpccli_spoolss_close_printer(pipe_hnd_dst, mem_ctx, &hnd_dst);
- got_hnd_dst = False;
+ got_hnd_dst = false;
}
}
@@ -1582,8 +1582,8 @@ NTSTATUS rpc_printer_migrate_forms_internals(struct net_context *c,
uint32 num_printers;
uint32 level = 1;
char *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;
@@ -1642,7 +1642,7 @@ NTSTATUS rpc_printer_migrate_forms_internals(struct net_context *c,
MAXIMUM_ALLOWED_ACCESS, cli->user_name, &hnd_src))
goto done;
- got_hnd_src = True;
+ got_hnd_src = true;
/* open dst printer handle */
@@ -1650,7 +1650,7 @@ NTSTATUS rpc_printer_migrate_forms_internals(struct net_context *c,
PRINTER_ALL_ACCESS, cli->user_name, &hnd_dst))
goto done;
- got_hnd_dst = True;
+ got_hnd_dst = true;
/* check for existing dst printer */
@@ -1710,12 +1710,12 @@ NTSTATUS rpc_printer_migrate_forms_internals(struct net_context *c,
/* close printer handles here */
if (got_hnd_src) {
rpccli_spoolss_close_printer(pipe_hnd, mem_ctx, &hnd_src);
- got_hnd_src = False;
+ got_hnd_src = false;
}
if (got_hnd_dst) {
rpccli_spoolss_close_printer(pipe_hnd_dst, mem_ctx, &hnd_dst);
- got_hnd_dst = False;
+ got_hnd_dst = false;
}
}
@@ -1766,10 +1766,10 @@ NTSTATUS rpc_printer_migrate_drivers_internals(struct net_context *c,
uint32 num_printers;
uint32 level = 3;
char *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;
@@ -1796,7 +1796,7 @@ NTSTATUS rpc_printer_migrate_drivers_internals(struct net_context *c,
if (!NT_STATUS_IS_OK(nt_status))
goto done;
- got_src_driver_share = True;
+ got_src_driver_share = true;
/* open print$-share on the dst server */
@@ -1805,7 +1805,7 @@ NTSTATUS rpc_printer_migrate_drivers_internals(struct net_context *c,
if (!NT_STATUS_IS_OK(nt_status))
return nt_status;
- got_dst_driver_share = True;
+ got_dst_driver_share = true;
/* enum src printers */
@@ -1851,7 +1851,7 @@ NTSTATUS rpc_printer_migrate_drivers_internals(struct net_context *c,
PRINTER_ALL_ACCESS, cli->user_name, &hnd_dst))
goto done;
- got_hnd_dst = True;
+ got_hnd_dst = true;
/* check for existing dst printer */
if (!net_spoolss_getprinter(pipe_hnd_dst, mem_ctx, &hnd_dst, 2, &info_ctr_dst))
@@ -1865,7 +1865,7 @@ NTSTATUS rpc_printer_migrate_drivers_internals(struct net_context *c,
&hnd_src))
goto done;
- got_hnd_src = True;
+ got_hnd_src = true;
/* in a first step call getdriver for each shared printer (per arch)
@@ -1931,13 +1931,13 @@ NTSTATUS rpc_printer_migrate_drivers_internals(struct net_context *c,
/* close dst */
if (got_hnd_dst) {
rpccli_spoolss_close_printer(pipe_hnd_dst, mem_ctx, &hnd_dst);
- got_hnd_dst = False;
+ got_hnd_dst = false;
}
/* close src */
if (got_hnd_src) {
rpccli_spoolss_close_printer(pipe_hnd, mem_ctx, &hnd_src);
- got_hnd_src = False;
+ got_hnd_src = false;
}
}
@@ -2000,8 +2000,8 @@ NTSTATUS rpc_printer_migrate_printers_internals(struct net_context *c,
struct cli_state *cli_dst = NULL;
POLICY_HND hnd_dst, hnd_src;
char *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"));
@@ -2053,7 +2053,7 @@ NTSTATUS rpc_printer_migrate_printers_internals(struct net_context *c,
DEBUG(1,("could not open printer: %s\n", sharename));
} else {
- got_hnd_dst = True;
+ got_hnd_dst = true;
}
/* check for existing dst printer */
@@ -2064,7 +2064,7 @@ NTSTATUS rpc_printer_migrate_printers_internals(struct net_context *c,
/* close printer handle here - dst only, not got src yet. */
if (got_hnd_dst) {
rpccli_spoolss_close_printer(pipe_hnd_dst, mem_ctx, &hnd_dst);
- got_hnd_dst = False;
+ got_hnd_dst = false;
}
continue;
}
@@ -2077,7 +2077,7 @@ NTSTATUS rpc_printer_migrate_printers_internals(struct net_context *c,
MAXIMUM_ALLOWED_ACCESS, cli->user_name, &hnd_src))
goto done;
- got_hnd_src = True;
+ got_hnd_src = true;
/* getprinter on the src server */
if (!net_spoolss_getprinter(pipe_hnd, mem_ctx, &hnd_src, level, &ctr_src))
@@ -2100,12 +2100,12 @@ NTSTATUS rpc_printer_migrate_printers_internals(struct net_context *c,
/* close printer handles here */
if (got_hnd_src) {
rpccli_spoolss_close_printer(pipe_hnd, mem_ctx, &hnd_src);
- got_hnd_src = False;
+ got_hnd_src = false;
}
if (got_hnd_dst) {
rpccli_spoolss_close_printer(pipe_hnd_dst, mem_ctx, &hnd_dst);
- got_hnd_dst = False;
+ got_hnd_dst = false;
}
}
@@ -2160,8 +2160,8 @@ NTSTATUS rpc_printer_migrate_settings_internals(struct net_context *c,
uint32 num_printers, val_needed, data_needed;
uint32 level = 2;
char *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;
@@ -2231,7 +2231,7 @@ NTSTATUS rpc_printer_migrate_settings_internals(struct net_context *c,
MAXIMUM_ALLOWED_ACCESS, cli->user_name, &hnd_src))
goto done;
- got_hnd_src = True;
+ got_hnd_src = true;
/* open dst printer handle */
@@ -2239,7 +2239,7 @@ NTSTATUS rpc_printer_migrate_settings_internals(struct net_context *c,
PRINTER_ALL_ACCESS, cli_dst->user_name, &hnd_dst))
goto done;
- got_hnd_dst = True;
+ got_hnd_dst = true;
/* check for existing dst printer */
@@ -2267,7 +2267,7 @@ NTSTATUS rpc_printer_migrate_settings_internals(struct net_context *c,
ctr_dst_publish.printers_7->action = SPOOL_DS_PUBLISH;
- /* ignore False from setprinter due to WERR_IO_PENDING */
+ /* ignore false from setprinter due to WERR_IO_PENDING */
net_spoolss_setprinter(pipe_hnd_dst, mem_ctx, &hnd_dst, 7, &ctr_dst_publish);
DEBUG(3,("republished printer\n"));
@@ -2482,12 +2482,12 @@ NTSTATUS rpc_printer_migrate_settings_internals(struct net_context *c,
/* close printer handles here */
if (got_hnd_src) {
rpccli_spoolss_close_printer(pipe_hnd, mem_ctx, &hnd_src);
- got_hnd_src = False;
+ got_hnd_src = false;
}
if (got_hnd_dst) {
rpccli_spoolss_close_printer(pipe_hnd_dst, mem_ctx, &hnd_dst);
- got_hnd_dst = False;
+ got_hnd_dst = false;
}
}
diff --git a/source3/utils/net_rpc_registry.c b/source3/utils/net_rpc_registry.c
index bc46fbb52e..accd731191 100644
--- a/source3/utils/net_rpc_registry.c
+++ b/source3/utils/net_rpc_registry.c
@@ -959,7 +959,7 @@ static bool dump_registry_tree( REGF_FILE *file, REGF_NK_REC *nk, const char *pa
SAFE_FREE(regpath);
}
- return True;
+ return true;
}
/********************************************************************
@@ -977,13 +977,13 @@ static bool write_registry_tree( REGF_FILE *infile, REGF_NK_REC *nk,
if ( !( subkeys = TALLOC_ZERO_P( infile->mem_ctx, REGSUBKEY_CTR )) ) {
DEBUG(0,("write_registry_tree: talloc() failed!\n"));
- return False;
+ return false;
}
if ( !(values = TALLOC_ZERO_P( subkeys, REGVAL_CTR )) ) {
DEBUG(0,("write_registry_tree: talloc() failed!\n"));
TALLOC_FREE(subkeys);
- return False;
+ return false;
}
/* copy values into the REGVAL_CTR */
@@ -1021,7 +1021,7 @@ static bool write_registry_tree( REGF_FILE *infile, REGF_NK_REC *nk,
d_printf("[%s]\n", path );
TALLOC_FREE(subkeys);
- return True;
+ return true;
}
/********************************************************************
diff --git a/source3/utils/net_rpc_rights.c b/source3/utils/net_rpc_rights.c
index 23ce467095..7a969a7a63 100644
--- a/source3/utils/net_rpc_rights.c
+++ b/source3/utils/net_rpc_rights.c
@@ -33,7 +33,7 @@ static NTSTATUS sid_to_name(struct rpc_pipe_client *pipe_hnd,
NTSTATUS result;
char **domains = NULL, **names = NULL;
- result = rpccli_lsa_open_policy(pipe_hnd, mem_ctx, True,
+ result = rpccli_lsa_open_policy(pipe_hnd, mem_ctx, true,
SEC_RIGHTS_MAXIMUM_ALLOWED, &pol);
if ( !NT_STATUS_IS_OK(result) )
@@ -69,7 +69,7 @@ static NTSTATUS name_to_sid(struct rpc_pipe_client *pipe_hnd,
return NT_STATUS_OK;
}
- result = rpccli_lsa_open_policy(pipe_hnd, mem_ctx, True,
+ result = rpccli_lsa_open_policy(pipe_hnd, mem_ctx, true,
SEC_RIGHTS_MAXIMUM_ALLOWED, &pol);
if ( !NT_STATUS_IS_OK(result) )
@@ -327,7 +327,7 @@ static NTSTATUS rpc_rights_list_internal(struct net_context *c,
uint16 lang_id_sys = 0;
uint16 lang_id_desc;
- result = rpccli_lsa_open_policy(pipe_hnd, mem_ctx, True,
+ result = rpccli_lsa_open_policy(pipe_hnd, mem_ctx, true,
SEC_RIGHTS_MAXIMUM_ALLOWED, &pol);
if ( !NT_STATUS_IS_OK(result) )
@@ -452,7 +452,7 @@ static NTSTATUS rpc_rights_grant_internal(struct net_context *c,
if (!NT_STATUS_IS_OK(result))
return result;
- result = rpccli_lsa_open_policy2(pipe_hnd, mem_ctx, True,
+ result = rpccli_lsa_open_policy2(pipe_hnd, mem_ctx, true,
SEC_RIGHTS_MAXIMUM_ALLOWED,
&dom_pol);
@@ -518,7 +518,7 @@ static NTSTATUS rpc_rights_revoke_internal(struct net_context *c,
if (!NT_STATUS_IS_OK(result))
return result;
- result = rpccli_lsa_open_policy2(pipe_hnd, mem_ctx, True,
+ result = rpccli_lsa_open_policy2(pipe_hnd, mem_ctx, true,
SEC_RIGHTS_MAXIMUM_ALLOWED,
&dom_pol);
diff --git a/source3/utils/net_rpc_samsync.c b/source3/utils/net_rpc_samsync.c
index bb09cc483b..bbba2c42e3 100644
--- a/source3/utils/net_rpc_samsync.c
+++ b/source3/utils/net_rpc_samsync.c
@@ -777,7 +777,7 @@ static NTSTATUS fetch_group_info(uint32_t rid,
DOM_SID group_sid;
fstring sid_string;
GROUP_MAP map;
- bool insert = True;
+ bool insert = true;
fstrcpy(name, r->group_name.string);
fstrcpy(comment, r->description.string);
@@ -790,7 +790,7 @@ static NTSTATUS fetch_group_info(uint32_t rid,
if (pdb_getgrsid(&map, group_sid)) {
if ( map.gid != -1 )
grp = getgrgid(map.gid);
- insert = False;
+ insert = false;
}
if (grp == NULL) {
@@ -909,7 +909,7 @@ static NTSTATUS fetch_group_mem_info(uint32_t rid,
unix_members = grp->gr_mem;
while (*unix_members) {
- bool is_nt_member = False;
+ bool is_nt_member = false;
for (i=0; i < r->num_rids; i++) {
if (nt_members[i] == NULL) {
/* This was a primary group */
@@ -917,7 +917,7 @@ static NTSTATUS fetch_group_mem_info(uint32_t rid,
}
if (strcmp(*unix_members, nt_members[i]) == 0) {
- is_nt_member = True;
+ is_nt_member = true;
break;
}
}
@@ -931,7 +931,7 @@ static NTSTATUS fetch_group_mem_info(uint32_t rid,
}
for (i=0; i < r->num_rids; i++) {
- bool is_unix_member = False;
+ bool is_unix_member = false;
if (nt_members[i] == NULL) {
/* This was the primary group */
@@ -942,7 +942,7 @@ static NTSTATUS fetch_group_mem_info(uint32_t rid,
while (*unix_members) {
if (strcmp(*unix_members, nt_members[i]) == 0) {
- is_unix_member = True;
+ is_unix_member = true;
break;
}
unix_members += 1;
@@ -970,7 +970,7 @@ static NTSTATUS fetch_alias_info(uint32_t rid,
DOM_SID alias_sid;
fstring sid_string;
GROUP_MAP map;
- bool insert = True;
+ bool insert = true;
fstrcpy(name, r->alias_name.string);
fstrcpy(comment, r->description.string);
@@ -982,7 +982,7 @@ static NTSTATUS fetch_alias_info(uint32_t rid,
if (pdb_getgrsid(&map, alias_sid)) {
grp = getgrgid(map.gid);
- insert = False;
+ insert = false;
}
if (grp == NULL) {
@@ -1620,7 +1620,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);
@@ -1631,25 +1631,25 @@ static int fprintf_attr(FILE *add_fd, const char *attr_name,
for (p=value; *p; p++) {
if (*p & 0x80) {
- do_base64 = True;
+ do_base64 = true;
break;
}
}
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
* on the first non-whitespace character anyway.
*/
if (!isspace(*p)) {
- only_whitespace = False;
+ only_whitespace = false;
break;
}
}
if (only_whitespace) {
- do_base64 = True;
+ do_base64 = true;
}
}
diff --git a/source3/utils/net_rpc_shell.c b/source3/utils/net_rpc_shell.c
index bfdfd4bf64..f2fa8b7e01 100644
--- a/source3/utils/net_rpc_shell.c
+++ b/source3/utils/net_rpc_shell.c
@@ -103,7 +103,7 @@ static bool net_sh_process(struct net_context *c,
NTSTATUS status;
if (argc == 0) {
- return True;
+ return true;
}
if (ctx == this_ctx) {
@@ -114,12 +114,12 @@ static bool net_sh_process(struct net_context *c,
new_ctx = this_ctx->parent;
TALLOC_FREE(this_ctx);
this_ctx = new_ctx;
- return True;
+ return true;
}
}
if (strequal(argv[0], "exit") || strequal(argv[0], "quit")) {
- return False;
+ return false;
}
if (strequal(argv[0], "help") || strequal(argv[0], "?")) {
@@ -129,7 +129,7 @@ static bool net_sh_process(struct net_context *c,
}
d_printf("%-15s %s\n", cmd->name, cmd->help);
}
- return True;
+ return true;
}
for (cmd = ctx->cmds; cmd->name != NULL; cmd++) {
@@ -141,13 +141,13 @@ static bool net_sh_process(struct net_context *c,
if (cmd->name == NULL) {
/* None found */
d_fprintf(stderr, "%s: unknown cmd\n", argv[0]);
- return True;
+ return true;
}
new_ctx = TALLOC_P(ctx, struct rpc_sh_ctx);
if (new_ctx == NULL) {
d_fprintf(stderr, "talloc failed\n");
- return False;
+ return false;
}
new_ctx->cli = ctx->cli;
new_ctx->whoami = talloc_asprintf(new_ctx, "%s %s",
@@ -170,7 +170,7 @@ static bool net_sh_process(struct net_context *c,
if (cmd->sub != NULL) {
if (argc == 0) {
this_ctx = new_ctx;
- return True;
+ return true;
}
return net_sh_process(c, new_ctx, argc, argv);
}
@@ -182,7 +182,7 @@ static bool net_sh_process(struct net_context *c,
nt_errstr(status));
}
- return True;
+ return true;
}
static struct rpc_sh_cmd sh_cmds[6] = {
@@ -268,7 +268,7 @@ int net_rpc_shell(struct net_context *c, int argc, const char **argv)
d_fprintf(stderr, "cmdline invalid: %s\n",
poptStrerror(ret));
SAFE_FREE(line);
- return False;
+ return false;
}
if ((line[0] != '\n') &&
diff --git a/source3/utils/net_sam.c b/source3/utils/net_sam.c
index 32656f0276..f603065f9c 100644
--- a/source3/utils/net_sam.c
+++ b/source3/utils/net_sam.c
@@ -1136,7 +1136,7 @@ static int net_sam_do_list(struct net_context *c, int argc, const char **argv,
return -1;
}
- while (True) {
+ while (true) {
struct samr_displayentry entry;
if (!search->next_entry(search, &entry)) {
break;
@@ -1288,8 +1288,8 @@ static int net_sam_provision(struct net_context *c, int argc, const char **argv)
goto failed;
}
- if (!lp_parm_bool(-1, "ldapsam", "trusted", False) ||
- !lp_parm_bool(-1, "ldapsam", "editposix", False)) {
+ if (!lp_parm_bool(-1, "ldapsam", "trusted", false) ||
+ !lp_parm_bool(-1, "ldapsam", "editposix", false)) {
d_fprintf(stderr, "Provisioning works only if ldapsam:trusted"
" and ldapsam:editposix are enabled.\n");
diff --git a/source3/utils/net_status.c b/source3/utils/net_status.c
index d4a95a7ca5..121577f165 100644
--- a/source3/utils/net_status.c
+++ b/source3/utils/net_status.c
@@ -55,9 +55,9 @@ static int net_status_sessions(struct net_context *c, int argc, const char **arg
bool parseable;
if (argc == 0) {
- parseable = False;
+ parseable = false;
} else if ((argc == 1) && strequal(argv[0], "parseable")) {
- parseable = True;
+ parseable = true;
} else {
return net_help_status(c, argc, argv);
}
@@ -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;
@@ -152,7 +152,7 @@ static int show_share_parseable(struct db_record *rec,
for (i=0; i<ids->num_entries; i++) {
struct server_id id = ids->entries[i].pid;
if (procid_equal(&id, &crec->pid)) {
- guest = False;
+ guest = false;
break;
}
}
diff --git a/source3/utils/net_usershare.c b/source3/utils/net_usershare.c
index fe03cc615a..347107fb6e 100644
--- a/source3/utils/net_usershare.c
+++ b/source3/utils/net_usershare.c
@@ -328,7 +328,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';
@@ -479,7 +479,7 @@ static int info_fn(struct file_list *fl, void *priv)
static int net_usershare_info(struct net_context *c, 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;
@@ -487,7 +487,7 @@ static int net_usershare_info(struct net_context *c, int argc, const char **argv
fstrcpy(wcard, "*");
if (c->opt_long_list_entries) {
- only_ours = False;
+ only_ours = false;
}
switch (argc) {
@@ -606,7 +606,7 @@ static int net_usershare_add(struct net_context *c, 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 = "";
@@ -647,11 +647,11 @@ static int net_usershare_add(struct net_context *c, int argc, const char **argv)
switch (argv[4][9]) {
case 'y':
case 'Y':
- guest_ok = True;
+ guest_ok = true;
break;
case 'n':
case 'N':
- guest_ok = False;
+ guest_ok = false;
break;
default:
TALLOC_FREE(ctx);
@@ -746,7 +746,7 @@ static int net_usershare_add(struct net_context *c, int argc, const char **argv)
if ((myeuid != 0) && lp_usershare_owner_only() && (myeuid != sbuf.st_uid)) {
d_fprintf(stderr, "net usershare add: cannot share path %s as "
"we are restricted to only sharing directories we own.\n"
- "\tAsk the administrator to add the line \"usershare owner only = False\" \n"
+ "\tAsk the administrator to add the line \"usershare owner only = false\" \n"
"\tto the [global] section of the smb.conf to allow this.\n",
us_path );
TALLOC_FREE(ctx);
@@ -958,7 +958,7 @@ static int net_usershare_list(struct net_context *c, 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;
@@ -966,7 +966,7 @@ static int net_usershare_list(struct net_context *c, int argc,
fstrcpy(wcard, "*");
if (c->opt_long_list_entries) {
- only_ours = False;
+ only_ours = false;
}
switch (argc) {
diff --git a/source3/utils/net_util.c b/source3/utils/net_util.c
index db3e51b9b3..ebf9fe9993 100644
--- a/source3/utils/net_util.c
+++ b/source3/utils/net_util.c
@@ -42,7 +42,7 @@ NTSTATUS net_rpc_lookup_name(struct net_context *c,
return result;
}
- result = rpccli_lsa_open_policy(lsa_pipe, mem_ctx, False,
+ result = rpccli_lsa_open_policy(lsa_pipe, mem_ctx, false,
SEC_RIGHTS_MAXIMUM_ALLOWED,
&pol);
if (!NT_STATUS_IS_OK(result)) {
diff --git a/source3/utils/netlookup.c b/source3/utils/netlookup.c
index 7d144cf624..844db51fc0 100644
--- a/source3/utils/netlookup.c
+++ b/source3/utils/netlookup.c
@@ -112,7 +112,7 @@ static struct con_struct *create_cs(struct net_context *c,
if (!NT_STATUS_IS_OK(nt_status)) {
DEBUG(2,("create_cs: Connect failed. Error was %s\n", nt_errstr(nt_status)));
- cs->failed_connect = True;
+ cs->failed_connect = true;
cs->err = nt_status;
*perr = nt_status;
return NULL;
@@ -124,19 +124,19 @@ static struct con_struct *create_cs(struct net_context *c,
if (cs->lsapipe == NULL) {
DEBUG(2,("create_cs: open LSA pipe failed. Error was %s\n", nt_errstr(nt_status)));
- cs->failed_connect = True;
+ cs->failed_connect = true;
cs->err = nt_status;
*perr = nt_status;
return NULL;
}
- nt_status = rpccli_lsa_open_policy(cs->lsapipe, ctx, True,
+ nt_status = rpccli_lsa_open_policy(cs->lsapipe, ctx, true,
SEC_RIGHTS_MAXIMUM_ALLOWED,
&cs->pol);
if (!NT_STATUS_IS_OK(nt_status)) {
DEBUG(2,("create_cs: rpccli_lsa_open_policy failed. Error was %s\n", nt_errstr(nt_status)));
- cs->failed_connect = True;
+ cs->failed_connect = true;
cs->err = nt_status;
*perr = nt_status;
return NULL;