URL: https://github.com/SSSD/sssd/pull/694
Author: thalman
 Title: #694: SSSCTL: user-show says that user is expired
Action: synchronized

To pull the PR as Git branch:
git remote add ghsssd https://github.com/SSSD/sssd
git fetch ghsssd pull/694/head:pr694
git checkout pr694
From 3d7d9c7a3a7bc05c76612c76b7b8ca31b1d6517a Mon Sep 17 00:00:00 2001
From: Tomas Halman <thal...@redhat.com>
Date: Tue, 13 Nov 2018 12:21:16 +0100
Subject: [PATCH] SSSCTL: user-show says that user is expired

sssctl user-show says that user is expired if the user comes from files
provider. This is ok because files user's expiration time is always set
to 0 but we should print a better, less confusing message.

The same change apply to groups.

Resolves:
https://pagure.io/SSSD/sssd/issue/3858
---
 src/tools/sssctl/sssctl_cache.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/src/tools/sssctl/sssctl_cache.c b/src/tools/sssctl/sssctl_cache.c
index 42a2a60fd3..e0d067cfbe 100644
--- a/src/tools/sssctl/sssctl_cache.c
+++ b/src/tools/sssctl/sssctl_cache.c
@@ -154,6 +154,11 @@ static errno_t get_attr_expire(TALLOC_CTX *mem_ctx,
         return ret;
     }
 
+    if (is_files_provider(dom)) {
+        *_value = "Never";
+        return EOK;
+    }
+
     if (value < time(NULL)) {
         *_value = "Expired";
         return EOK;
@@ -179,6 +184,11 @@ static errno_t attr_initgr(TALLOC_CTX *mem_ctx,
         return ret;
     }
 
+    if (is_files_provider(dom)) {
+        *_value = "Never";
+        return EOK;
+    }
+
     if (value < time(NULL)) {
         *_value = "Expired";
         return EOK;
_______________________________________________
sssd-devel mailing list -- sssd-devel@lists.fedorahosted.org
To unsubscribe send an email to sssd-devel-le...@lists.fedorahosted.org
Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedorahosted.org/archives/list/sssd-devel@lists.fedorahosted.org

Reply via email to