summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2005-10-15 10:55:30 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:44:46 -0500
commitdb5a0adb14301642ed8aa415472b6bcb97b2cf1b (patch)
treebc06df250529419cf6cfcfc9300002896d77b062
parentc3c26c90088141272affb591702f3c2124eec89f (diff)
downloadsamba-db5a0adb14301642ed8aa415472b6bcb97b2cf1b.tar.gz
samba-db5a0adb14301642ed8aa415472b6bcb97b2cf1b.tar.bz2
samba-db5a0adb14301642ed8aa415472b6bcb97b2cf1b.zip
r11088: don't try to set empty strings values as attributes
our ldb doesn't support them, does w2k3 LDAP supports them? metze (This used to be commit 97cb22bd9d7f786e9c1609ce97fcd8c54e5725bf)
-rw-r--r--source4/nbt_server/wins/winsdb.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source4/nbt_server/wins/winsdb.c b/source4/nbt_server/wins/winsdb.c
index d3f10aa9a4..42381a8772 100644
--- a/source4/nbt_server/wins/winsdb.c
+++ b/source4/nbt_server/wins/winsdb.c
@@ -514,10 +514,10 @@ 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) {
+ if (rec->name->name && *rec->name->name) {
ret |= ldb_msg_add_string(msg, "name", rec->name->name);
}
- if (rec->name->scope) {
+ if (rec->name->scope && *rec->name->scope) {
ret |= ldb_msg_add_string(msg, "scope", rec->name->scope);
}
ret |= ldb_msg_add_fmt(msg, "objectClass", "winsRecord");