History log of /openbsd-current/usr.bin/passwd/pwd_check.c
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 1.19 24-May-2024 op

typo: "pwdtries" -> "passwordtries"; ok millert@


Revision tags: OPENBSD_7_4_BASE OPENBSD_7_5_BASE
# 1.18 08-May-2023 tobias

Improve error handling

Close pipe file descriptors if fork fails.
Also do not parse exit status of child if waitpid fails.

with input by and ok millert@


Revision tags: OPENBSD_7_0_BASE OPENBSD_7_1_BASE OPENBSD_7_2_BASE OPENBSD_7_3_BASE
# 1.17 28-Aug-2021 robert

use stderr for printing error and informational messages

this makes it easier to parse what passwd(1) is doing if
spawned from a GUI

ok millert@


Revision tags: OPENBSD_6_2_BASE OPENBSD_6_3_BASE OPENBSD_6_4_BASE OPENBSD_6_5_BASE OPENBSD_6_6_BASE OPENBSD_6_7_BASE OPENBSD_6_8_BASE OPENBSD_6_9_BASE
# 1.16 21-Aug-2017 deraadt

Use waitpid()/EINTR idiom for the specific pid, rather than generic wait(),
in case the parent process was started with a dangling child. This style
ensures any potential parent:child interlock isn't disrupted due to the
"wrong" child being waited on first. Then the other other childs can safely
zombie.
ok millert jca brynet


Revision tags: OPENBSD_5_9_BASE OPENBSD_6_0_BASE OPENBSD_6_1_BASE
# 1.15 09-Dec-2015 mmcc

Remove NULL-checks before free(). ok tb@


# 1.14 26-Nov-2015 deraadt

Delete YP password related code. As a result, these can also be
pledged. Keep an eye out for regressions, because they could be
uncomfortable.
ok beck semarie


Revision tags: OPENBSD_5_4_BASE OPENBSD_5_5_BASE OPENBSD_5_6_BASE OPENBSD_5_7_BASE OPENBSD_5_8_BASE
# 1.13 02-Mar-2013 ajacoutot

When using an external password quality check program, do not run the
patterns checks which may contradict the rules set by the external
helper.

ok millert@


Revision tags: OPENBSD_4_5_BASE OPENBSD_4_6_BASE OPENBSD_4_7_BASE OPENBSD_4_8_BASE OPENBSD_4_9_BASE OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE OPENBSD_5_3_BASE
# 1.12 06-Nov-2008 djm

-Wall -Wshadow clean, no binary change


Revision tags: OPENBSD_3_8_BASE OPENBSD_3_9_BASE OPENBSD_4_0_BASE OPENBSD_4_1_BASE OPENBSD_4_2_BASE OPENBSD_4_3_BASE OPENBSD_4_4_BASE
# 1.11 01-May-2005 djm

run password strength checking regexes as user; ok deraadt@


Revision tags: OPENBSD_3_7_BASE
# 1.10 04-Mar-2005 moritz

make :passwordtries=0:\ in login.conf work.
from Ross Richardson. closes PR 4133.

ok henning@ millert@


Revision tags: OPENBSD_3_6_BASE
# 1.9 13-Jul-2004 millert

Simplify some things now that we only have login.conf to worry about
and fix two bugs introduced in the last commit (a duplicate free
and reversed logic for the default cipher types).


# 1.8 13-Jul-2004 millert

passwd.conf has been deprecated since login.conf was imported.
Today it finally dies. Based on a diff from Gabriel Kihlman.


Revision tags: OPENBSD_3_5_BASE
# 1.7 14-Mar-2004 tedu

use pid_t for fork return. started by Joris Vink


Revision tags: OPENBSD_3_2_BASE OPENBSD_3_3_BASE OPENBSD_3_4_BASE
# 1.6 28-Jun-2002 deraadt

various cleanups; ok millert


# 1.5 27-May-2002 itojun

support ":" prefix as group name, as username can contain ".".
(still support "." as welll). passwd.conf support will go away in a
couple of months anyways... ok by millert


Revision tags: OPENBSD_3_0_BASE OPENBSD_3_1_BASE
# 1.4 18-Jun-2001 millert

o move passwd.conf variables into login.conf
o no longer install passwd.conf (but it is used if it exists and the
needed info is not in login.conf)
o added passwordtime and minpasswordlen login.conf variables


