summaryrefslogtreecommitdiff
path: root/source3/groupdb/mapping_ldb.c
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
commit6f3c6a46f95eba3cd53ea4ca03a8dc3d64dccf55 (patch)
tree24e18090ce55100e6bd269dd6e5eb6d79684dc88 /source3/groupdb/mapping_ldb.c
parent323b724ce99ebf53e8b8a78a8c4da650d5c145fc (diff)
downloadsamba-6f3c6a46f95eba3cd53ea4ca03a8dc3d64dccf55.tar.gz
samba-6f3c6a46f95eba3cd53ea4ca03a8dc3d64dccf55.tar.bz2
samba-6f3c6a46f95eba3cd53ea4ca03a8dc3d64dccf55.zip
r18875: The comment field can be empty
(This used to be commit 6d5d7bf4bbcfee77853776af59e00d006fd86dc9)
Diffstat (limited to 'source3/groupdb/mapping_ldb.c')
-rw-r--r--source3/groupdb/mapping_ldb.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/source3/groupdb/mapping_ldb.c b/source3/groupdb/mapping_ldb.c
index bfff98e87f..c6ff6ca2af 100644
--- a/source3/groupdb/mapping_ldb.c
+++ b/source3/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;
}