summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source4/nbt_server/winsdb.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source4/nbt_server/winsdb.c b/source4/nbt_server/winsdb.c
index bb7ce49b9b..53fceedf37 100644
--- a/source4/nbt_server/winsdb.c
+++ b/source4/nbt_server/winsdb.c
@@ -40,7 +40,7 @@ struct winsdb_record *winsdb_load(struct wins_server *winssrv,
const char *expr;
int i;
- expr = talloc_asprintf(tmp_ctx, "dn=%s", nbt_name_string(tmp_ctx, name));
+ expr = talloc_asprintf(tmp_ctx, "dn=NAME=%s", nbt_name_string(tmp_ctx, name));
if (expr == NULL) goto failed;
/* find the record in the WINS database */
@@ -93,7 +93,7 @@ static struct ldb_message *winsdb_message(struct wins_server *winssrv,
struct ldb_message *msg = ldb_msg_new(mem_ctx);
if (msg == NULL) goto failed;
- msg->dn = nbt_name_string(msg, rec->name);
+ msg->dn = talloc_asprintf(msg, "NAME=%s", nbt_name_string(msg, rec->name));
if (msg->dn == NULL) goto failed;
ret |= ldb_msg_add_fmt(ldb, msg, "active", "%u", rec->state);
ret |= ldb_msg_add_fmt(ldb, msg, "nbFlags", "0x%04x", rec->nb_flags);