|
|
6cf099 |
From f69e9a566540896682c1021de92e5eec6a95dd9d Mon Sep 17 00:00:00 2001
|
|
|
6cf099 |
From: =?UTF-8?q?Pavel=20B=C5=99ezina?= <pbrezina@redhat.com>
|
|
|
6cf099 |
Date: Sun, 11 Oct 2015 17:38:34 +0200
|
|
|
6cf099 |
Subject: [PATCH 103/104] sudo: search with view even if user is found
|
|
|
6cf099 |
|
|
|
6cf099 |
If an overriden name is provided and the user is already cache we fail
|
|
|
6cf099 |
to refresh it since we won't search with VIEW flag. This patch fix
|
|
|
6cf099 |
it.
|
|
|
6cf099 |
|
|
|
6cf099 |
Reviewed-by: Sumit Bose <sbose@redhat.com>
|
|
|
6cf099 |
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
|
|
|
6cf099 |
(cherry picked from commit 51a0e3a2ef9186d19cbc28d87fe6fc5d5998a0a7)
|
|
|
6cf099 |
---
|
|
|
6cf099 |
src/responder/sudo/sudosrv_get_sudorules.c | 5 ++++-
|
|
|
6cf099 |
1 file changed, 4 insertions(+), 1 deletion(-)
|
|
|
6cf099 |
|
|
|
6cf099 |
diff --git a/src/responder/sudo/sudosrv_get_sudorules.c b/src/responder/sudo/sudosrv_get_sudorules.c
|
|
|
6cf099 |
index a0b09e69b71f963c353c9c6331c0708cc364924c..cc06977d97e3319584251bdab26e85855d275e8a 100644
|
|
|
6cf099 |
--- a/src/responder/sudo/sudosrv_get_sudorules.c
|
|
|
6cf099 |
+++ b/src/responder/sudo/sudosrv_get_sudorules.c
|
|
|
6cf099 |
@@ -160,7 +160,10 @@ static errno_t sudosrv_get_user(struct sudo_dom_ctx *dctx)
|
|
|
6cf099 |
if ((user->count == 0 || cache_expire < time(NULL))
|
|
|
6cf099 |
&& dctx->check_provider) {
|
|
|
6cf099 |
|
|
|
6cf099 |
- if (DOM_HAS_VIEWS(dom) && user->count == 0) {
|
|
|
6cf099 |
+ if (DOM_HAS_VIEWS(dom) && (user->count == 0
|
|
|
6cf099 |
+ || ldb_msg_find_attr_as_string(user->msgs[0],
|
|
|
6cf099 |
+ OVERRIDE_PREFIX SYSDB_NAME,
|
|
|
6cf099 |
+ NULL) != NULL)) {
|
|
|
6cf099 |
extra_flag = EXTRA_INPUT_MAYBE_WITH_VIEW;
|
|
|
6cf099 |
}
|
|
|
6cf099 |
|
|
|
6cf099 |
--
|
|
|
6cf099 |
2.4.3
|
|
|
6cf099 |
|