Revision tags: OPENBSD_2_9_BASE
# 1.3 24-Nov-2000 millert

Include err.h and util.h


# 1.2 24-Nov-2000 millert

Include strings.h for strlen() prototype
Include errno.h, not sys/errno.h since this is userland


Revision tags: OPENBSD_2_8_BASE
# 1.1 01-Aug-2000 provos

integrate password quality checking, disallow all digit passwords motivated
by Solar Designer. External password checking program can be spawned now,
number of password trials configurable. work by me and Bob Beck.


# 1.18 08-May-2023 tobias

Improve error handling

Close pipe file descriptors if fork fails.
Also do not parse exit status of child if waitpid fails.

with input by and ok millert@


Revision tags: OPENBSD_7_0_BASE OPENBSD_7_1_BASE OPENBSD_7_2_BASE OPENBSD_7_3_BASE
# 1.17 28-Aug-2021 robert

use stderr for printing error and informational messages

this makes it easier to parse what passwd(1) is doing if
spawned from a GUI

ok millert@


Revision tags: OPENBSD_6_2_BASE OPENBSD_6_3_BASE OPENBSD_6_4_BASE OPENBSD_6_5_BASE OPENBSD_6_6_BASE OPENBSD_6_7_BASE OPENBSD_6_8_BASE OPENBSD_6_9_BASE
# 1.16 21-Aug-2017 deraadt

Use waitpid()/EINTR idiom for the specific pid, rather than generic wait(),
in case the parent process was started with a dangling child. This style
ensures any potential parent:child interlock isn't disrupted due to the
"wrong" child being waited on first. Then the other other childs can safely
zombie.
ok millert jca brynet


Revision tags: OPENBSD_5_9_BASE OPENBSD_6_0_BASE OPENBSD_6_1_BASE
# 1.15 09-Dec-2015 mmcc

Remove NULL-checks before free(). ok tb@


# 1.14 26-Nov-2015 deraadt

Delete YP password related code. As a result, these can also be
pledged. Keep an eye out for regressions, because they could be
uncomfortable.
ok beck semarie


Revision tags: OPENBSD_5_4_BASE OPENBSD_5_5_BASE OPENBSD_5_6_BASE OPENBSD_5_7_BASE OPENBSD_5_8_BASE
# 1.13 02-Mar-2013 ajacoutot

When using an external password quality check program, do not run the
patterns checks which may contradict the rules set by the external
helper.

ok millert@


Revision tags: OPENBSD_4_5_BASE OPENBSD_4_6_BASE OPENBSD_4_7_BASE OPENBSD_4_8_BASE OPENBSD_4_9_BASE OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE OPENBSD_5_3_BASE
# 1.12 06-Nov-2008 djm

-Wall -Wshadow clean, no binary change


Revision tags: OPENBSD_3_8_BASE OPENBSD_3_9_BASE OPENBSD_4_0_BASE OPENBSD_4_1_BASE OPENBSD_4_2_BASE OPENBSD_4_3_BASE OPENBSD_4_4_BASE
# 1.11 01-May-2005 djm

run password strength checking regexes as user; ok deraadt@


Revision tags: OPENBSD_3_7_BASE
# 1.10 04-Mar-2005 moritz

make :passwordtries=0:\ in login.conf work.
from Ross Richardson. closes PR 4133.

ok henning@ millert@


Revision tags: OPENBSD_3_6_BASE
# 1.9 13-Jul-2004 millert

Simplify some things now that we only have login.conf to worry about
and fix two bugs introduced in the last commit (a duplicate free
and reversed logic for the default cipher types).


# 1.8 13-Jul-2004 millert

passwd.conf has been deprecated since login.conf was imported.
Today it finally dies. Based on a diff from Gabriel Kihlman.


Revision tags: OPENBSD_3_5_BASE
# 1.7 14-Mar-2004 tedu

use pid_t for fork return. started by Joris Vink


Revision tags: OPENBSD_3_2_BASE OPENBSD_3_3_BASE OPENBSD_3_4_BASE
# 1.6 28-Jun-2002 deraadt

various cleanups; ok millert


# 1.5 27-May-2002 itojun

support ":" prefix as group name, as username can contain ".".
(still support "." as welll). passwd.conf support will go away in a
couple of months anyways... ok by millert


Revision tags: OPENBSD_3_0_BASE OPENBSD_3_1_BASE
# 1.4 18-Jun-2001 millert

