s4:dsdb/rootdse: expand extended dn values with the AS_SYSTEM control
commit23e43c3e2be6926b7717c059664fd166d0a98140
authorStefan Metzmacher <metze@samba.org>
Thu, 20 Nov 2014 13:21:06 +0000 (20 14:21 +0100)
committerKarolin Seeger <kseeger@samba.org>
Tue, 16 Dec 2014 20:09:12 +0000 (16 21:09 +0100)
treec7a05979e2307078309a6ea0aa4f2b3ff8b4faf5
parent02ad5591695d06f82308c524757655db2d587241
s4:dsdb/rootdse: expand extended dn values with the AS_SYSTEM control

Otherwise we can't find the GUID of the 'serverName' attribute
as ANONYMOUS.

This results in

  root@ub1204-161:~# ldbsearch -U% -H ldap://172.31.9.161 -b '' -s base --extended-dn serverName
  search error - LDAP error 1 LDAP_OPERATIONS_ERROR -  <00002020: operations error at ../source4/dsdb/samdb/ldb_modules/rootdse.c:567> <>

While it works as system:

  root@ub1204-161:~# ldbsearch -U% -H /var/lib/samba/private/sam.ldb -b '' -s base --extended-dn serverName
  # record 1
  dn:
  serverName: <GUID=348c35e1-04e3-4988-a32c-32478d584551>;CN=UB1204-161,CN=Serve
   rs,CN=Default-First-Site-Name,CN=Sites,CN=Configuration,DC=s4xdom,DC=base

  # returned 1 records
  # 1 entries
  # 0 referrals

Bug: https://bugzilla.samba.org/show_bug.cgi?id=10949

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
(cherry picked from commit a6ecef4532e4529a819219cd814e2979c2df0797)
source4/dsdb/samdb/ldb_modules/rootdse.c