diff options
author | Balint Reczey <balint.reczey@canonical.com> | 2019-06-23 22:06:37 +0200 |
---|---|---|
committer | Balint Reczey <balint.reczey@canonical.com> | 2019-06-23 22:06:37 +0200 |
commit | b28d45d2bd2462414b9dbbe38e6c7f3d5f7b462b (patch) | |
tree | 4b068e3513ef5c60228cddfcda72be0a31d09b14 /src/pwck.c | |
parent | b0729855e8fb744192a0395ea24673557818172c (diff) | |
download | shadow-b28d45d2bd2462414b9dbbe38e6c7f3d5f7b462b.tar.gz |
New upstream version 4.7upstream/4.7
Diffstat (limited to 'src/pwck.c')
-rw-r--r-- | src/pwck.c | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -48,6 +48,7 @@ #include "shadowio.h" #include "getdef.h" #include "nscd.h" +#include "sssd.h" #ifdef WITH_TCB #include "tcbfuncs.h" #endif /* WITH_TCB */ @@ -608,7 +609,7 @@ static void check_pw_file (int *errors, bool *changed) sp.sp_inact = -1; sp.sp_expire = -1; sp.sp_flag = SHADOW_SP_FLAG_UNSET; - sp.sp_lstchg = (long) time ((time_t *) 0) / SCALE; + sp.sp_lstchg = (long) gettime () / SCALE; if (0 == sp.sp_lstchg) { /* Better disable aging than * requiring a password change @@ -876,7 +877,10 @@ int main (int argc, char **argv) close_files (changed); - nscd_flush_cache ("passwd"); + if (!read_only) { + nscd_flush_cache ("passwd"); + sssd_flush_cache (SSSD_DB_PASSWD); + } /* * Tell the user what we did and exit. |