o move passwd.conf variables into login.conf
o no longer install passwd.conf (but it is used if it exists and the
needed info is not in login.conf)
o added passwordtime and minpasswordlen login.conf variables


Revision tags: OPENBSD_2_9_BASE
# 1.3 24-Nov-2000 millert

Include err.h and util.h


# 1.2 24-Nov-2000 millert

Include strings.h for strlen() prototype
Include errno.h, not sys/errno.h since this is userland


Revision tags: OPENBSD_2_8_BASE
# 1.1 01-Aug-2000 provos

integrate password quality checking, disallow all digit passwords motivated
by Solar Designer. External password checking program can be spawned now,
number of password trials configurable. work by me and Bob Beck.


# 1.17 28-Aug-2021 robert

use stderr for printing error and informational messages

this makes it easier to parse what passwd(1) is doing if
spawned from a GUI

ok millert@


Revision tags: OPENBSD_6_2_BASE OPENBSD_6_3_BASE OPENBSD_6_4_BASE OPENBSD_6_5_BASE OPENBSD_6_6_BASE OPENBSD_6_7_BASE OPENBSD_6_8_BASE OPENBSD_6_9_BASE
# 1.16 21-Aug-2017 deraadt

Use waitpid()/EINTR idiom for the specific pid, rather than generic wait(),
in case the parent process was started with a dangling child. This style
ensures any potential parent:child interlock isn't disrupted due to the
"wrong" child being waited on first. Then the other other childs can safely
zombie.
ok millert jca brynet


Revision tags: OPENBSD_5_9_BASE OPENBSD_6_0_BASE OPENBSD_6_1_BASE
# 1.15 09-Dec-2015 mmcc

Remove NULL-checks before free(). ok tb@


# 1.14 26-Nov-2015 deraadt

Delete YP password related code. As a result, these can also be
pledged. Keep an eye out for regressions, because they could be
uncomfortable.
ok beck semarie


Revision tags: OPENBSD_5_4_BASE OPENBSD_5_5_BASE OPENBSD_5_6_BASE OPENBSD_5_7_BASE OPENBSD_5_8_BASE
# 1.13 02-Mar-2013 ajacoutot

When using an external password quality check program, do not run the
patterns checks which may contradict the rules set by the external
helper.

ok millert@


Revision tags: OPENBSD_4_5_BASE OPENBSD_4_6_BASE OPENBSD_4_7_BASE OPENBSD_4_8_BASE OPENBSD_4_9_BASE OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE OPENBSD_5_3_BASE
# 1.12 06-Nov-2008 djm

-Wall -Wshadow clean, no binary change


Revision tags: OPENBSD_3_8_BASE OPENBSD_3_9_BASE OPENBSD_4_0_BASE OPENBSD_4_1_BASE OPENBSD_4_2_BASE OPENBSD_4_3_BASE OPENBSD_4_4_BASE
# 1.11 01-May-2005 djm

run password strength checking regexes as user; ok deraadt@


Revision tags: OPENBSD_3_7_BASE
# 1.10 04-Mar-2005 moritz

make :passwordtries=0:\ in login.conf work.
from Ross Richardson. closes PR 4133.

ok henning@ millert@


Revision tags: OPENBSD_3_6_BASE
# 1.9 13-Jul-2004 millert

Simplify some things now that we only have login.conf to worry about
and fix two bugs introduced in the last commit (a duplicate free
and reversed logic for the default cipher types).


# 1.8 13-Jul-2004 millert

passwd.conf has been deprecated since login.conf was imported.
Today it finally dies. Based on a diff from Gabriel Kihlman.


Revision tags: OPENBSD_3_5_BASE
# 1.7 14-Mar-2004 tedu

use pid_t for fork return. started by Joris Vink


Revision tags: OPENBSD_3_2_BASE OPENBSD_3_3_BASE OPENBSD_3_4_BASE
# 1.6 28-Jun-2002 deraadt

various cleanups; ok millert


# 1.5 27-May-2002 itojun

support ":" prefix as group name, as username can contain ".".
(still support "." as welll). passwd.conf support will go away in a
couple of months anyways... ok by millert


Revision tags: OPENBSD_3_0_BASE OPENBSD_3_1_BASE
# 1.4 18-Jun-2001 millert

o move passwd.conf variables into login.conf
o no longer install passwd.conf (but it is used if it exists and the
needed info is not in login.conf)
o added passwordtime and minpasswordlen login.conf variables


