|
|
71e593 |
From 291071cb3c04eda7606d62bbff123a0a125c7d60 Mon Sep 17 00:00:00 2001
|
|
|
71e593 |
From: Tomas Halman <thalman@redhat.com>
|
|
|
71e593 |
Date: Tue, 13 Nov 2018 12:21:16 +0100
|
|
|
71e593 |
Subject: [PATCH] SSSCTL: user-show says that user is expired
|
|
|
71e593 |
MIME-Version: 1.0
|
|
|
71e593 |
Content-Type: text/plain; charset=UTF-8
|
|
|
71e593 |
Content-Transfer-Encoding: 8bit
|
|
|
71e593 |
|
|
|
71e593 |
sssctl user-show says that user is expired if the user comes from files
|
|
|
71e593 |
provider. This is ok because files user's expiration time is always set
|
|
|
71e593 |
to 0 but we should print a better, less confusing message.
|
|
|
71e593 |
|
|
|
71e593 |
The same change apply to groups.
|
|
|
71e593 |
|
|
|
71e593 |
Resolves:
|
|
|
71e593 |
https://pagure.io/SSSD/sssd/issue/3858
|
|
|
71e593 |
|
|
|
71e593 |
Reviewed-by: Pavel Březina <pbrezina@redhat.com>
|
|
|
71e593 |
---
|
|
|
71e593 |
src/tools/sssctl/sssctl_cache.c | 10 ++++++++++
|
|
|
71e593 |
1 file changed, 10 insertions(+)
|
|
|
71e593 |
|
|
|
71e593 |
diff --git a/src/tools/sssctl/sssctl_cache.c b/src/tools/sssctl/sssctl_cache.c
|
|
|
71e593 |
index 42a2a60fd..e0d067cfb 100644
|
|
|
71e593 |
--- a/src/tools/sssctl/sssctl_cache.c
|
|
|
71e593 |
+++ b/src/tools/sssctl/sssctl_cache.c
|
|
|
71e593 |
@@ -154,6 +154,11 @@ static errno_t get_attr_expire(TALLOC_CTX *mem_ctx,
|
|
|
71e593 |
return ret;
|
|
|
71e593 |
}
|
|
|
71e593 |
|
|
|
71e593 |
+ if (is_files_provider(dom)) {
|
|
|
71e593 |
+ *_value = "Never";
|
|
|
71e593 |
+ return EOK;
|
|
|
71e593 |
+ }
|
|
|
71e593 |
+
|
|
|
71e593 |
if (value < time(NULL)) {
|
|
|
71e593 |
*_value = "Expired";
|
|
|
71e593 |
return EOK;
|
|
|
71e593 |
@@ -179,6 +184,11 @@ static errno_t attr_initgr(TALLOC_CTX *mem_ctx,
|
|
|
71e593 |
return ret;
|
|
|
71e593 |
}
|
|
|
71e593 |
|
|
|
71e593 |
+ if (is_files_provider(dom)) {
|
|
|
71e593 |
+ *_value = "Never";
|
|
|
71e593 |
+ return EOK;
|
|
|
71e593 |
+ }
|
|
|
71e593 |
+
|
|
|
71e593 |
if (value < time(NULL)) {
|
|
|
71e593 |
*_value = "Expired";
|
|
|
71e593 |
return EOK;
|
|
|
71e593 |
--
|
|
|
71e593 |
2.19.1
|
|
|
71e593 |
|