On 08/16/2016 02:32 PM, Petr Cech wrote:
On 08/16/2016 01:22 PM, Petr Cech wrote:


On 08/16/2016 01:02 PM, Lukas Slebodnik wrote:
On (16/08/16 12:52), Petr Cech wrote:
On 08/16/2016 10:15 AM, Jakub Hrozek wrote:
On Tue, Aug 16, 2016 at 09:50:19AM +0200, Petr Cech wrote:
Hello list,

I am solving ticket [1] now. There are three
points mentioned. A have prepared patches for
the first two. I would like to ask anybody it
is right or if I miss something.

The third point is about full LDIFF in special
debug level. What does it mean 'special debug
level'? Is it new option, for example?


[1] https://fedorahosted.org/sssd/ticket/3060

Regards


Please no magic constants in SSSD code :)

Hello Jakub,

there is fixed version without magic :-)

--
Petr^4 'magician' Čech

From 2ca78a82c579c5244aebd9a58b56a9886f6bc4b5 Mon Sep 17 00:00:00 2001
From: Petr Cech <pc...@redhat.com>
Date: Tue, 16 Aug 2016 09:32:18 +0200
Subject: [PATCH 1/2] SYSDB: Adding message to inform which cache is
used

Resolves:
https://fedorahosted.org/sssd/ticket/3060
---
src/db/sysdb_ops.c | 32 ++++++++++++++++++++++++++++++++
1 file changed, 32 insertions(+)

diff --git a/src/db/sysdb_ops.c b/src/db/sysdb_ops.c
index
44fb5b70e6d33fffbca5824f831a3229254ecb57..a81840b2515d09f91d1dfa783bcf08f0fad112b4

100644
--- a/src/db/sysdb_ops.c
+++ b/src/db/sysdb_ops.c
@@ -27,6 +27,12 @@
#include "util/cert.h"
#include <time.h>

+
+#define SSS_SYSDB_NO_CACHE 0x0
+#define SSS_SYSDB_CACHE 0x1
+#define SSS_SYSDB_TS_CACHE 0x2
+#define SSS_SYSDB_BOTH_CACHE (SSS_SYSDB_CACHE | SSS_SYSDB_TS_CACHE)
+
static uint32_t get_attr_as_uint32(struct ldb_message *msg, const
char *attr)
{
    const struct ldb_val *v = ldb_msg_find_ldb_val(msg, attr);
@@ -1176,6 +1182,21 @@ done:
    return ret;
}

+static const char *get_attr_storage(int state_mask)
+{
+    const char *storage = "";
+
+    if (state_mask == SSS_SYSDB_BOTH_CACHE ) {
+        storage = "cache, ts_cache";
+    } else if (state_mask == SSS_SYSDB_TS_CACHE) {
+        storage = "ts_cache";
+    } else if (state_mask == SSS_SYSDB_CACHE) {
+        storage = "cache";
+    }
+
+    return storage;
+}
+
int sysdb_set_entry_attr(struct sysdb_ctx *sysdb,
                         struct ldb_dn *entry_dn,
                         struct sysdb_attrs *attrs,
@@ -1184,6 +1205,7 @@ int sysdb_set_entry_attr(struct sysdb_ctx *sysdb,
    bool sysdb_write = true;
    errno_t ret = EOK;
    errno_t tret = EOK;
+    int state_mask = SSS_SYSDB_NO_CACHE;

    sysdb_write = sysdb_entry_attrs_diff(sysdb, entry_dn, attrs,
mod_op);
    if (sysdb_write == true) {
@@ -1192,6 +1214,8 @@ int sysdb_set_entry_attr(struct sysdb_ctx *sysdb,
            DEBUG(SSSDBG_MINOR_FAILURE,
                  "Cannot set attrs for %s, %d [%s]\n",
                  ldb_dn_get_linearized(entry_dn), ret,
sss_strerror(ret));
+        } else {
+            state_mask |= SSS_SYSDB_CACHE;
        }
    }

@@ -1201,9 +1225,17 @@ int sysdb_set_entry_attr(struct sysdb_ctx
*sysdb,
            DEBUG(SSSDBG_MINOR_FAILURE,
                "Cannot set ts attrs for %s\n",
ldb_dn_get_linearized(entry_dn));
            /* Not fatal */
+        } else {
+            state_mask |= SSS_SYSDB_TS_CACHE;
        }
    }

+    if (state_mask != SSS_SYSDB_NO_CACHE) {
+        DEBUG(SSSDBG_FUNC_DATA, "Entry [%s] has set [%s] attrs.\n",
+                                ldb_dn_get_linearized(entry_dn),
+                                get_attr_storage(state_mask));
+    }
+
    return ret;
}