Revision tags: OPENBSD_2_9_BASE
# 1.3 24-Nov-2000 millert

Include err.h and util.h


# 1.2 24-Nov-2000 millert

Include strings.h for strlen() prototype
Include errno.h, not sys/errno.h since this is userland


Revision tags: OPENBSD_2_8_BASE
# 1.1 01-Aug-2000 provos

integrate password quality checking, disallow all digit passwords motivated
by Solar Designer. External password checking program can be spawned now,
number of password trials configurable. work by me and Bob Beck.


Revision tags: OPENBSD_6_2_BASE
# 1.16 21-Aug-2017 deraadt

Use waitpid()/EINTR idiom for the specific pid, rather than generic wait(),
in case the parent process was started with a dangling child. This style
ensures any potential parent:child interlock isn't disrupted due to the
"wrong" child being waited on first. Then the other other childs can safely
zombie.
ok millert jca brynet


Revision tags: OPENBSD_5_9_BASE OPENBSD_6_0_BASE OPENBSD_6_1_BASE
# 1.15 09-Dec-2015 mmcc

Remove NULL-checks before free(). ok tb@


# 1.14 26-Nov-2015 deraadt

Delete YP password related code. As a result, these can also be
pledged. Keep an eye out for regressions, because they could be
uncomfortable.
ok beck semarie


Revision tags: OPENBSD_5_4_BASE OPENBSD_5_5_BASE OPENBSD_5_6_BASE OPENBSD_5_7_BASE OPENBSD_5_8_BASE
# 1.13 02-Mar-2013 ajacoutot

When using an external password quality check program, do not run the
patterns checks which may contradict the rules set by the external
helper.

ok millert@


Revision tags: OPENBSD_4_5_BASE OPENBSD_4_6_BASE OPENBSD_4_7_BASE OPENBSD_4_8_BASE OPENBSD_4_9_BASE OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE OPENBSD_5_3_BASE
# 1.12 06-Nov-2008 djm

-Wall -Wshadow clean, no binary change


Revision tags: OPENBSD_3_8_BASE OPENBSD_3_9_BASE OPENBSD_4_0_BASE OPENBSD_4_1_BASE OPENBSD_4_2_BASE OPENBSD_4_3_BASE OPENBSD_4_4_BASE
# 1.11 01-May-2005 djm

run password strength checking regexes as user; ok deraadt@


Revision tags: OPENBSD_3_7_BASE
# 1.10 04-Mar-2005 moritz

make :passwordtries=0:\ in login.conf work.
from Ross Richardson. closes PR 4133.

ok henning@ millert@


Revision tags: OPENBSD_3_6_BASE
# 1.9 13-Jul-2004 millert

Simplify some things now that we only have login.conf to worry about
and fix two bugs introduced in the last commit (a duplicate free
and reversed logic for the default cipher types).


# 1.8 13-Jul-2004 millert

passwd.conf has been deprecated since login.conf was imported.
Today it finally dies. Based on a diff from Gabriel Kihlman.


Revision tags: OPENBSD_3_5_BASE
# 1.7 14-Mar-2004 tedu

use pid_t for fork return. started by Joris Vink


Revision tags: OPENBSD_3_2_BASE OPENBSD_3_3_BASE OPENBSD_3_4_BASE
# 1.6 28-Jun-2002 deraadt

various cleanups; ok millert


# 1.5 27-May-2002 itojun

support ":" prefix as group name, as username can contain ".".
(still support "." as welll). passwd.conf support will go away in a
couple of months anyways... ok by millert


Revision tags: OPENBSD_3_0_BASE OPENBSD_3_1_BASE
# 1.4 18-Jun-2001 millert

o move passwd.conf variables into login.conf
o no longer install passwd.conf (but it is used if it exists and the
needed info is not in login.conf)
o added passwordtime and minpasswordlen login.conf variables


Revision tags: OPENBSD_2_9_BASE
# 1.3 24-Nov-2000 millert

Include err.h and util.h


# 1.2 24-Nov-2000 millert

Include strings.h for strlen() prototype
Include errno.h, not sys/errno.h since this is userland


Revision tags: OPENBSD_2_8_BASE
# 1.1 01-Aug-2000 provos

integrate password quality checking, disallow all digit passwords motivated
by Solar Designer. External password checking program can be spawned now,
number of password trials configurable. work by me and Bob Beck.