diff options
author | Balint Reczey <balint.reczey@canonical.com> | 2017-08-10 18:26:45 -0400 |
---|---|---|
committer | Balint Reczey <balint.reczey@canonical.com> | 2017-08-10 18:26:45 -0400 |
commit | 589f97ade4610b98cc532c8142343d4c33694e72 (patch) | |
tree | 38890f681daa26c57e865b4feca10d0ca53e1046 /src/newusers.c | |
parent | 365658d0f3a51814626afbb70aa2dd7b5e82ac36 (diff) | |
download | shadow-589f97ade4610b98cc532c8142343d4c33694e72.tar.gz |
New upstream version 4.5upstream/4.5
Diffstat (limited to 'src/newusers.c')
-rw-r--r-- | src/newusers.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/newusers.c b/src/newusers.c index 724cbb40..c38aec4b 100644 --- a/src/newusers.c +++ b/src/newusers.c @@ -496,7 +496,7 @@ static int add_passwd (struct passwd *pwd, const char *password) } spent.sp_pwdp = cp; } - spent.sp_lstchg = (long) time ((time_t *) 0) / SCALE; + spent.sp_lstchg = (long) gettime () / SCALE; if (0 == spent.sp_lstchg) { /* Better disable aging than requiring a password * change */ @@ -553,7 +553,7 @@ static int add_passwd (struct passwd *pwd, const char *password) */ spent.sp_pwdp = "!"; #endif - spent.sp_lstchg = (long) time ((time_t *) 0) / SCALE; + spent.sp_lstchg = (long) gettime () / SCALE; if (0 == spent.sp_lstchg) { /* Better disable aging than requiring a password change */ spent.sp_lstchg = -1; @@ -988,8 +988,8 @@ int main (int argc, char **argv) is_shadow_grp = sgr_file_present (); #endif #ifdef ENABLE_SUBIDS - is_sub_uid = sub_uid_file_present (); - is_sub_gid = sub_gid_file_present (); + is_sub_uid = sub_uid_file_present () && !rflg; + is_sub_gid = sub_gid_file_present () && !rflg; #endif /* ENABLE_SUBIDS */ open_files (); |