mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-11-27 03:11:52 +01:00
Fix bug introduced in rev 1.23:
pw_equal does not check crypted password field, so one cannot change crypted password keeping other fields intact. Approved by: des MCF after: 3 days
This commit is contained in:
parent
d038d0bd66
commit
50789a2f3a
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=162633
@ -217,7 +217,12 @@ main(int argc, char *argv[])
|
||||
pw_fini();
|
||||
if (pw == NULL)
|
||||
err(1, "edit()");
|
||||
if (pw_equal(old_pw, pw))
|
||||
/*
|
||||
* pw_equal does not check for crypted passwords, so we
|
||||
* should do it explicitly
|
||||
*/
|
||||
if (pw_equal(old_pw, pw) &&
|
||||
strcmp(old_pw->pw_passwd, pw->pw_passwd) == 0)
|
||||
errx(0, "user information unchanged");
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user