The Samba-Bugzilla – Attachment 12853 Details for
Bug 12399
replmd_update_rpmd_rdn_attr doesn't normalize rdn attribute name
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch for v4-5-test
tmp45.diff.txt (text/plain), 1.72 KB, created by
Stefan Metzmacher
on 2017-01-27 09:47:33 UTC
(
hide
)
Description:
Patch for v4-5-test
Filename:
MIME Type:
Creator:
Stefan Metzmacher
Created:
2017-01-27 09:47:33 UTC
Size:
1.72 KB
patch
obsolete
>From 76a07fe9a11a0f2ad515704243df2c0771b7799c Mon Sep 17 00:00:00 2001 >From: Stefan Metzmacher <metze@samba.org> >Date: Sun, 30 Oct 2016 23:54:44 +0100 >Subject: [PATCH] s4:repl_meta_data: normalize rdn attribute name via the > schema > >BUG: https://bugzilla.samba.org/show_bug.cgi?id=12399 > >Signed-off-by: Stefan Metzmacher <metze@samba.org> > >Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> >Autobuild-Date(master): Thu Dec 8 17:16:47 CET 2016 on sn-devel-144 > >(cherry picked from commit ec0297bbd0110f8bfddda2e21d94a882094d1c11) >--- > source4/dsdb/samdb/ldb_modules/repl_meta_data.c | 10 ++++++++-- > 1 file changed, 8 insertions(+), 2 deletions(-) > >diff --git a/source4/dsdb/samdb/ldb_modules/repl_meta_data.c b/source4/dsdb/samdb/ldb_modules/repl_meta_data.c >index 7a5906e..73f7d0e 100644 >--- a/source4/dsdb/samdb/ldb_modules/repl_meta_data.c >+++ b/source4/dsdb/samdb/ldb_modules/repl_meta_data.c >@@ -1446,15 +1446,21 @@ static int replmd_update_rpmd_rdn_attr(struct ldb_context *ldb, > NTTIME now, > bool is_schema_nc) > { >+ const char *rdn_name = ldb_dn_get_rdn_name(msg->dn); >+ const struct dsdb_attribute *rdn_attr = >+ dsdb_attribute_by_lDAPDisplayName(ar->schema, rdn_name); >+ const char *attr_name = rdn_attr != NULL ? >+ rdn_attr->lDAPDisplayName : >+ rdn_name; > struct ldb_message_element new_el = { > .flags = LDB_FLAG_MOD_REPLACE, >- .name = ldb_dn_get_rdn_name(msg->dn), >+ .name = attr_name, > .num_values = 1, > .values = discard_const_p(struct ldb_val, rdn_new) > }; > struct ldb_message_element old_el = { > .flags = LDB_FLAG_MOD_REPLACE, >- .name = ldb_dn_get_rdn_name(msg->dn), >+ .name = attr_name, > .num_values = rdn_old ? 1 : 0, > .values = discard_const_p(struct ldb_val, rdn_old) > }; >-- >1.9.1 >
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
Flags:
slow
:
review+
metze
:
review?
(
abartlet
)
Actions:
View
Attachments on
bug 12399
:
12611
|
12655
| 12853