summaryrefslogtreecommitdiff
path: root/source4/dsdb/samdb/ldb_modules
diff options
context:
space:
mode:
authorMatthias Dieter Wallnöfer <mdw@samba.org>2010-09-18 20:50:25 +0200
committerAndrew Bartlett <abartlet@samba.org>2010-09-24 09:25:43 +1000
commit681106af4f34a1b9ef70f7f6cc51216a5f3f4194 (patch)
tree319d8f33abf93f5df635f33cb5068c078357130a /source4/dsdb/samdb/ldb_modules
parent5f60f5e5e7c973d20962afd9318edb1365530f89 (diff)
downloadsamba-681106af4f34a1b9ef70f7f6cc51216a5f3f4194.tar.gz
samba-681106af4f34a1b9ef70f7f6cc51216a5f3f4194.tar.bz2
samba-681106af4f34a1b9ef70f7f6cc51216a5f3f4194.zip
s4:rootdse LDB module - introduce dynamic "dnsHostName" attribute
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source4/dsdb/samdb/ldb_modules')
-rw-r--r--source4/dsdb/samdb/ldb_modules/rootdse.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/rootdse.c b/source4/dsdb/samdb/ldb_modules/rootdse.c
index 4e9f63c1e7..041e85840e 100644
--- a/source4/dsdb/samdb/ldb_modules/rootdse.c
+++ b/source4/dsdb/samdb/ldb_modules/rootdse.c
@@ -198,6 +198,14 @@ static int rootdse_add_dynamic(struct ldb_module *module, struct ldb_message *ms
}
}
+ if (do_attribute(attrs, "dnsHostName")) {
+ if (ldb_msg_add_string(msg, "dnsHostName",
+ samdb_search_string(ldb, msg, samdb_server_dn(ldb, msg),
+ "dNSHostName", NULL)) != LDB_SUCCESS) {
+ goto failed;
+ }
+ }
+
if (do_attribute(attrs, "currentTime")) {
if (ldb_msg_add_steal_string(msg, "currentTime",
ldb_timestring(msg, time(NULL))) != LDB_SUCCESS) {