[SCM] Samba Shared Repository - branch v3-2-test updated -
release-3-2-0pre2-3559-gde6f099
Michael Adam
obnox at samba.org
Fri Apr 17 13:03:31 GMT 2009
The branch, v3-2-test has been updated
via de6f09988d84752e5333cba1fa69c5a685e903b7 (commit)
from 642afabf26dbb7d0f73c15c5502a90020f65a914 (commit)
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test
- Log -----------------------------------------------------------------
commit de6f09988d84752e5333cba1fa69c5a685e903b7
Author: Michael Adam <obnox at samba.org>
Date: Fri Apr 17 11:40:17 2009 +0200
s3:registry: Prevent creation of keys containing the '/' character.
Even though "net conf setparm abc/def comment xyz" does not
create a broken registry we do not want such keys to be created.
Since we get problems accessing these with "net registry" since
the registry code treats the '/' sign as a separator as a lower
level.
This makes e.g. "net conf setparm abc/def comment xyz" fail with
WERR_INVALID_PARAM, which is much more desirable than a broken
registry.tdb.
Michael
-----------------------------------------------------------------------
Summary of changes:
source/registry/reg_api.c | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source/registry/reg_api.c b/source/registry/reg_api.c
index e9a7145..4678636 100644
--- a/source/registry/reg_api.c
+++ b/source/registry/reg_api.c
@@ -455,6 +455,16 @@ WERROR reg_createkey(TALLOC_CTX *ctx, struct registry_key *parent,
char *path, *end;
WERROR err;
+ /*
+ * We must refuse to handle subkey-paths containing
+ * a '/' character because at a lower level, after
+ * normalization, '/' is treated as a key separator
+ * just like '\\'.
+ */
+ if (strchr(subkeypath, '/') != NULL) {
+ return WERR_INVALID_PARAM;
+ }
+
if (!(mem_ctx = talloc_new(ctx))) return WERR_NOMEM;
if (!(path = talloc_strdup(mem_ctx, subkeypath))) {
--
Samba Shared Repository
More information about the samba-cvs
mailing list