summaryrefslogtreecommitdiffstats
path: root/source/groupdb
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2006-09-24 22:10:48 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:14:40 -0500
commit6d5d7bf4bbcfee77853776af59e00d006fd86dc9 (patch)
tree1a0aead98690d6878cccfe18b63d77272073c669 /source/groupdb
parentecac9b59594ef14a65091591c258b000036575fc (diff)
downloadsamba-6d5d7bf4bbcfee77853776af59e00d006fd86dc9.tar.gz
samba-6d5d7bf4bbcfee77853776af59e00d006fd86dc9.tar.xz
samba-6d5d7bf4bbcfee77853776af59e00d006fd86dc9.zip
r18875: The comment field can be empty
Diffstat (limited to 'source/groupdb')
-rw-r--r--source/groupdb/mapping_ldb.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/source/groupdb/mapping_ldb.c b/source/groupdb/mapping_ldb.c
index bfff98e87f4..c6ff6ca2af8 100644
--- a/source/groupdb/mapping_ldb.c
+++ b/source/groupdb/mapping_ldb.c
@@ -149,8 +149,12 @@ static struct ldb_dn *mapping_dn(TALLOC_CTX *mem_ctx, const DOM_SID *sid)
sid_to_string(string_sid, &map->sid)) != LDB_SUCCESS ||
ldb_msg_add_fmt(msg, "gidNumber", "%u", (unsigned)map->gid) != LDB_SUCCESS ||
ldb_msg_add_fmt(msg, "sidNameUse", "%u", (unsigned)map->sid_name_use) != LDB_SUCCESS ||
- ldb_msg_add_string(msg, "ntName", map->nt_name) != LDB_SUCCESS ||
- ldb_msg_add_string(msg, "comment", map->comment) != LDB_SUCCESS) {
+ ldb_msg_add_string(msg, "ntName", map->nt_name) != LDB_SUCCESS) {
+ goto failed;
+ }
+
+ if ((map->comment[0] != '\0') &&
+ (ldb_msg_add_string(msg, "ntName", map->nt_name) != LDB_SUCCESS)) {
goto failed;
}