|
|
b2d430 |
From af7accb9071ca5f73632e2b47c13f2ce7d26995e Mon Sep 17 00:00:00 2001
|
|
|
b2d430 |
From: Lukas Slebodnik <lslebodn@redhat.com>
|
|
|
b2d430 |
Date: Mon, 25 Jul 2016 08:31:17 +0200
|
|
|
b2d430 |
Subject: [PATCH 37/44] SYSDB: Do not try to modify ts cache for unsupported
|
|
|
b2d430 |
DNs
|
|
|
b2d430 |
MIME-Version: 1.0
|
|
|
b2d430 |
Content-Type: text/plain; charset=UTF-8
|
|
|
b2d430 |
Content-Transfer-Encoding: 8bit
|
|
|
b2d430 |
|
|
|
b2d430 |
Only users and groups have timestamp data in separate cache.
|
|
|
b2d430 |
It caused false positive warnings for autofs, netgroup ...
|
|
|
b2d430 |
|
|
|
b2d430 |
Reviewed-by: Petr Čech <pcech@redhat.com>
|
|
|
b2d430 |
---
|
|
|
b2d430 |
src/db/sysdb_ops.c | 7 ++++++-
|
|
|
b2d430 |
1 file changed, 6 insertions(+), 1 deletion(-)
|
|
|
b2d430 |
|
|
|
b2d430 |
diff --git a/src/db/sysdb_ops.c b/src/db/sysdb_ops.c
|
|
|
b2d430 |
index 4755ea3427b99a51d73b7b9134e357cf2b987613..19d6be03ede1bcec3bc7a4ed777e326460d80591 100644
|
|
|
b2d430 |
--- a/src/db/sysdb_ops.c
|
|
|
b2d430 |
+++ b/src/db/sysdb_ops.c
|
|
|
b2d430 |
@@ -1198,9 +1198,14 @@ int sysdb_set_entry_attr(struct sysdb_ctx *sysdb,
|
|
|
b2d430 |
sysdb_write = sysdb_entry_attrs_diff(sysdb, entry_dn, attrs, mod_op);
|
|
|
b2d430 |
if (sysdb_write == true) {
|
|
|
b2d430 |
ret = sysdb_set_cache_entry_attr(sysdb->ldb, entry_dn, attrs, mod_op);
|
|
|
b2d430 |
+ if (ret != EOK) {
|
|
|
b2d430 |
+ DEBUG(SSSDBG_MINOR_FAILURE,
|
|
|
b2d430 |
+ "Cannot set attrs for %s, %d [%s]\n",
|
|
|
b2d430 |
+ ldb_dn_get_linearized(entry_dn), ret, sss_strerror(ret));
|
|
|
b2d430 |
+ }
|
|
|
b2d430 |
}
|
|
|
b2d430 |
|
|
|
b2d430 |
- if (ret == EOK) {
|
|
|
b2d430 |
+ if (ret == EOK && is_ts_ldb_dn(entry_dn)) {
|
|
|
b2d430 |
tret = sysdb_set_ts_entry_attr(sysdb, entry_dn, attrs, mod_op);
|
|
|
b2d430 |
if (tret != EOK) {
|
|
|
b2d430 |
DEBUG(SSSDBG_MINOR_FAILURE,
|
|
|
b2d430 |
--
|
|
|
b2d430 |
2.4.11
|
|
|
b2d430 |
|