The branch, master has been updated via 2a0340b... s3:registry: remove unused function normalize_dbkey() via 5cac4e6... s3:registry: use normalize_reg_path() in regdb_set_secdesc() via 4c94825... s3:registry: use normalize_reg_path() in regdb_get_secdesc() from 8ad0161... Revert "s4:provision.ldif - fix the number of available RIDs"
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log ----------------------------------------------------------------- commit 2a0340baa35163d04537b0606f58ab77a1d39108 Author: Michael Adam <ob...@samba.org> Date: Thu Jun 24 15:32:46 2010 +0200 s3:registry: remove unused function normalize_dbkey() commit 5cac4e648c635f4f3a46a5878827414a2cb80366 Author: Michael Adam <ob...@samba.org> Date: Thu Jun 24 15:31:06 2010 +0200 s3:registry: use normalize_reg_path() in regdb_set_secdesc() instead of normalize_dbkey commit 4c948251d97bea9429d3fa24f98814ac57f4d525 Author: Michael Adam <ob...@samba.org> Date: Thu Jun 24 15:30:31 2010 +0200 s3:registry: use normalize_reg_path() in regdb_get_secdesc() instead of normalize_dbkey. ----------------------------------------------------------------------- Summary of changes: source3/registry/reg_backend_db.c | 14 ++++++++++++-- source3/registry/reg_util_internal.c | 10 ---------- source3/registry/reg_util_internal.h | 1 - 3 files changed, 12 insertions(+), 13 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/registry/reg_backend_db.c b/source3/registry/reg_backend_db.c index 0c90618..4e7f855 100644 --- a/source3/registry/reg_backend_db.c +++ b/source3/registry/reg_backend_db.c @@ -1740,7 +1740,12 @@ static WERROR regdb_get_secdesc(TALLOC_CTX *mem_ctx, const char *key, err = WERR_NOMEM; goto done; } - normalize_dbkey(tdbkey); + + tdbkey = normalize_reg_path(tmp_ctx, tdbkey); + if (tdbkey == NULL) { + err = WERR_NOMEM; + goto done; + } data = dbwrap_fetch_bystring(regdb, tmp_ctx, tdbkey); if (data.dptr == NULL) { @@ -1779,7 +1784,12 @@ static WERROR regdb_set_secdesc(const char *key, if (tdbkey == NULL) { goto done; } - normalize_dbkey(tdbkey); + + tdbkey = normalize_reg_path(mem_ctx, tdbkey); + if (tdbkey == NULL) { + err = WERR_NOMEM; + goto done; + } if (secdesc == NULL) { /* assuming a delete */ diff --git a/source3/registry/reg_util_internal.c b/source3/registry/reg_util_internal.c index 4cf8e28..47e2ce5 100644 --- a/source3/registry/reg_util_internal.c +++ b/source3/registry/reg_util_internal.c @@ -120,16 +120,6 @@ char *normalize_reg_path(TALLOC_CTX *ctx, const char *keyname ) return nkeyname; } -/** - * normalize ther registry path in place. - */ -void normalize_dbkey(char *key) -{ - size_t len = strlen(key); - string_sub(key, "\\", "/", len+1); - strupper_m(key); -} - /********************************************************************** move to next non-delimter character *********************************************************************/ diff --git a/source3/registry/reg_util_internal.h b/source3/registry/reg_util_internal.h index 886e58c..0cb370e 100644 --- a/source3/registry/reg_util_internal.h +++ b/source3/registry/reg_util_internal.h @@ -23,7 +23,6 @@ bool reg_split_path(char *path, char **base, char **new_path); bool reg_split_key(char *path, char **base, char **key); char *normalize_reg_path(TALLOC_CTX *ctx, const char *keyname ); -void normalize_dbkey(char *key); char *reg_remaining_path(TALLOC_CTX *ctx, const char *key); #endif /* _REG_UTIL_H */ -- Samba Shared Repository