summaryrefslogtreecommitdiff
path: root/source4/nbt_server/wins
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2005-10-15 10:15:42 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:44:46 -0500
commitc3c26c90088141272affb591702f3c2124eec89f (patch)
tree8bca1ba93e5f244425b23fc0eeee677b1484efce /source4/nbt_server/wins
parentdab2b6858315909cd26fa5ce5aba84b6b4c3e62e (diff)
downloadsamba-c3c26c90088141272affb591702f3c2124eec89f.tar.gz
samba-c3c26c90088141272affb591702f3c2124eec89f.tar.bz2
samba-c3c26c90088141272affb591702f3c2124eec89f.zip
r11087: - add type,name,scope as attributes to winsRecords,
so you can use them in search filters, only for administration not used inside the winserver code - fix the samba3 ugrade scripts to create a correct samba4 wins.ldb metze (This used to be commit 9f3b6746d86583c48097da48c28f50f075bbd3e3)
Diffstat (limited to 'source4/nbt_server/wins')
-rw-r--r--source4/nbt_server/wins/winsdb.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/source4/nbt_server/wins/winsdb.c b/source4/nbt_server/wins/winsdb.c
index 7ab8216837..d3f10aa9a4 100644
--- a/source4/nbt_server/wins/winsdb.c
+++ b/source4/nbt_server/wins/winsdb.c
@@ -513,6 +513,13 @@ struct ldb_message *winsdb_message(struct ldb_context *ldb,
msg->dn = winsdb_dn(msg, rec->name);
if (msg->dn == NULL) goto failed;
+ ret |= ldb_msg_add_fmt(msg, "type", "0x%02X", rec->name->type);
+ if (rec->name->name) {
+ ret |= ldb_msg_add_string(msg, "name", rec->name->name);
+ }
+ if (rec->name->scope) {
+ ret |= ldb_msg_add_string(msg, "scope", rec->name->scope);
+ }
ret |= ldb_msg_add_fmt(msg, "objectClass", "winsRecord");
ret |= ldb_msg_add_fmt(msg, "recordType", "%u", rec->type);
ret |= ldb_msg_add_fmt(msg, "recordState", "%u", rec->state);