Author: abartlet
Date: 2006-01-18 11:21:52 +0000 (Wed, 18 Jan 2006)
New Revision: 12995

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=12995

Log:
Don't allow overrides on "name" from above, as it can't be correct.

Andrew Bartlett

Modified:
   branches/SAMBA_4_0/source/lib/ldb/modules/rdn_name.c


Changeset:
Modified: branches/SAMBA_4_0/source/lib/ldb/modules/rdn_name.c
===================================================================
--- branches/SAMBA_4_0/source/lib/ldb/modules/rdn_name.c        2006-01-18 
10:25:04 UTC (rev 12994)
+++ branches/SAMBA_4_0/source/lib/ldb/modules/rdn_name.c        2006-01-18 
11:21:52 UTC (rev 12995)
@@ -63,11 +63,6 @@
                return ldb_next_request(module, req);
        }
 
-       /* Perhaps someone above us knows better */
-       if ((attribute = rdn_name_find_attribute(msg, "name")) != NULL ) {
-               return ldb_next_request(module, req);
-       }
-
        msg2 = talloc(module, struct ldb_message);
        if (!msg2) {
                return -1;
@@ -87,6 +82,11 @@
                return -1;
        }
        
+       /* Perhaps someone above us tried to set this? */
+       if ((attribute = rdn_name_find_attribute(msg, "name")) != NULL ) {
+               attribute->num_values = 0;
+       }
+
        if (ldb_msg_add_value(msg2, "name", &rdn->value) != 0) {
                talloc_free(msg2);
                return -1;

Reply via email to