r18912: we don't need the special case for comments now in the
authorAndrew Tridgell <tridge@samba.org>
Tue, 26 Sep 2006 02:49:16 +0000 (02:49 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 17:14:46 +0000 (12:14 -0500)
This also fixes comments in group mappings, as the code accidentially
put in "ntName" in the comment field :-)
(This used to be commit 7f1f5d6056da8ac55a41db54b68bf25967f81aaf)

source3/groupdb/mapping_ldb.c

index c6ff6ca2af8d4464d21a9e6c9e4f875d5f75222d..fd59e0f4384323a243a0ddd590da5e19e55be040 100644 (file)
@@ -149,15 +149,11 @@ 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, "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;
-       }
-
        ret = ldb_add(ldb, msg);
 
        /* if it exists we update it. This is a hangover from the semantics the