summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source4/param/generic.c4
-rw-r--r--source4/param/params.c62
-rw-r--r--source4/param/secrets.c4
-rw-r--r--source4/param/share.c2
-rw-r--r--source4/param/share.h22
-rw-r--r--source4/param/share_classic.c4
-rw-r--r--source4/param/share_ldb.c16
-rw-r--r--source4/param/util.c6
8 files changed, 60 insertions, 60 deletions
diff --git a/source4/param/generic.c b/source4/param/generic.c
index 6e9a8e60e4..d65502c02d 100644
--- a/source4/param/generic.c
+++ b/source4/param/generic.c
@@ -202,7 +202,7 @@ static bool param_pfunc (const char *name, const char *value, void *_ctx)
if (!p) {
p = talloc_zero(ctx->sections, struct param_opt);
if (p == NULL)
- return False;
+ return false;
p->key = talloc_strdup(p, name);
p->value = talloc_strdup(p, value);
@@ -212,7 +212,7 @@ static bool param_pfunc (const char *name, const char *value, void *_ctx)
p->value = talloc_strdup(p, value);
}
- return True;
+ return true;
}
struct param_context *param_init(TALLOC_CTX *mem_ctx)
diff --git a/source4/param/params.c b/source4/param/params.c
index 5ee6dbea70..3a9e2b9505 100644
--- a/source4/param/params.c
+++ b/source4/param/params.c
@@ -188,7 +188,7 @@ static int Continuation(char *line, int pos )
}
-static BOOL Section( myFILE *InFile, BOOL (*sfunc)(const char *, void *), void *userdata )
+static bool Section( myFILE *InFile, bool (*sfunc)(const char *, void *), void *userdata )
/* ------------------------------------------------------------------------ **
* Scan a section name, and pass the name to function sfunc().
*
@@ -196,8 +196,8 @@ static BOOL Section( myFILE *InFile, BOOL (*sfunc)(const char *, void *), void *
* sfunc - Pointer to the function to be called if the section
* name is successfully read.
*
- * Output: True if the section name was read and True was returned from
- * <sfunc>. False if <sfunc> failed or if a lexical error was
+ * Output: true if the section name was read and true was returned from
+ * <sfunc>. false if <sfunc> failed or if a lexical error was
* encountered.
*
* ------------------------------------------------------------------------ **
@@ -229,7 +229,7 @@ static BOOL Section( myFILE *InFile, BOOL (*sfunc)(const char *, void *), void *
if( NULL == tb )
{
DEBUG(0, ("%s Memory re-allocation failure.", func) );
- return( False );
+ return( false );
}
InFile->bufr = tb;
InFile->bSize += BUFR_INC;
@@ -243,12 +243,12 @@ static BOOL Section( myFILE *InFile, BOOL (*sfunc)(const char *, void *), void *
if( 0 == end ) /* Don't allow an empty name. */
{
DEBUG(0, ("%s Empty section name in configuration file.\n", func ));
- return( False );
+ return( false );
}
if( !sfunc(InFile->bufr,userdata) ) /* Got a valid name. Deal with it. */
- return( False );
+ return( false );
(void)EatComment( InFile ); /* Finish off the line. */
- return( True );
+ return( true );
case '\n': /* Got newline before closing ']'. */
i = Continuation( InFile->bufr, i ); /* Check for line continuation. */
@@ -257,7 +257,7 @@ static BOOL Section( myFILE *InFile, BOOL (*sfunc)(const char *, void *), void *
InFile->bufr[end] = '\0';
DEBUG(0, ("%s Badly formed line in configuration file: %s\n",
func, InFile->bufr ));
- return( False );
+ return( false );
}
end = ( (i > 0) && (' ' == InFile->bufr[i - 1]) ) ? (i - 1) : (i);
c = mygetc( InFile ); /* Continue with next line. */
@@ -281,10 +281,10 @@ static BOOL Section( myFILE *InFile, BOOL (*sfunc)(const char *, void *), void *
/* We arrive here if we've met the EOF before the closing bracket. */
DEBUG(0, ("%s Unexpected EOF in the configuration file\n", func));
- return( False );
+ return( false );
} /* Section */
-static BOOL Parameter( myFILE *InFile, BOOL (*pfunc)(const char *, const char *, void *), int c, void *userdata )
+static bool Parameter( myFILE *InFile, bool (*pfunc)(const char *, const char *, void *), int c, void *userdata )
/* ------------------------------------------------------------------------ **
* Scan a parameter name and value, and pass these two fields to pfunc().
*
@@ -296,8 +296,8 @@ static BOOL Parameter( myFILE *InFile, BOOL (*pfunc)(const char *, const char *,
* line or a section header, there is no lead-in
* character that can be discarded.
*
- * Output: True if the parameter name and value were scanned and processed
- * successfully, else False.
+ * Output: true if the parameter name and value were scanned and processed
+ * successfully, else false.
*
* Notes: This function is in two parts. The first loop scans the
* parameter name. Internal whitespace is compressed, and an
@@ -326,7 +326,7 @@ static BOOL Parameter( myFILE *InFile, BOOL (*pfunc)(const char *, const char *,
if( NULL == tb )
{
DEBUG(0, ("%s Memory re-allocation failure.", func) );
- return( False );
+ return( false );
}
InFile->bufr = tb;
InFile->bSize += BUFR_INC;
@@ -338,7 +338,7 @@ static BOOL Parameter( myFILE *InFile, BOOL (*pfunc)(const char *, const char *,
if( 0 == end ) /* Don't allow an empty name. */
{
DEBUG(0, ("%s Invalid parameter name in config. file.\n", func ));
- return( False );
+ return( false );
}
InFile->bufr[end++] = '\0'; /* Mark end of string & advance. */
i = end; /* New string starts here. */
@@ -353,7 +353,7 @@ static BOOL Parameter( myFILE *InFile, BOOL (*pfunc)(const char *, const char *,
InFile->bufr[end] = '\0';
DEBUG(1,("%s Ignoring badly formed line in configuration file: %s\n",
func, InFile->bufr ));
- return( True );
+ return( true );
}
end = ( (i > 0) && (' ' == InFile->bufr[i - 1]) ) ? (i - 1) : (i);
c = mygetc( InFile ); /* Read past eoln. */
@@ -363,7 +363,7 @@ static BOOL Parameter( myFILE *InFile, BOOL (*pfunc)(const char *, const char *,
case EOF:
InFile->bufr[i] = '\0';
DEBUG(1,("%s Unexpected end-of-file at: %s\n", func, InFile->bufr ));
- return( True );
+ return( true );
default:
if( isspace( c ) ) /* One ' ' per whitespace region. */
@@ -394,7 +394,7 @@ static BOOL Parameter( myFILE *InFile, BOOL (*pfunc)(const char *, const char *,
if( NULL == tb )
{
DEBUG(0, ("%s Memory re-allocation failure.", func) );
- return( False );
+ return( false );
}
InFile->bufr = tb;
InFile->bSize += BUFR_INC;
@@ -431,9 +431,9 @@ static BOOL Parameter( myFILE *InFile, BOOL (*pfunc)(const char *, const char *,
return( pfunc( InFile->bufr, &InFile->bufr[vstart], userdata ) ); /* Pass name & value to pfunc(). */
} /* Parameter */
-static BOOL Parse( myFILE *InFile,
- BOOL (*sfunc)(const char *, void *),
- BOOL (*pfunc)(const char *, const char *, void *),
+static bool Parse( myFILE *InFile,
+ bool (*sfunc)(const char *, void *),
+ bool (*pfunc)(const char *, const char *, void *),
void *userdata )
/* ------------------------------------------------------------------------ **
* Scan & parse the input.
@@ -444,7 +444,7 @@ static BOOL Parse( myFILE *InFile,
* pfunc - Function to be called when a parameter is scanned.
* See Parameter().
*
- * Output: True if the file was successfully scanned, else False.
+ * Output: true if the file was successfully scanned, else false.
*
* Notes: The input can be viewed in terms of 'lines'. There are four
* types of lines:
@@ -475,7 +475,7 @@ static BOOL Parse( myFILE *InFile,
case '[': /* Section Header. */
if( !Section( InFile, sfunc, userdata ) )
- return( False );
+ return( false );
c = EatWhitespace( InFile );
break;
@@ -485,12 +485,12 @@ static BOOL Parse( myFILE *InFile,
default: /* Parameter line. */
if( !Parameter( InFile, pfunc, c, userdata ) )
- return( False );
+ return( false );
c = EatWhitespace( InFile );
break;
}
}
- return( True );
+ return( true );
} /* Parse */
static myFILE *OpenConfFile( const char *FileName )
@@ -526,9 +526,9 @@ static myFILE *OpenConfFile( const char *FileName )
return( ret );
} /* OpenConfFile */
-BOOL pm_process( const char *FileName,
- BOOL (*sfunc)(const char *, void *),
- BOOL (*pfunc)(const char *, const char *, void *),
+bool pm_process( const char *FileName,
+ bool (*sfunc)(const char *, void *),
+ bool (*pfunc)(const char *, const char *, void *),
void *userdata)
/* ------------------------------------------------------------------------ **
* Process the named parameter file.
@@ -550,7 +550,7 @@ BOOL pm_process( const char *FileName,
InFile = OpenConfFile( FileName ); /* Open the config file. */
if( NULL == InFile )
- return( False );
+ return( false );
DEBUG( 3, ("%s Processing configuration file \"%s\"\n", func, FileName) );
@@ -566,7 +566,7 @@ BOOL pm_process( const char *FileName,
{
DEBUG(0,("%s memory allocation failure.\n", func));
myfile_close(InFile);
- return( False );
+ return( false );
}
result = Parse( InFile, sfunc, pfunc, userdata );
InFile->bufr = NULL;
@@ -578,10 +578,10 @@ BOOL pm_process( const char *FileName,
if( !result ) /* Generic failure. */
{
DEBUG(0,("%s Failed. Error returned from params.c:parse().\n", func));
- return( False );
+ return( false );
}
- return( True ); /* Generic success. */
+ return( true ); /* Generic success. */
} /* pm_process */
/* -------------------------------------------------------------------------- */
diff --git a/source4/param/secrets.c b/source4/param/secrets.c
index 829341a5f9..6640fd473d 100644
--- a/source4/param/secrets.c
+++ b/source4/param/secrets.c
@@ -86,7 +86,7 @@ bool secrets_init(void)
/* Ensure that the reseed is done now, while we are root, etc */
generate_random_buffer(&dummy, sizeof(dummy));
- return True;
+ return true;
}
/*
@@ -97,7 +97,7 @@ struct ldb_context *secrets_db_connect(TALLOC_CTX *mem_ctx)
char *path;
const char *url;
struct ldb_context *ldb;
- BOOL existed;
+ bool existed;
const char *init_ldif =
"dn: @ATTRIBUTES\n" \
"computerName: CASE_INSENSITIVE\n" \
diff --git a/source4/param/share.c b/source4/param/share.c
index d0a570eeca..489049f39f 100644
--- a/source4/param/share.c
+++ b/source4/param/share.c
@@ -34,7 +34,7 @@ int share_int_option(struct share_config *scfg, const char *opt_name, int defval
return scfg->ctx->ops->int_option(scfg, opt_name, defval);
}
-BOOL share_bool_option(struct share_config *scfg, const char *opt_name, BOOL defval)
+bool share_bool_option(struct share_config *scfg, const char *opt_name, bool defval)
{
return scfg->ctx->ops->bool_option(scfg, opt_name, defval);
}
diff --git a/source4/param/share.h b/source4/param/share.h
index 4e16f03715..c93d0d9857 100644
--- a/source4/param/share.h
+++ b/source4/param/share.h
@@ -103,8 +103,8 @@ struct share_ops {
#define SHARE_VOLUME_DEFAULT NULL
#define SHARE_TYPE_DEFAULT "DISK"
#define SHARE_CSC_POLICY_DEFAULT 0
-#define SHARE_AVAILABLE_DEFAULT True
-#define SHARE_BROWSEABLE_DEFAULT True
+#define SHARE_AVAILABLE_DEFAULT true
+#define SHARE_BROWSEABLE_DEFAULT true
#define SHARE_MAX_CONNECTIONS_DEFAULT 0
#define SHARE_DIR_MASK_DEFAULT 0755
@@ -116,14 +116,14 @@ struct share_ops {
/* I'd like to see the following options go away
* and always use EAs and SECDESCs */
-#define SHARE_READONLY_DEFAULT True
-#define SHARE_MAP_SYSTEM_DEFAULT False
-#define SHARE_MAP_HIDDEN_DEFAULT False
-#define SHARE_MAP_ARCHIVE_DEFAULT True
-
-#define SHARE_STRICT_LOCKING_DEFAULT True
-#define SHARE_STRICT_SYNC_DEFAULT False
-#define SHARE_MSDFS_ROOT_DEFAULT False
-#define SHARE_CI_FILESYSTEM_DEFAULT False
+#define SHARE_READONLY_DEFAULT true
+#define SHARE_MAP_SYSTEM_DEFAULT false
+#define SHARE_MAP_HIDDEN_DEFAULT false
+#define SHARE_MAP_ARCHIVE_DEFAULT true
+
+#define SHARE_STRICT_LOCKING_DEFAULT true
+#define SHARE_STRICT_SYNC_DEFAULT false
+#define SHARE_MSDFS_ROOT_DEFAULT false
+#define SHARE_CI_FILESYSTEM_DEFAULT false
#endif /* _SHARE_H */
diff --git a/source4/param/share_classic.c b/source4/param/share_classic.c
index 08d01af6e2..cf140f0d32 100644
--- a/source4/param/share_classic.c
+++ b/source4/param/share_classic.c
@@ -158,12 +158,12 @@ static bool sclassic_bool_option(struct share_config *scfg, const char *opt_name
struct loadparm_service *s = talloc_get_type(scfg->opaque,
struct loadparm_service);
char *parm, *val;
- BOOL ret;
+ bool ret;
if (strchr(opt_name, ':')) {
parm = talloc_strdup(scfg, opt_name);
if(!parm) {
- return False;
+ return false;
}
val = strchr(parm, ':');
*val = '\0';
diff --git a/source4/param/share_ldb.c b/source4/param/share_ldb.c
index 5ddf0e3511..019b161639 100644
--- a/source4/param/share_ldb.c
+++ b/source4/param/share_ldb.c
@@ -99,16 +99,16 @@ static int sldb_int_option(struct share_config *scfg, const char *opt_name, int
return ret;
}
-static BOOL sldb_bool_option(struct share_config *scfg, const char *opt_name, BOOL defval)
+static bool sldb_bool_option(struct share_config *scfg, const char *opt_name, bool defval)
{
const char *val;
val = sldb_string_option(scfg, opt_name, NULL);
if (val == NULL) return defval;
- if (strcasecmp(val, "true") == 0) return True;
+ if (strcasecmp(val, "true") == 0) return true;
- return False;
+ return false;
}
static const char **sldb_string_list_option(TALLOC_CTX *mem_ctx, struct share_config *scfg, const char *opt_name)
@@ -355,9 +355,9 @@ NTSTATUS sldb_create(struct share_context *ctx, const char *name, struct share_i
/* TODO: Security Descriptor */
- SHARE_ADD_STRING(SHARE_AVAILABLE, "True");
- SHARE_ADD_STRING(SHARE_BROWSEABLE, "True");
- SHARE_ADD_STRING(SHARE_READONLY, "False");
+ SHARE_ADD_STRING(SHARE_AVAILABLE, "true");
+ SHARE_ADD_STRING(SHARE_BROWSEABLE, "true");
+ SHARE_ADD_STRING(SHARE_READONLY, "false");
SHARE_ADD_STRING(SHARE_NTVFS_HANDLER, "unixuid");
SHARE_ADD_STRING(SHARE_NTVFS_HANDLER, "posix");
@@ -429,7 +429,7 @@ NTSTATUS sldb_set(struct share_context *ctx, const char *name, struct share_info
struct ldb_message *msg;
TALLOC_CTX *tmp_ctx;
NTSTATUS ret;
- bool do_rename = False;
+ bool do_rename = false;
char *newname;
int err, i;
@@ -463,7 +463,7 @@ NTSTATUS sldb_set(struct share_context *ctx, const char *name, struct share_info
for (i = 0; i < count; i++) {
if (strcasecmp(info[i].name, SHARE_NAME) == 0) {
if (strcasecmp(name, (char *)info[i].value) != 0) {
- do_rename = True;
+ do_rename = true;
newname = (char *)info[i].value;
SHARE_MOD_STRING("cn", (char *)info[i].value);
}
diff --git a/source4/param/util.c b/source4/param/util.c
index 9c682a7791..8d59861f40 100644
--- a/source4/param/util.c
+++ b/source4/param/util.c
@@ -51,17 +51,17 @@ _PUBLIC_ bool lp_is_myname(struct loadparm_context *lp_ctx, const char *name)
int i;
if (strcasecmp(name, lp_netbios_name(lp_ctx)) == 0) {
- return True;
+ return true;
}
aliases = lp_netbios_aliases(lp_ctx);
for (i=0; aliases && aliases[i]; i++) {
if (strcasecmp(name, aliases[i]) == 0) {
- return True;
+ return true;
}
}
- return False;
+ return false;
}