--
2.7.4


From 6e7143b26fb5696a9b684c0da96353a7d5d07700 Mon Sep 17 00:00:00 2001
From: Petr Cech <pc...@redhat.com>
Date: Tue, 16 Aug 2016 09:33:46 +0200
Subject: [PATCH 2/2] SYSDB: Adding message about reason why cache
changed

Resolves:
https://fedorahosted.org/sssd/ticket/3060
---
src/db/sysdb.c | 24 ++++++++++++++++++++++--
1 file changed, 22 insertions(+), 2 deletions(-)

diff --git a/src/db/sysdb.c b/src/db/sysdb.c
index
6f0b1b9e9b52bede68f03cb5674f65b91cc28c98..9d1abc2b3dd0ce5db626544673795eebfbc28bcd

100644
--- a/src/db/sysdb.c
+++ b/src/db/sysdb.c
@@ -1821,7 +1821,8 @@ bool sysdb_msg_attrs_modts_differs(struct
ldb_message *old_entry,
    return true;
}

-static bool sysdb_ldb_msg_difference(struct ldb_message *db_msg,
+static bool sysdb_ldb_msg_difference(struct ldb_dn *entry_dn,
+                                     struct ldb_message *db_msg,
                                     struct ldb_message *mod_msg)
{
    struct ldb_message_element *mod_msg_el;
@@ -1848,6 +1849,10 @@ static bool sysdb_ldb_msg_difference(struct
ldb_message *db_msg,
                 */
                if (mod_msg_el->num_values > 0) {
                    /* We can ignore additions of timestamp
attributes */
+                    DEBUG(SSSDBG_TRACE_FUNC, "Entry [%s] differs,
reason: " \
+                                             "attr [%s] is new.\n",
+
ldb_dn_get_linearized(entry_dn),
+                                             mod_msg_el->name);
                    return true;
                }
                break;
@@ -1861,6 +1866,11 @@ static bool sysdb_ldb_msg_difference(struct
ldb_message *db_msg,
                 */
                if (is_ts_cache_attr(mod_msg_el->name) == false) {
                    /* We can ignore changes to timestamp attributes */
+                    DEBUG(SSSDBG_TRACE_FUNC, "Entry [%s] differs,
reason: " \

^^
                                                           this is not
required
                                                           It will be

concatenated even
                                                           without it.
+                                             "attr [%s] is replaced
" \
+                                             "or extended.\n",
+
ldb_dn_get_linearized(entry_dn),
+                                             mod_msg_el->name);



                    return true;
                }
            }
@@ -1869,6 +1879,10 @@ static bool sysdb_ldb_msg_difference(struct
ldb_message *db_msg,
            db_msg_el = ldb_msg_find_element(db_msg, mod_msg_el->name);
            if (db_msg_el != NULL) {
                /* We are deleting a valid element, there is a
difference */
+                DEBUG(SSSDBG_TRACE_FUNC, "Entry [%s] differs,
reason: " \
+                                          "attr [%s] is deleted.\n",
+
ldb_dn_get_linearized(entry_dn),
+                                          mod_msg_el->name);
a) it's not alligned properly (1 extra space :-)
b) IMH0; it's it's easier to read the debug messages in nested code
   if it start on next line.
   e.g.
                DEBUG(SSSDBG_TRACE_FUNC,
                      "Entry [%s] differs, reason: attr [%s] is
deleted.\n",
                      ldb_dn_get_linearized(entry_dn),
mod_msg_el->name);

LS

Thanks, Lukas.

Fixed patch set is attached. Some debug messages crossed 80 characters
:-(

Regards

There were little misspelling, sorry.
Fixed patches are attached.

Hello,

there is new patch number 3 which is a WIP.
I would like to ask you which version
of ldif printing do you prefer.

You can see [1] which shows the outputs.

Difference is that version A is step by step
reading of ldb messsage.

But, version B uses function
ldb_ldif_write(). This function needs
my_vprintf_fn() but the information isn't structured.

What do you prefer? :-)

[1] ldif.txt

Regards

--
Petr^4 Čech
>From 2ca78a82c579c5244aebd9a58b56a9886f6bc4b5 Mon Sep 17 00:00:00 2001
From: Petr Cech <pc...@redhat.com>
Date: Tue, 16 Aug 2016 09:32:18 +0200
Subject: [PATCH 1/3] SYSDB: Adding message to inform which cache is used

Resolves:
https://fedorahosted.org/sssd/ticket/3060
---
 src/db/sysdb_ops.c | 32 ++++++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)

diff --git a/src/db/sysdb_ops.c b/src/db/sysdb_ops.c
index 44fb5b70e6d33fffbca5824f831a3229254ecb57..a81840b2515d09f91d1dfa783bcf08f0fad112b4 100644
--- a/src/db/sysdb_ops.c
+++ b/src/db/sysdb_ops.c
@@ -27,6 +27,12 @@
 #include "util/cert.h"
 #include <time.h>
 
+
+#define SSS_SYSDB_NO_CACHE 0x0
+#define SSS_SYSDB_CACHE 0x1
+#define SSS_SYSDB_TS_CACHE 0x2
+#define SSS_SYSDB_BOTH_CACHE (SSS_SYSDB_CACHE | SSS_SYSDB_TS_CACHE)
+
 static uint32_t get_attr_as_uint32(struct ldb_message *msg, const char *attr)
 {
     const struct ldb_val *v = ldb_msg_find_ldb_val(msg, attr);
@@ -1176,6 +1182,21 @@ done:
     return ret;
 }
 
+static const char *get_attr_storage(int state_mask)
+{
+    const char *storage = "";
+
+    if (state_mask == SSS_SYSDB_BOTH_CACHE ) {
+        storage = "cache, ts_cache";
+    } else if (state_mask == SSS_SYSDB_TS_CACHE) {
+        storage = "ts_cache";
+    } else if (state_mask == SSS_SYSDB_CACHE) {
+        storage = "cache";
+    }
+
+    return storage;
+}
+
 int sysdb_set_entry_attr(struct sysdb_ctx *sysdb,
                          struct ldb_dn *entry_dn,
                          struct sysdb_attrs *attrs,
@@ -1184,6 +1205,7 @@ int sysdb_set_entry_attr(struct sysdb_ctx *sysdb,
     bool sysdb_write = true;
     errno_t ret = EOK;
     errno_t tret = EOK;
+    int state_mask = SSS_SYSDB_NO_CACHE;
 
     sysdb_write = sysdb_entry_attrs_diff(sysdb, entry_dn, attrs, mod_op);
     if (sysdb_write == true) {
@@ -1192,6 +1214,8 @@ int sysdb_set_entry_attr(struct sysdb_ctx *sysdb,
             DEBUG(SSSDBG_MINOR_FAILURE,
                   "Cannot set attrs for %s, %d [%s]\n",
                   ldb_dn_get_linearized(entry_dn), ret, sss_strerror(ret));
+        } else {
+            state_mask |= SSS_SYSDB_CACHE;
         }
     }
 
@@ -1201,9 +1225,17 @@ int sysdb_set_entry_attr(struct sysdb_ctx *sysdb,
             DEBUG(SSSDBG_MINOR_FAILURE,
                 "Cannot set ts attrs for %s\n", ldb_dn_get_linearized(entry_dn));
             /* Not fatal */
+        } else {
+            state_mask |= SSS_SYSDB_TS_CACHE;
         }
     }
 
+    if (state_mask != SSS_SYSDB_NO_CACHE) {
+        DEBUG(SSSDBG_FUNC_DATA, "Entry [%s] has set [%s] attrs.\n",
+                                ldb_dn_get_linearized(entry_dn),
+                                get_attr_storage(state_mask));
+    }
+
     return ret;
 }
 
-- 
2.7.4

>From b58d75ee8c25a48a17a3ac69fffd6cca787e2743 Mon Sep 17 00:00:00 2001
From: Petr Cech <pc...@redhat.com>
Date: Tue, 16 Aug 2016 09:33:46 +0200
Subject: [PATCH 2/3] SYSDB: Adding message about reason why cache changed

Resolves:
https://fedorahosted.org/sssd/ticket/3060
---
 src/db/sysdb.c | 20 ++++++++++++++++++--
 1 file changed, 18 insertions(+), 2 deletions(-)

diff --git a/src/db/sysdb.c b/src/db/sysdb.c
index 6f0b1b9e9b52bede68f03cb5674f65b91cc28c98..a76e8b47afc902d6c0c0ed5302b7f9231a11ade3 100644
--- a/src/db/sysdb.c
+++ b/src/db/sysdb.c
@@ -1821,7 +1821,8 @@ bool sysdb_msg_attrs_modts_differs(struct ldb_message *old_entry,
     return true;
 }
 
-static bool sysdb_ldb_msg_difference(struct ldb_message *db_msg,
+static bool sysdb_ldb_msg_difference(struct ldb_dn *entry_dn,
+                                     struct ldb_message *db_msg,
                                      struct ldb_message *mod_msg)
 {
     struct ldb_message_element *mod_msg_el;
@@ -1848,6 +1849,9 @@ static bool sysdb_ldb_msg_difference(struct ldb_message *db_msg,
                  */
                 if (mod_msg_el->num_values > 0) {
                     /* We can ignore additions of timestamp attributes */
+                    DEBUG(SSSDBG_TRACE_FUNC,
+                          "Entry [%s] differs, reason: attr [%s] is new.\n",
+                          ldb_dn_get_linearized(entry_dn), mod_msg_el->name);
                     return true;
                 }
                 break;
@@ -1861,6 +1865,9 @@ static bool sysdb_ldb_msg_difference(struct ldb_message *db_msg,
                  */
                 if (is_ts_cache_attr(mod_msg_el->name) == false) {
                     /* We can ignore changes to timestamp attributes */
+                    DEBUG(SSSDBG_TRACE_FUNC,
+                          "Entry [%s] differs, reason: attr [%s] is replaced or extended.\n",
+                          ldb_dn_get_linearized(entry_dn), mod_msg_el->name);
                     return true;
                 }
             }
@@ -1869,6 +1876,9 @@ static bool sysdb_ldb_msg_difference(struct ldb_message *db_msg,
             db_msg_el = ldb_msg_find_element(db_msg, mod_msg_el->name);
             if (db_msg_el != NULL) {
                 /* We are deleting a valid element, there is a difference */
+                DEBUG(SSSDBG_TRACE_FUNC,
+                      "Entry [%s] differs, reason: attr [%s] is deleted.\n",
+                      ldb_dn_get_linearized(entry_dn), mod_msg_el->name);
                 return true;
             }
             break;
@@ -1892,10 +1902,16 @@ bool sysdb_entry_attrs_diff(struct sysdb_ctx *sysdb,
     const char *attrnames[attrs->num+1];
 
     if (sysdb->ldb_ts == NULL) {
+        DEBUG(SSSDBG_TRACE_FUNC,
+              "Entry [%s] differs, reason: there is no ts_cache yet.\n",
+              ldb_dn_get_linearized(entry_dn));
         return true;
     }
 
     if (is_ts_ldb_dn(entry_dn) == false) {
+        DEBUG(SSSDBG_TRACE_FUNC,
+              "Entry [%s] differs, reason: ts_cache doesn't trace this type of entry.\n",
+              ldb_dn_get_linearized(entry_dn));
         return true;
     }
 
@@ -1930,7 +1946,7 @@ bool sysdb_entry_attrs_diff(struct sysdb_ctx *sysdb,
         goto done;
     }
 
-    differs = sysdb_ldb_msg_difference(res->msgs[0], new_entry_msg);
+    differs = sysdb_ldb_msg_difference(entry_dn, res->msgs[0], new_entry_msg);
 done:
     talloc_free(tmp_ctx);
     return differs;
-- 
2.7.4

>From d34e814e67bcedeb5491df51fc9d291a223a27cd Mon Sep 17 00:00:00 2001
From: Petr Cech <pc...@redhat.com>
Date: Tue, 16 Aug 2016 14:59:06 +0200
Subject: [PATCH 3/3] WIP: Adding sss_ldb_add()

This patch will be split into:
a) adding support for printing ldif
b) replace of ldb_*() with sss_ldb_*()

Resolves:
https://fedorahosted.org/sssd/ticket/3060
---
 Makefile.am                |   2 +
 src/db/sysdb_ldb_wrapper.c | 105 +++++++++++++++++++++++++++++++++++++++++++++
 src/db/sysdb_ldb_wrapper.h |  22 ++++++++++
 src/db/sysdb_ops.c         |   3 +-
 src/util/debug.h           |   1 +
 5 files changed, 132 insertions(+), 1 deletion(-)
 create mode 100644 src/db/sysdb_ldb_wrapper.c
 create mode 100644 src/db/sysdb_ldb_wrapper.h

diff --git a/Makefile.am b/Makefile.am
index 5d1d671096f986d9387e6199112c017e9bf30e1b..42ad0c67c2142f10f290a4a6b77938155b5120bd 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -641,6 +641,7 @@ dist_noinst_HEADERS = \
     src/db/sysdb_private.h \
     src/db/sysdb_services.h \
     src/db/sysdb_ssh.h \
+    src/db/sysdb_ldb_wrapper.h \
     src/confdb/confdb.h \
     src/confdb/confdb_private.h \
     src/confdb/confdb_setup.h \
@@ -887,6 +888,7 @@ pkglib_LTLIBRARIES += libsss_util.la
 libsss_util_la_SOURCES = \
     src/confdb/confdb.c \
     src/db/sysdb.c \
+    src/db/sysdb_ldb_wrapper.c \
     src/db/sysdb_ops.c \
     src/db/sysdb_search.c \
     src/db/sysdb_selinux.c \
diff --git a/src/db/sysdb_ldb_wrapper.c b/src/db/sysdb_ldb_wrapper.c
new file mode 100644
index 0000000000000000000000000000000000000000..8d63e1dece1bb07313c1c8300027a9991e84e2cc
--- /dev/null
+++ b/src/db/sysdb_ldb_wrapper.c
@@ -0,0 +1,105 @@
+/*
+   SSSD
+
+   System Database -- ldb wrappers
+
+   Copyright (C) Petr Cech <pc...@redhat.com>	2016
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include <ldb.h>
+#include "util/util.h"
+
+/* version A */
+static void sss_ldb_print(struct ldb_context *ldb,
+                          const struct ldb_message *message,
+                          const char *method_name)
+{
+    DEBUG(SSSDBG_LDB, "Method [%s] was called on entry [%s]:\n",
+                      method_name, ldb_dn_get_linearized(message->dn));
+
+    for (int i = 0; i < message->num_elements; i++) {
+        DEBUG(SSSDBG_LDB, "  element [%s] with flag [%d] contains:\n",
+                          message->elements[i].name,
+                          message->elements[i].flags);
+
+        for (int j=0; j < message->elements[i].num_values; j++) {
+            DEBUG(SSSDBG_LDB, "    value: [%s]\n",
+                  ldb_binary_encode(ldb, message->elements[i].values[j]));
+        }
+    }
+}
+
+/* version B */
+
+struct sss_ldb_print_ctx {
+    char *ldif;
+};
+
+static int my_vprintf_fn(void *private_data, const char *fmt, ...)
+{
+    struct sss_ldb_print_ctx *ldb_print_ctx;
+    va_list ap;
+
+    ldb_print_ctx = talloc_get_type(private_data, struct sss_ldb_print_ctx);
+
+    if (ldb_print_ctx == NULL) {
+        return -1;
+    }
+
+    if (fmt != NULL) {
+        va_start(ap, fmt);
+        ldb_print_ctx->ldif = talloc_vasprintf_append_buffer(ldb_print_ctx->ldif, fmt, ap);
+        va_end(ap);
+        if (ldb_print_ctx->ldif == NULL) {
+            return -2;
+        }
+    }
+
+    /* Note that the function should return the number of
+       bytes written, or a negative error code */
+    return 1;
+}
+
+int sss_ldb_add(struct ldb_context *ldb, const struct ldb_message *message)
+{
+    int ret;
+    struct ldb_ldif ldif;
+    struct sss_ldb_print_ctx *ldb_print_ctx;
+
+    /* version A */
+    DEBUG(SSSDBG_LDB, ">>> --- version A ---\n");
+    sss_ldb_print(ldb, message, "ldb_add");
+
+
+    /* version B */
+    DEBUG(SSSDBG_LDB, ">>> --- version B ---\n");
+
+    ldb_print_ctx = talloc_zero(ldb, struct sss_ldb_print_ctx);
+    if (ldb_print_ctx == NULL) {
+        return ENOMEM;
+    }
+    ldb_print_ctx->ldif = NULL;
+
+    ldif.changetype = LDB_CHANGETYPE_ADD;
+    ldif.msg = discard_const_p(struct ldb_message, message);
+
+    ret = ldb_ldif_write(ldb, my_vprintf_fn, ldb_print_ctx, &ldif);
+    DEBUG(SSSDBG_LDB, "LDIF [%s]\n", ldb_print_ctx->ldif);
+    talloc_free(ldb_print_ctx);
+
+
+    return ldb_add(ldb, message);
+}
\ No newline at end of file
diff --git a/src/db/sysdb_ldb_wrapper.h b/src/db/sysdb_ldb_wrapper.h
new file mode 100644
index 0000000000000000000000000000000000000000..6a8a60468f51318c528e83648bae6e20825993d9
--- /dev/null
+++ b/src/db/sysdb_ldb_wrapper.h
@@ -0,0 +1,22 @@
+/*
+   SSSD
+
+   System Database -- ldb wrappers
+
+   Copyright (C) Petr Cech <pc...@redhat.com>	2016
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+int sss_ldb_add(struct ldb_context *ldb, const struct ldb_message *message);
\ No newline at end of file
diff --git a/src/db/sysdb_ops.c b/src/db/sysdb_ops.c
index a81840b2515d09f91d1dfa783bcf08f0fad112b4..852e1eea41db507fe0fd8234f69b702a4a7a147c 100644
--- a/src/db/sysdb_ops.c
+++ b/src/db/sysdb_ops.c
@@ -23,6 +23,7 @@
 #include "db/sysdb_private.h"
 #include "db/sysdb_services.h"
 #include "db/sysdb_autofs.h"
+#include "db/sysdb_ldb_wrapper.h"
 #include "util/crypto/sss_crypto.h"
 #include "util/cert.h"
 #include <time.h>
@@ -846,7 +847,7 @@ static errno_t sysdb_create_ts_entry(struct sysdb_ctx *sysdb,
         goto done;
     }
 
-    lret = ldb_add(sysdb->ldb_ts, msg);
+    lret = sss_ldb_add(sysdb->ldb_ts, msg);
     if (lret != LDB_SUCCESS) {
         DEBUG(SSSDBG_OP_FAILURE,
               "ldb_add failed: [%s](%d)[%s]\n",
diff --git a/src/util/debug.h b/src/util/debug.h
index 2a1bd4ffd30817d7128805996c21105fe40982a2..610a65b6b6b9a41c9d7062b118abe5f015e10d68 100644
--- a/src/util/debug.h
+++ b/src/util/debug.h
@@ -67,6 +67,7 @@ int get_fd_from_debug_file(void);
 #define SSSDBG_TRACE_INTERNAL 0x2000   /* level 8 */
 #define SSSDBG_TRACE_ALL      0x4000   /* level 9 */
 #define SSSDBG_BE_FO          0x8000   /* level 9 */
+#define SSSDBG_LDB            0x10000  /* level 9 */
 #define SSSDBG_IMPORTANT_INFO SSSDBG_OP_FAILURE
 
 #define SSSDBG_INVALID        -1
-- 
2.7.4

[sss_ldb_add] (0x10000): >>> --- version A ---
[sss_ldb_print] (0x10000): Method [ldb_add] was called on entry 
[name=a...@ipa.cygnus.dev,cn=users,cn=ipa.cygnus.dev,cn=sysdb]:
[sss_ldb_print] (0x10000):   element [objectClass] with flag [0] contains:
[sss_ldb_print] (0x10000):     value: [user]
[sss_ldb_print] (0x10000):   element [lastUpdate] with flag [0] contains:
[sss_ldb_print] (0x10000):     value: [1471517358]
[sss_ldb_print] (0x10000):   element [dataExpireTimestamp] with flag [0] 
contains:
[sss_ldb_print] (0x10000):     value: [1471517388]
[sss_ldb_add] (0x10000): >>> --- version B ---
[sss_ldb_add] (0x10000): LDIF [dn: 
name=a...@ipa.cygnus.dev,cn=users,cn=ipa.cygnus.dev,cn=sysdb
changetype: add
objectClass: user
lastUpdate: 1471517358
dataExpireTimestamp: 1471517388

]

_______________________________________________
sssd-devel mailing list
sssd-devel@lists.fedorahosted.org
https://lists.fedorahosted.org/admin/lists/sssd-devel@lists.fedorahosted.org

Reply via email to