summaryrefslogtreecommitdiffstats
path: root/lib/pwd2spwd.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-26 16:18:37 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-26 16:18:37 +0000
commitb6b00dd55e035bfbe311a527b567962ffa77ee43 (patch)
treecafc4d13785448e5a78bd40a51697ee07f07ac12 /lib/pwd2spwd.c
parentAdding debian version 1:4.13+dfsg1-5. (diff)
downloadshadow-b6b00dd55e035bfbe311a527b567962ffa77ee43.tar.xz
shadow-b6b00dd55e035bfbe311a527b567962ffa77ee43.zip
Merging upstream version 1:4.15.2.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--lib/pwd2spwd.c (renamed from libmisc/pwd2spwd.c)9
1 files changed, 2 insertions, 7 deletions
diff --git a/libmisc/pwd2spwd.c b/lib/pwd2spwd.c
index 139a024..eea9519 100644
--- a/libmisc/pwd2spwd.c
+++ b/lib/pwd2spwd.c
@@ -11,8 +11,6 @@
#ident "$Id$"
-#ifndef USE_PAM
-
#include <sys/types.h>
#include "prototypes.h"
#include "defines.h"
@@ -41,8 +39,8 @@ struct spwd *pwd_to_spwd (const struct passwd *pw)
* Defaults used if there is no pw_age information.
*/
sp.sp_min = 0;
- sp.sp_max = (10000L * DAY) / SCALE;
- sp.sp_lstchg = (long) gettime () / SCALE;
+ sp.sp_max = 10000;
+ sp.sp_lstchg = gettime () / DAY;
if (0 == sp.sp_lstchg) {
/* Better disable aging than requiring a password
* change */
@@ -61,7 +59,4 @@ struct spwd *pwd_to_spwd (const struct passwd *pw)
return &sp;
}
-#else /* USE_PAM */
-extern int errno; /* warning: ANSI C forbids an empty source file */
-#endif /* !USE_PAM */