[SCM] SAMBA-CTDB repository - branch v3-2-ctdb updated -
build_3.2.11_ctdb.59-5-g993608e
Michael Adam
obnox at samba.org
Tue Apr 28 13:57:37 GMT 2009
The branch, v3-2-ctdb has been updated
via 993608e2fa84e43b8195a53e2c3f2024f0e92b8e (commit)
via 074229796c4ca9827238e7fee7aca5a95c7ada05 (commit)
via 43a2a26956298a0e12a79880107324784f9ec7de (commit)
from e407636d9bcdc88ca6e21dfd78c016302c6553f3 (commit)
http://gitweb.samba.org/?p=obnox/samba-ctdb.git;a=shortlog;h=v3-2-ctdb
- Log -----------------------------------------------------------------
commit 993608e2fa84e43b8195a53e2c3f2024f0e92b8e
Author: Michael Adam <obnox at samba.org>
Date: Tue Apr 28 15:52:44 2009 +0200
pm_process():raise level of debug message
Michael
commit 074229796c4ca9827238e7fee7aca5a95c7ada05
Author: Michael Adam <obnox at samba.org>
Date: Mon Apr 27 18:10:14 2009 +0200
s3:loadparm: prevent infinite include nesting.
This introduces a hard coded MAX_INCLUDE_DEPTH of 100.
When this is exceeded, handle_include (and hence lp_load) fails.
One could of course implement a more intelligent loop detection
in the include-tree, but this would require some restructuring
of the internal loadparm housekeeping. Maybe as a second improvement
step.
Michael
commit 43a2a26956298a0e12a79880107324784f9ec7de
Author: Michael Adam <obnox at samba.org>
Date: Tue Apr 28 01:24:27 2009 +0200
s3:mark registry shares without path unavailable just as with text config
This prevents users from getting access to "/" in misconfigured setups.
Michael
Signed-off-by: Michael Adam <obnox at samba.org>
-----------------------------------------------------------------------
Summary of changes:
source/param/loadparm.c | 24 ++++++++++++++++++++++--
source/param/params.c | 2 +-
2 files changed, 23 insertions(+), 3 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source/param/loadparm.c b/source/param/loadparm.c
index a17cb1f..f6f2486 100644
--- a/source/param/loadparm.c
+++ b/source/param/loadparm.c
@@ -6529,6 +6529,9 @@ static bool process_registry_service(struct smbconf_service *service)
return false;
}
}
+ if (iServiceIndex >= 0) {
+ ret = service_ok(iServiceIndex);
+ }
return true;
}
@@ -6616,6 +6619,10 @@ done:
return ret;
}
+#define MAX_INCLUDE_DEPTH 100
+
+static uint8_t include_depth;
+
static struct file_lists {
struct file_lists *next;
char *name;
@@ -6803,12 +6810,22 @@ static bool handle_include(int snum, const char *pszParmValue, char **ptr)
{
char *fname;
+ if (include_depth >= MAX_INCLUDE_DEPTH) {
+ DEBUG(0, ("Error: Maximum include depth (%u) exceeded!\n",
+ include_depth));
+ return false;
+ }
+
if (strequal(pszParmValue, INCLUDE_REGISTRY_NAME)) {
if (!bAllowIncludeRegistry) {
return true;
}
if (bInGlobalSection) {
- return process_registry_globals();
+ bool ret;
+ include_depth++;
+ ret = process_registry_globals();
+ include_depth--;
+ return ret;
} else {
DEBUG(1, ("\"include = registry\" only effective "
"in %s section\n", GLOBAL_NAME));
@@ -6825,7 +6842,10 @@ static bool handle_include(int snum, const char *pszParmValue, char **ptr)
string_set(ptr, fname);
if (file_exist(fname, NULL)) {
- bool ret = pm_process(fname, do_section, do_parameter, NULL);
+ bool ret;
+ include_depth++;
+ ret = pm_process(fname, do_section, do_parameter, NULL);
+ include_depth--;
SAFE_FREE(fname);
return ret;
}
diff --git a/source/param/params.c b/source/param/params.c
index 478376c..bbdb869 100644
--- a/source/param/params.c
+++ b/source/param/params.c
@@ -582,7 +582,7 @@ bool pm_process( const char *FileName,
myfile_close(InFile);
if( !result ) {
- DEBUG(0,("%s Failed. Error returned from params.c:parse().\n", func));
+ DEBUG(3,("%s Failed. Error returned from params.c:parse().\n", func));
return False;
}
--
SAMBA-CTDB repository
More information about the samba-cvs
mailing list