diff options
author | Matthias Dieter Wallnöfer <mdw@samba.org> | 2010-09-15 18:36:03 +0200 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2010-09-24 09:25:43 +1000 |
commit | 5fd7bc85640a7a8730daf379bfe314a91a02577f (patch) | |
tree | 2e04fb04c75e993388659fe774fa1c0cb5ad79b3 /source4/dsdb | |
parent | e446ef1c3fc3ebcc511caf5d1d94804cfb7a8202 (diff) | |
download | samba-5fd7bc85640a7a8730daf379bfe314a91a02577f.tar.gz samba-5fd7bc85640a7a8730daf379bfe314a91a02577f.tar.bz2 samba-5fd7bc85640a7a8730daf379bfe314a91a02577f.zip |
s4:rootdse LDB module - make "serverName" dynamic
This helps to fix bug #7347. "dsServiceName" cannot be made dynamic in such a
simple way since it's already needed on LDB initialisation time.
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source4/dsdb')
-rw-r--r-- | source4/dsdb/samdb/ldb_modules/rootdse.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/rootdse.c b/source4/dsdb/samdb/ldb_modules/rootdse.c index 300f622486..4e9f63c1e7 100644 --- a/source4/dsdb/samdb/ldb_modules/rootdse.c +++ b/source4/dsdb/samdb/ldb_modules/rootdse.c @@ -191,6 +191,13 @@ static int rootdse_add_dynamic(struct ldb_module *module, struct ldb_message *ms ldb_msg_remove_attr(msg, "cn"); ldb_msg_remove_attr(msg, "name"); + if (do_attribute(attrs, "serverName")) { + if (ldb_msg_add_linearized_dn(msg, "serverName", + samdb_server_dn(ldb, msg)) != LDB_SUCCESS) { + goto failed; + } + } + if (do_attribute(attrs, "currentTime")) { if (ldb_msg_add_steal_string(msg, "currentTime", ldb_timestring(msg, time(NULL))) != LDB_SUCCESS) { |