The Samba-Bugzilla – Attachment 3109 Details for
Bug 5178
Registry backend: Problems when editing with regedit
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Allow changing data for existing values.
patch-2 (text/plain), 843 bytes, created by
Andrew Kroeger
on 2008-01-17 14:51:48 UTC
(
hide
)
Description:
Allow changing data for existing values.
Filename:
MIME Type:
Creator:
Andrew Kroeger
Created:
2008-01-17 14:51:48 UTC
Size:
843 bytes
patch
obsolete
>diff --git a/source/lib/registry/ldb.c b/source/lib/registry/ldb.c >index af9d14d..2f80ea9 100644 >--- a/source/lib/registry/ldb.c >+++ b/source/lib/registry/ldb.c >@@ -469,7 +469,7 @@ static WERROR ldb_set_value(struct hive_key *parent, > { > struct ldb_message *msg; > struct ldb_key_data *kd = talloc_get_type(parent, struct ldb_key_data); >- int ret; >+ int i, ret; > TALLOC_CTX *mem_ctx = talloc_init("ldb_set_value"); > > msg = reg_ldb_pack_value(kd->ldb, mem_ctx, name, type, data); >@@ -479,6 +479,9 @@ static WERROR ldb_set_value(struct hive_key *parent, > > ret = ldb_add(kd->ldb, msg); > if (ret != LDB_SUCCESS) { >+ for (i = 0; i < msg->num_elements; i++) { >+ msg->elements[i].flags = LDB_FLAG_MOD_REPLACE; >+ } > ret = ldb_modify(kd->ldb, msg); > if (ret != LDB_SUCCESS) { > DEBUG(1, ("ldb_msg_add: %s\n", ldb_errstring(kd->ldb)));
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 5178
:
3090
|
3108
|
3109
|
3110
|
3111
|
3112
|
3113
|
3152
|
3400
|
3464
|
3466
|
3472
|
3473
|
3474
|
3480
|
3481
|
3497
|
3572