|
|
905b4d |
From 2f38a6fe31be1619f4725733f388b99e64f9c668 Mon Sep 17 00:00:00 2001
|
|
|
905b4d |
From: Jakub Hrozek <jhrozek@redhat.com>
|
|
|
905b4d |
Date: Tue, 6 Jan 2015 13:14:35 +0100
|
|
|
905b4d |
Subject: [PATCH 152/160] GPO: Ignore ENOENT result from
|
|
|
905b4d |
sysdb_gpo_get_gpo_result_setting()
|
|
|
905b4d |
|
|
|
905b4d |
https://fedorahosted.org/sssd/ticket/2542
|
|
|
905b4d |
|
|
|
905b4d |
If the GPO result object was missing completely, we would error out with
|
|
|
905b4d |
a fatal error code. It's more user-friendly to treat the missing object
|
|
|
905b4d |
as if the requested attribute was missing on the provider level.
|
|
|
905b4d |
|
|
|
905b4d |
Reviewed-by: Pavel Reichl <preichl@redhat.com>
|
|
|
905b4d |
(cherry picked from commit fc2cc91a5b645180e53d46436b0d08011aac8d74)
|
|
|
905b4d |
---
|
|
|
905b4d |
src/providers/ad/ad_gpo.c | 5 ++++-
|
|
|
905b4d |
1 file changed, 4 insertions(+), 1 deletion(-)
|
|
|
905b4d |
|
|
|
905b4d |
diff --git a/src/providers/ad/ad_gpo.c b/src/providers/ad/ad_gpo.c
|
|
|
905b4d |
index 62715861c91484fa2a57e7cc13ba403c9096d9a7..4f8497809bfe962672a99f26de7b61f9f89ac6fa 100644
|
|
|
905b4d |
--- a/src/providers/ad/ad_gpo.c
|
|
|
905b4d |
+++ b/src/providers/ad/ad_gpo.c
|
|
|
905b4d |
@@ -1339,7 +1339,10 @@ parse_policy_setting_value(TALLOC_CTX *mem_ctx,
|
|
|
905b4d |
char **sids_list = NULL;
|
|
|
905b4d |
|
|
|
905b4d |
ret = sysdb_gpo_get_gpo_result_setting(mem_ctx, domain, key, &value);
|
|
|
905b4d |
- if (ret != EOK) {
|
|
|
905b4d |
+ if (ret == ENOENT) {
|
|
|
905b4d |
+ DEBUG(SSSDBG_TRACE_FUNC, "No previous GPO result\n");
|
|
|
905b4d |
+ value = NULL;
|
|
|
905b4d |
+ } else if (ret != EOK) {
|
|
|
905b4d |
DEBUG(SSSDBG_OP_FAILURE,
|
|
|
905b4d |
"Cannot retrieve settings from sysdb for key: '%s' [%d][%s].\n",
|
|
|
905b4d |
key, ret, sss_strerror(ret));
|
|
|
905b4d |
--
|
|
|
905b4d |
2.1.0
|
|
|
905b4d |
|