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 207e4c974a52429f05f3472668250acde34090a1 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..49f05b2c27 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 (value <= 1 && (strcasecmp(dom->provider, "files") == 0)) { + *_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 (value <= 1 && (strcasecmp(dom->provider, "files") == 0)) { + *_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