|
|
3247ef |
From e865b008aa8947efca0116deb95e29cc2309256f Mon Sep 17 00:00:00 2001
|
|
|
3247ef |
From: Sumit Bose <sbose@redhat.com>
|
|
|
3247ef |
Date: Tue, 30 Mar 2021 15:31:17 +0200
|
|
|
3247ef |
Subject: [PATCH] AD GPO: respect ad_gpo_implicit_deny if no GPO is present
|
|
|
3247ef |
MIME-Version: 1.0
|
|
|
3247ef |
Content-Type: text/plain; charset=UTF-8
|
|
|
3247ef |
Content-Transfer-Encoding: 8bit
|
|
|
3247ef |
|
|
|
3247ef |
Currently ad_gpo_implicit_deny=True is not applied if there is no GPO at
|
|
|
3247ef |
all for the given client. With this patch this case is handled as
|
|
|
3247ef |
expected as well.
|
|
|
3247ef |
|
|
|
3247ef |
Resolves: https://github.com/SSSD/sssd/issues/5561
|
|
|
3247ef |
|
|
|
3247ef |
:fixes: `ad_gpo_implicit_deny` is now respected even if there are no
|
|
|
3247ef |
applicable GPOs present
|
|
|
3247ef |
|
|
|
3247ef |
Reviewed-by: Pavel Březina <pbrezina@redhat.com>
|
|
|
3247ef |
---
|
|
|
3247ef |
src/providers/ad/ad_gpo.c | 10 +++++++++-
|
|
|
3247ef |
1 file changed, 9 insertions(+), 1 deletion(-)
|
|
|
3247ef |
|
|
|
3247ef |
diff --git a/src/providers/ad/ad_gpo.c b/src/providers/ad/ad_gpo.c
|
|
|
3247ef |
index b15e0f345..4ef6a7219 100644
|
|
|
3247ef |
--- a/src/providers/ad/ad_gpo.c
|
|
|
3247ef |
+++ b/src/providers/ad/ad_gpo.c
|
|
|
3247ef |
@@ -2472,7 +2472,15 @@ ad_gpo_process_gpo_done(struct tevent_req *subreq)
|
|
|
3247ef |
}
|
|
|
3247ef |
}
|
|
|
3247ef |
|
|
|
3247ef |
- ret = EOK;
|
|
|
3247ef |
+ if (state->gpo_implicit_deny == true) {
|
|
|
3247ef |
+ DEBUG(SSSDBG_TRACE_FUNC,
|
|
|
3247ef |
+ "No applicable GPOs have been found and ad_gpo_implicit_deny"
|
|
|
3247ef |
+ " is set to 'true'. The user will be denied access.\n");
|
|
|
3247ef |
+ ret = ERR_ACCESS_DENIED;
|
|
|
3247ef |
+ } else {
|
|
|
3247ef |
+ ret = EOK;
|
|
|
3247ef |
+ }
|
|
|
3247ef |
+
|
|
|
3247ef |
goto done;
|
|
|
3247ef |
}
|
|
|
3247ef |
|
|
|
3247ef |
--
|
|
|
3247ef |
2.26.3
|
|
|
3247ef |
|