Commit Graph

18 Commits

Author SHA1 Message Date
John Regan
4f1b54dd92 passwd: prevent segfault when running as root
When running as root, passwd attempts to compare the new password to
the old password, without having grabbed the old passwd.

This checks if the previous password hash was grabbed before comparing
it against the new password hash.
2019-01-30 11:57:49 +00:00
Michael Forney
fae9ca81a2 passwd: Use a random salt when encrypting passwords 2017-08-22 13:36:56 +02:00
sin
fa7ae96e0f passwd: fix function def style 2016-04-24 17:47:28 +01:00
Hiltjo Posthuma
7e394bd70f code-style: cleanup
- move main() at the bottom.
- put global variables at the top.
- improve usage() lines (consistent with man page).
2015-02-06 15:16:24 +00:00
sin
10d6bf2f4d Stop using *_FILENO 2014-11-30 13:12:33 +00:00
sin
6f7f387352 Stop using EXIT_{SUCCESS,FAILURE} 2014-10-02 23:47:39 +01:00
sin
d10f04c473 Fix include order 2014-07-14 13:30:09 +01:00
Hiltjo Posthuma
8fdc7d70bd passwd: fix /etc/passwd support, ...
... rewrite parts to use libc functions (supported by musl and glibc).
2014-07-14 11:14:36 +01:00
Hiltjo Posthuma
10a539e744 passwd: fix potential double close() 2014-07-12 20:04:29 +01:00
Hiltjo Posthuma
f48d545c77 passwd: improvements
- add shadow support.
- allow passwd without argument, prompt which user password is changed.
2014-07-10 22:04:06 +01:00
sin
86060b535c Fix includes across all tools 2014-06-30 19:04:47 +01:00
sin
924fc8449b Disable core dumps in case passwd(1) crashes
Avoids leaking the shadow db.
2014-06-10 11:44:33 +01:00
sin
5eeef920f0 Add password cipher type in config.def.h - default to SHA-512 2014-06-09 16:51:59 +01:00
sin
5980da83e7 Add passwd manpage 2014-06-09 16:44:47 +01:00
sin
1b6fab85d6 Fix passwd semantics 2014-06-09 12:52:49 +01:00
sin
834279b4a9 If root starts passwd don't ask for current password 2014-06-09 12:37:54 +01:00
sin
f628b72747 Allow the user to change from an empty password
Default to SHA-512.
2014-06-05 17:17:18 +01:00
sin
1ec996439a Add initial implementation of passwd(1)
No shadow support yet.
2014-06-05 16:57:27 +01:00