lib/, src/: Remove SCALE definition
SCALE is always DAY (and has to be always DAY), so replace it with DAY in source code and remove unneeded calculations. Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org> Link: <https://github.com/shadow-maint/shadow/pull/876> Signed-off-by: Alejandro Colomar <alx@kernel.org>
This commit is contained in:
committed by
Serge Hallyn
parent
11091949be
commit
ecc3508877
+2
-3
@@ -617,7 +617,7 @@ static void new_spent (struct spwd *spent)
|
||||
spent->sp_pwdp = new_pw_passwd (spent->sp_pwdp);
|
||||
|
||||
if (pflg) {
|
||||
spent->sp_lstchg = gettime () / SCALE;
|
||||
spent->sp_lstchg = gettime () / DAY;
|
||||
if (0 == spent->sp_lstchg) {
|
||||
/* Better disable aging than requiring a password
|
||||
* change. */
|
||||
@@ -1064,7 +1064,6 @@ static void process_flags (int argc, char **argv)
|
||||
Prog, optarg);
|
||||
exit (E_BAD_ARG);
|
||||
}
|
||||
user_newexpire *= DAY / SCALE;
|
||||
eflg = true;
|
||||
break;
|
||||
case 'f':
|
||||
@@ -1742,7 +1741,7 @@ static void usr_update (void)
|
||||
spent.sp_pwdp = xstrdup (pwent.pw_passwd);
|
||||
pwent.pw_passwd = xstrdup (SHADOW_PASSWD_STRING);
|
||||
|
||||
spent.sp_lstchg = gettime () / SCALE;
|
||||
spent.sp_lstchg = gettime () / DAY;
|
||||
if (0 == spent.sp_lstchg) {
|
||||
/* Better disable aging than
|
||||
* requiring a password change */
|
||||
|
||||
Reference in New Issue
Block a user