History log of /openbsd-current/usr.bin/ssh/auth2-gss.c
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 1.36 17-May-2024 djm

g/c unused variable


# 1.35 17-May-2024 djm

Start the process of splitting sshd into separate binaries. This step
splits sshd into a listener and a session binary. More splits are
planned.

After this changes, the listener binary will validate the configuration,
load the hostkeys, listen on port 22 and manage MaxStartups only. All
session handling will be performed by a new sshd-session binary that the
listener fork+execs.

This reduces the listener process to the minimum necessary and sets us
up for future work on the sshd-session binary.

feedback/ok markus@ deraadt@

NB. if you're updating via source, please restart sshd after installing,
otherwise you run the risk of locking yourself out.


Revision tags: OPENBSD_7_4_BASE OPENBSD_7_5_BASE
# 1.34 31-Mar-2023 djm

clamp max number of GSSAPI mechanisms to 2048; ok dtucker


Revision tags: OPENBSD_7_1_BASE OPENBSD_7_2_BASE OPENBSD_7_3_BASE
# 1.33 19-Dec-2021 djm

prepare for multiple names for authmethods

allow authentication methods to have one additional name beyond their
primary name.

allow lookup by this synonym

Use primary name for authentication decisions, e.g. for
PermitRootLogin=publickey

Pass actual invoked name to the authmethods, so they can tell whether they
were requested via the their primary name or synonym.

ok markus@


Revision tags: OPENBSD_6_9_BASE OPENBSD_7_0_BASE
# 1.32 27-Jan-2021 djm

this needs kex.h now


# 1.31 27-Jan-2021 djm

make ssh->kex->session_id a sshbuf instead of u_char*/size_t and
use that instead of global variables containing copies of it.
feedback/ok markus@


# 1.30 18-Oct-2020 djm

use the new variant log macros instead of prepending __func__ and
appending ssh_err(r) manually; ok markus@


Revision tags: OPENBSD_6_4_BASE OPENBSD_6_5_BASE OPENBSD_6_6_BASE OPENBSD_6_7_BASE OPENBSD_6_8_BASE
# 1.29 31-Jul-2018 djm

delay bailout for invalid authenticating user until after the packet
containing the request has been fully parsed. Reported by Dariusz Tytko
and Micha�� Sajdak; ok deraadt


# 1.28 10-Jul-2018 djm

kerberos/gssapi fixes for buffer removal


# 1.27 09-Jul-2018 markus

sshd: switch GSSAPI to sshbuf API; ok djm@


Revision tags: OPENBSD_6_2_BASE OPENBSD_6_3_BASE
# 1.26 24-Jun-2017 djm

refactor authentication logging

optionally record successful auth methods and public credentials
used in a file accessible to user sessions

feedback and ok markus@


# 1.25 30-May-2017 markus

switch auth2 to ssh_dispatch API; ok djm@


# 1.24 30-May-2017 markus

protocol handlers all get struct ssh passed; ok djm@


# 1.23 30-May-2017 markus

sshd: pass struct ssh to auth functions; ok djm@


Revision tags: OPENBSD_5_7_BASE OPENBSD_5_8_BASE OPENBSD_5_9_BASE OPENBSD_6_0_BASE OPENBSD_6_1_BASE
# 1.22 19-Jan-2015 markus

move dispatch to struct ssh; ok djm@


Revision tags: OPENBSD_5_5_BASE OPENBSD_5_6_BASE
# 1.21 26-Feb-2014 djm

bz#2107 - cache OIDs of supported GSSAPI mechanisms before privsep
sandboxing, as running this code in the sandbox can cause violations;
ok markus@


Revision tags: OPENBSD_5_4_BASE
# 1.20 17-May-2013 djm

bye, bye xfree(); ok markus@


# 1.19 05-Apr-2013 djm

hush some {unused, printf type} warnings


Revision tags: OPENBSD_5_3_BASE
# 1.18 02-Dec-2012 djm

Fixes logging of partial authentication when privsep is enabled
Previously, we recorded "Failed xxx" since we reset authenticated before
calling auth_log() in auth2.c. This adds an explcit "Partial" state.

Add a "submethod" to auth_log() to report which submethod is used
for keyboard-interactive.

Fix multiple authentication when one of the methods is
keyboard-interactive.

ok markus@


Revision tags: OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE
# 1.17 10-Mar-2011 djm

allow GSSAPI authentication to detect when a server-side failure causes
authentication failure and don't count such failures against MaxAuthTries;
bz#1244 from simon AT sxw.org.uk; ok markus@ before lock


Revision tags: OPENBSD_4_3_BASE OPENBSD_4_4_BASE OPENBSD_4_5_BASE OPENBSD_4_6_BASE OPENBSD_4_7_BASE OPENBSD_4_8_BASE OPENBSD_4_9_BASE
# 1.16 29-Oct-2007 dtucker

Allow build without -DGSSAPI; ok deraadt@


Revision tags: OPENBSD_4_0_BASE OPENBSD_4_1_BASE OPENBSD_4_2_BASE
# 1.15 03-Aug-2006 deraadt

almost entirely get rid of the culture of ".h files that include .h files"
ok djm, sort of ok stevesk
makes the pain stop in one easy step


# 1.14 25-Mar-2006 djm

standardise spacing in $OpenBSD$ tags; requested by deraadt@


# 1.13 20-Mar-2006 djm

GSSAPI related leaks detected by Coverity via elad AT netbsd.org;
reviewed by simon AT sxw.org.uk; deraadt@ ok


Revision tags: OPENBSD_3_9_BASE
# 1.12 13-Oct-2005 stevesk

branches: 1.12.2;
KNF; ok djm@


# 1.11 13-Oct-2005 stevesk

remove unneeded #includes; ok markus@


Revision tags: OPENBSD_3_8_BASE
# 1.10 17-Jul-2005 djm

branches: 1.10.2;
knf says that a 2nd level indent is four (not three or five) spaces


# 1.9 17-Jun-2005 djm

make this -Wsign-compare clean; ok avsm@ markus@


Revision tags: OPENBSD_3_6_BASE OPENBSD_3_7_BASE
# 1.8 21-Jun-2004 avsm

branches: 1.8.2; 1.8.4;
make ssh -Wshadow clean, no functional changes
markus@ ok


Revision tags: OPENBSD_3_5_BASE
# 1.7 21-Nov-2003 djm

branches: 1.7.2;
unexpand and delete whitespace at EOL; ok markus@


# 1.6 17-Nov-2003 markus

replace "gssapi" with "gssapi-with-mic"; from Simon Wilkinson; test + ok jakob.


# 1.5 02-Nov-2003 markus

remove support for SSH_BUG_GSSAPI_BER; simon@sxw.org.uk


# 1.4 21-Oct-2003 markus

make sure the doid is larger than 2


Revision tags: OPENBSD_3_4_BASE
# 1.3 01-Sep-2003 markus

branches: 1.3.2; 1.3.4; 1.3.6;
fix leak


# 1.2 24-Aug-2003 deraadt

64 bit cleanups; markus ok


# 1.1 22-Aug-2003 markus

support GSS API user authentication; patches from Simon Wilkinson,
stripped down and tested by Jakob and myself.


# 1.34 31-Mar-2023 djm

clamp max number of GSSAPI mechanisms to 2048; ok dtucker


Revision tags: OPENBSD_7_1_BASE OPENBSD_7_2_BASE OPENBSD_7_3_BASE
# 1.33 19-Dec-2021 djm

prepare for multiple names for authmethods

allow authentication methods to have one additional name beyond their
primary name.

allow lookup by this synonym

Use primary name for authentication decisions, e.g. for
PermitRootLogin=publickey

Pass actual invoked name to the authmethods, so they can tell whether they
were requested via the their primary name or synonym.

ok markus@


Revision tags: OPENBSD_6_9_BASE OPENBSD_7_0_BASE
# 1.32 27-Jan-2021 djm

this needs kex.h now


# 1.31 27-Jan-2021 djm

make ssh->kex->session_id a sshbuf instead of u_char*/size_t and
use that instead of global variables containing copies of it.
feedback/ok markus@


# 1.30 18-Oct-2020 djm

use the new variant log macros instead of prepending __func__ and
appending ssh_err(r) manually; ok markus@


Revision tags: OPENBSD_6_4_BASE OPENBSD_6_5_BASE OPENBSD_6_6_BASE OPENBSD_6_7_BASE OPENBSD_6_8_BASE
# 1.29 31-Jul-2018 djm

delay bailout for invalid authenticating user until after the packet
containing the request has been fully parsed. Reported by Dariusz Tytko
and Micha�� Sajdak; ok deraadt


# 1.28 10-Jul-2018 djm

kerberos/gssapi fixes for buffer removal


# 1.27 09-Jul-2018 markus

sshd: switch GSSAPI to sshbuf API; ok djm@


Revision tags: OPENBSD_6_2_BASE OPENBSD_6_3_BASE
# 1.26 24-Jun-2017 djm

refactor authentication logging

optionally record successful auth methods and public credentials
used in a file accessible to user sessions

feedback and ok markus@


# 1.25 30-May-2017 markus

switch auth2 to ssh_dispatch API; ok djm@


# 1.24 30-May-2017 markus

protocol handlers all get struct ssh passed; ok djm@


# 1.23 30-May-2017 markus

sshd: pass struct ssh to auth functions; ok djm@


Revision tags: OPENBSD_5_7_BASE OPENBSD_5_8_BASE OPENBSD_5_9_BASE OPENBSD_6_0_BASE OPENBSD_6_1_BASE
# 1.22 19-Jan-2015 markus

move dispatch to struct ssh; ok djm@


Revision tags: OPENBSD_5_5_BASE OPENBSD_5_6_BASE
# 1.21 26-Feb-2014 djm

bz#2107 - cache OIDs of supported GSSAPI mechanisms before privsep
sandboxing, as running this code in the sandbox can cause violations;
ok markus@


Revision tags: OPENBSD_5_4_BASE
# 1.20 17-May-2013 djm

bye, bye xfree(); ok markus@


# 1.19 05-Apr-2013 djm

hush some {unused, printf type} warnings


Revision tags: OPENBSD_5_3_BASE
# 1.18 02-Dec-2012 djm

Fixes logging of partial authentication when privsep is enabled
Previously, we recorded "Failed xxx" since we reset authenticated before
calling auth_log() in auth2.c. This adds an explcit "Partial" state.

Add a "submethod" to auth_log() to report which submethod is used
for keyboard-interactive.

Fix multiple authentication when one of the methods is
keyboard-interactive.

ok markus@


Revision tags: OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE
# 1.17 10-Mar-2011 djm

allow GSSAPI authentication to detect when a server-side failure causes
authentication failure and don't count such failures against MaxAuthTries;
bz#1244 from simon AT sxw.org.uk; ok markus@ before lock


Revision tags: OPENBSD_4_3_BASE OPENBSD_4_4_BASE OPENBSD_4_5_BASE OPENBSD_4_6_BASE OPENBSD_4_7_BASE OPENBSD_4_8_BASE OPENBSD_4_9_BASE
# 1.16 29-Oct-2007 dtucker

Allow build without -DGSSAPI; ok deraadt@


Revision tags: OPENBSD_4_0_BASE OPENBSD_4_1_BASE OPENBSD_4_2_BASE
# 1.15 03-Aug-2006 deraadt

almost entirely get rid of the culture of ".h files that include .h files"
ok djm, sort of ok stevesk
makes the pain stop in one easy step


# 1.14 25-Mar-2006 djm

standardise spacing in $OpenBSD$ tags; requested by deraadt@


# 1.13 20-Mar-2006 djm

GSSAPI related leaks detected by Coverity via elad AT netbsd.org;
reviewed by simon AT sxw.org.uk; deraadt@ ok


Revision tags: OPENBSD_3_9_BASE
# 1.12 13-Oct-2005 stevesk

branches: 1.12.2;
KNF; ok djm@


# 1.11 13-Oct-2005 stevesk

remove unneeded #includes; ok markus@


Revision tags: OPENBSD_3_8_BASE
# 1.10 17-Jul-2005 djm

branches: 1.10.2;
knf says that a 2nd level indent is four (not three or five) spaces


# 1.9 17-Jun-2005 djm

make this -Wsign-compare clean; ok avsm@ markus@


Revision tags: OPENBSD_3_6_BASE OPENBSD_3_7_BASE
# 1.8 21-Jun-2004 avsm

branches: 1.8.2; 1.8.4;
make ssh -Wshadow clean, no functional changes
markus@ ok


Revision tags: OPENBSD_3_5_BASE
# 1.7 21-Nov-2003 djm

branches: 1.7.2;
unexpand and delete whitespace at EOL; ok markus@


# 1.6 17-Nov-2003 markus

replace "gssapi" with "gssapi-with-mic"; from Simon Wilkinson; test + ok jakob.


# 1.5 02-Nov-2003 markus

remove support for SSH_BUG_GSSAPI_BER; simon@sxw.org.uk


# 1.4 21-Oct-2003 markus

make sure the doid is larger than 2


Revision tags: OPENBSD_3_4_BASE
# 1.3 01-Sep-2003 markus

branches: 1.3.2; 1.3.4; 1.3.6;
fix leak


# 1.2 24-Aug-2003 deraadt

64 bit cleanups; markus ok


# 1.1 22-Aug-2003 markus

support GSS API user authentication; patches from Simon Wilkinson,
stripped down and tested by Jakob and myself.


# 1.33 19-Dec-2021 djm

prepare for multiple names for authmethods

allow authentication methods to have one additional name beyond their
primary name.

allow lookup by this synonym

Use primary name for authentication decisions, e.g. for
PermitRootLogin=publickey

Pass actual invoked name to the authmethods, so they can tell whether they
were requested via the their primary name or synonym.

ok markus@


Revision tags: OPENBSD_6_9_BASE OPENBSD_7_0_BASE
# 1.32 27-Jan-2021 djm

this needs kex.h now


# 1.31 27-Jan-2021 djm

make ssh->kex->session_id a sshbuf instead of u_char*/size_t and
use that instead of global variables containing copies of it.
feedback/ok markus@


# 1.30 18-Oct-2020 djm

use the new variant log macros instead of prepending __func__ and
appending ssh_err(r) manually; ok markus@


Revision tags: OPENBSD_6_4_BASE OPENBSD_6_5_BASE OPENBSD_6_6_BASE OPENBSD_6_7_BASE OPENBSD_6_8_BASE
# 1.29 31-Jul-2018 djm

delay bailout for invalid authenticating user until after the packet
containing the request has been fully parsed. Reported by Dariusz Tytko
and Micha�� Sajdak; ok deraadt


# 1.28 10-Jul-2018 djm

kerberos/gssapi fixes for buffer removal


# 1.27 09-Jul-2018 markus

sshd: switch GSSAPI to sshbuf API; ok djm@


Revision tags: OPENBSD_6_2_BASE OPENBSD_6_3_BASE
# 1.26 24-Jun-2017 djm

refactor authentication logging

optionally record successful auth methods and public credentials
used in a file accessible to user sessions

feedback and ok markus@


# 1.25 30-May-2017 markus

switch auth2 to ssh_dispatch API; ok djm@


# 1.24 30-May-2017 markus

protocol handlers all get struct ssh passed; ok djm@


# 1.23 30-May-2017 markus

sshd: pass struct ssh to auth functions; ok djm@


Revision tags: OPENBSD_5_7_BASE OPENBSD_5_8_BASE OPENBSD_5_9_BASE OPENBSD_6_0_BASE OPENBSD_6_1_BASE
# 1.22 19-Jan-2015 markus

move dispatch to struct ssh; ok djm@


Revision tags: OPENBSD_5_5_BASE OPENBSD_5_6_BASE
# 1.21 26-Feb-2014 djm

bz#2107 - cache OIDs of supported GSSAPI mechanisms before privsep
sandboxing, as running this code in the sandbox can cause violations;
ok markus@


Revision tags: OPENBSD_5_4_BASE
# 1.20 17-May-2013 djm

bye, bye xfree(); ok markus@


# 1.19 05-Apr-2013 djm

hush some {unused, printf type} warnings


Revision tags: OPENBSD_5_3_BASE
# 1.18 02-Dec-2012 djm

Fixes logging of partial authentication when privsep is enabled
Previously, we recorded "Failed xxx" since we reset authenticated before
calling auth_log() in auth2.c. This adds an explcit "Partial" state.

Add a "submethod" to auth_log() to report which submethod is used
for keyboard-interactive.

Fix multiple authentication when one of the methods is
keyboard-interactive.

ok markus@


Revision tags: OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE
# 1.17 10-Mar-2011 djm

allow GSSAPI authentication to detect when a server-side failure causes
authentication failure and don't count such failures against MaxAuthTries;
bz#1244 from simon AT sxw.org.uk; ok markus@ before lock


Revision tags: OPENBSD_4_3_BASE OPENBSD_4_4_BASE OPENBSD_4_5_BASE OPENBSD_4_6_BASE OPENBSD_4_7_BASE OPENBSD_4_8_BASE OPENBSD_4_9_BASE
# 1.16 29-Oct-2007 dtucker

Allow build without -DGSSAPI; ok deraadt@


Revision tags: OPENBSD_4_0_BASE OPENBSD_4_1_BASE OPENBSD_4_2_BASE
# 1.15 03-Aug-2006 deraadt

almost entirely get rid of the culture of ".h files that include .h files"
ok djm, sort of ok stevesk
makes the pain stop in one easy step


# 1.14 25-Mar-2006 djm

standardise spacing in $OpenBSD$ tags; requested by deraadt@


# 1.13 20-Mar-2006 djm

GSSAPI related leaks detected by Coverity via elad AT netbsd.org;
reviewed by simon AT sxw.org.uk; deraadt@ ok


Revision tags: OPENBSD_3_9_BASE
# 1.12 13-Oct-2005 stevesk

branches: 1.12.2;
KNF; ok djm@


# 1.11 13-Oct-2005 stevesk

remove unneeded #includes; ok markus@


Revision tags: OPENBSD_3_8_BASE
# 1.10 17-Jul-2005 djm

branches: 1.10.2;
knf says that a 2nd level indent is four (not three or five) spaces


# 1.9 17-Jun-2005 djm

make this -Wsign-compare clean; ok avsm@ markus@


Revision tags: OPENBSD_3_6_BASE OPENBSD_3_7_BASE
# 1.8 21-Jun-2004 avsm

branches: 1.8.2; 1.8.4;
make ssh -Wshadow clean, no functional changes
markus@ ok


Revision tags: OPENBSD_3_5_BASE
# 1.7 21-Nov-2003 djm

branches: 1.7.2;
unexpand and delete whitespace at EOL; ok markus@


# 1.6 17-Nov-2003 markus

replace "gssapi" with "gssapi-with-mic"; from Simon Wilkinson; test + ok jakob.


# 1.5 02-Nov-2003 markus

remove support for SSH_BUG_GSSAPI_BER; simon@sxw.org.uk


# 1.4 21-Oct-2003 markus

make sure the doid is larger than 2


Revision tags: OPENBSD_3_4_BASE
# 1.3 01-Sep-2003 markus

branches: 1.3.2; 1.3.4; 1.3.6;
fix leak


# 1.2 24-Aug-2003 deraadt

64 bit cleanups; markus ok


# 1.1 22-Aug-2003 markus

support GSS API user authentication; patches from Simon Wilkinson,
stripped down and tested by Jakob and myself.


# 1.32 27-Jan-2021 djm

this needs kex.h now


# 1.31 27-Jan-2021 djm

make ssh->kex->session_id a sshbuf instead of u_char*/size_t and
use that instead of global variables containing copies of it.
feedback/ok markus@


# 1.30 18-Oct-2020 djm

use the new variant log macros instead of prepending __func__ and
appending ssh_err(r) manually; ok markus@


Revision tags: OPENBSD_6_4_BASE OPENBSD_6_5_BASE OPENBSD_6_6_BASE OPENBSD_6_7_BASE OPENBSD_6_8_BASE
# 1.29 31-Jul-2018 djm

delay bailout for invalid authenticating user until after the packet
containing the request has been fully parsed. Reported by Dariusz Tytko
and Micha�� Sajdak; ok deraadt


# 1.28 10-Jul-2018 djm

kerberos/gssapi fixes for buffer removal


# 1.27 09-Jul-2018 markus

sshd: switch GSSAPI to sshbuf API; ok djm@


Revision tags: OPENBSD_6_2_BASE OPENBSD_6_3_BASE
# 1.26 24-Jun-2017 djm

refactor authentication logging

optionally record successful auth methods and public credentials
used in a file accessible to user sessions

feedback and ok markus@


# 1.25 30-May-2017 markus

switch auth2 to ssh_dispatch API; ok djm@


# 1.24 30-May-2017 markus

protocol handlers all get struct ssh passed; ok djm@


# 1.23 30-May-2017 markus

sshd: pass struct ssh to auth functions; ok djm@


Revision tags: OPENBSD_5_7_BASE OPENBSD_5_8_BASE OPENBSD_5_9_BASE OPENBSD_6_0_BASE OPENBSD_6_1_BASE
# 1.22 19-Jan-2015 markus

move dispatch to struct ssh; ok djm@


Revision tags: OPENBSD_5_5_BASE OPENBSD_5_6_BASE
# 1.21 26-Feb-2014 djm

bz#2107 - cache OIDs of supported GSSAPI mechanisms before privsep
sandboxing, as running this code in the sandbox can cause violations;
ok markus@


Revision tags: OPENBSD_5_4_BASE
# 1.20 17-May-2013 djm

bye, bye xfree(); ok markus@


# 1.19 05-Apr-2013 djm

hush some {unused, printf type} warnings


Revision tags: OPENBSD_5_3_BASE
# 1.18 02-Dec-2012 djm

Fixes logging of partial authentication when privsep is enabled
Previously, we recorded "Failed xxx" since we reset authenticated before
calling auth_log() in auth2.c. This adds an explcit "Partial" state.

Add a "submethod" to auth_log() to report which submethod is used
for keyboard-interactive.

Fix multiple authentication when one of the methods is
keyboard-interactive.

ok markus@


Revision tags: OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE
# 1.17 10-Mar-2011 djm

allow GSSAPI authentication to detect when a server-side failure causes
authentication failure and don't count such failures against MaxAuthTries;
bz#1244 from simon AT sxw.org.uk; ok markus@ before lock


Revision tags: OPENBSD_4_3_BASE OPENBSD_4_4_BASE OPENBSD_4_5_BASE OPENBSD_4_6_BASE OPENBSD_4_7_BASE OPENBSD_4_8_BASE OPENBSD_4_9_BASE
# 1.16 29-Oct-2007 dtucker

Allow build without -DGSSAPI; ok deraadt@


Revision tags: OPENBSD_4_0_BASE OPENBSD_4_1_BASE OPENBSD_4_2_BASE
# 1.15 03-Aug-2006 deraadt

almost entirely get rid of the culture of ".h files that include .h files"
ok djm, sort of ok stevesk
makes the pain stop in one easy step


# 1.14 25-Mar-2006 djm

standardise spacing in $OpenBSD$ tags; requested by deraadt@


# 1.13 20-Mar-2006 djm

GSSAPI related leaks detected by Coverity via elad AT netbsd.org;
reviewed by simon AT sxw.org.uk; deraadt@ ok


Revision tags: OPENBSD_3_9_BASE
# 1.12 13-Oct-2005 stevesk

branches: 1.12.2;
KNF; ok djm@


# 1.11 13-Oct-2005 stevesk

remove unneeded #includes; ok markus@


Revision tags: OPENBSD_3_8_BASE
# 1.10 17-Jul-2005 djm

branches: 1.10.2;
knf says that a 2nd level indent is four (not three or five) spaces


# 1.9 17-Jun-2005 djm

make this -Wsign-compare clean; ok avsm@ markus@


Revision tags: OPENBSD_3_6_BASE OPENBSD_3_7_BASE
# 1.8 21-Jun-2004 avsm

branches: 1.8.2; 1.8.4;
make ssh -Wshadow clean, no functional changes
markus@ ok


Revision tags: OPENBSD_3_5_BASE
# 1.7 21-Nov-2003 djm

branches: 1.7.2;
unexpand and delete whitespace at EOL; ok markus@


# 1.6 17-Nov-2003 markus

replace "gssapi" with "gssapi-with-mic"; from Simon Wilkinson; test + ok jakob.


# 1.5 02-Nov-2003 markus

remove support for SSH_BUG_GSSAPI_BER; simon@sxw.org.uk


# 1.4 21-Oct-2003 markus

make sure the doid is larger than 2


Revision tags: OPENBSD_3_4_BASE
# 1.3 01-Sep-2003 markus

branches: 1.3.2; 1.3.4; 1.3.6;
fix leak


# 1.2 24-Aug-2003 deraadt

64 bit cleanups; markus ok


# 1.1 22-Aug-2003 markus

support GSS API user authentication; patches from Simon Wilkinson,
stripped down and tested by Jakob and myself.


# 1.30 18-Oct-2020 djm

use the new variant log macros instead of prepending __func__ and
appending ssh_err(r) manually; ok markus@


Revision tags: OPENBSD_6_4_BASE OPENBSD_6_5_BASE OPENBSD_6_6_BASE OPENBSD_6_7_BASE OPENBSD_6_8_BASE
# 1.29 31-Jul-2018 djm

delay bailout for invalid authenticating user until after the packet
containing the request has been fully parsed. Reported by Dariusz Tytko
and Micha�� Sajdak; ok deraadt


# 1.28 10-Jul-2018 djm

kerberos/gssapi fixes for buffer removal


# 1.27 09-Jul-2018 markus

sshd: switch GSSAPI to sshbuf API; ok djm@


Revision tags: OPENBSD_6_2_BASE OPENBSD_6_3_BASE
# 1.26 24-Jun-2017 djm

refactor authentication logging

optionally record successful auth methods and public credentials
used in a file accessible to user sessions

feedback and ok markus@


# 1.25 30-May-2017 markus

switch auth2 to ssh_dispatch API; ok djm@


# 1.24 30-May-2017 markus

protocol handlers all get struct ssh passed; ok djm@


# 1.23 30-May-2017 markus

sshd: pass struct ssh to auth functions; ok djm@


Revision tags: OPENBSD_5_7_BASE OPENBSD_5_8_BASE OPENBSD_5_9_BASE OPENBSD_6_0_BASE OPENBSD_6_1_BASE
# 1.22 19-Jan-2015 markus

move dispatch to struct ssh; ok djm@


Revision tags: OPENBSD_5_5_BASE OPENBSD_5_6_BASE
# 1.21 26-Feb-2014 djm

bz#2107 - cache OIDs of supported GSSAPI mechanisms before privsep
sandboxing, as running this code in the sandbox can cause violations;
ok markus@


Revision tags: OPENBSD_5_4_BASE
# 1.20 17-May-2013 djm

bye, bye xfree(); ok markus@


# 1.19 05-Apr-2013 djm

hush some {unused, printf type} warnings


Revision tags: OPENBSD_5_3_BASE
# 1.18 02-Dec-2012 djm

Fixes logging of partial authentication when privsep is enabled
Previously, we recorded "Failed xxx" since we reset authenticated before
calling auth_log() in auth2.c. This adds an explcit "Partial" state.

Add a "submethod" to auth_log() to report which submethod is used
for keyboard-interactive.

Fix multiple authentication when one of the methods is
keyboard-interactive.

ok markus@


Revision tags: OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE
# 1.17 10-Mar-2011 djm

allow GSSAPI authentication to detect when a server-side failure causes
authentication failure and don't count such failures against MaxAuthTries;
bz#1244 from simon AT sxw.org.uk; ok markus@ before lock


Revision tags: OPENBSD_4_3_BASE OPENBSD_4_4_BASE OPENBSD_4_5_BASE OPENBSD_4_6_BASE OPENBSD_4_7_BASE OPENBSD_4_8_BASE OPENBSD_4_9_BASE
# 1.16 29-Oct-2007 dtucker

Allow build without -DGSSAPI; ok deraadt@


Revision tags: OPENBSD_4_0_BASE OPENBSD_4_1_BASE OPENBSD_4_2_BASE
# 1.15 03-Aug-2006 deraadt

almost entirely get rid of the culture of ".h files that include .h files"
ok djm, sort of ok stevesk
makes the pain stop in one easy step


# 1.14 25-Mar-2006 djm

standardise spacing in $OpenBSD$ tags; requested by deraadt@


# 1.13 20-Mar-2006 djm

GSSAPI related leaks detected by Coverity via elad AT netbsd.org;
reviewed by simon AT sxw.org.uk; deraadt@ ok


Revision tags: OPENBSD_3_9_BASE
# 1.12 13-Oct-2005 stevesk

branches: 1.12.2;
KNF; ok djm@


# 1.11 13-Oct-2005 stevesk

remove unneeded #includes; ok markus@


Revision tags: OPENBSD_3_8_BASE
# 1.10 17-Jul-2005 djm

branches: 1.10.2;
knf says that a 2nd level indent is four (not three or five) spaces


# 1.9 17-Jun-2005 djm

make this -Wsign-compare clean; ok avsm@ markus@


Revision tags: OPENBSD_3_6_BASE OPENBSD_3_7_BASE
# 1.8 21-Jun-2004 avsm

branches: 1.8.2; 1.8.4;
make ssh -Wshadow clean, no functional changes
markus@ ok


Revision tags: OPENBSD_3_5_BASE
# 1.7 21-Nov-2003 djm

branches: 1.7.2;
unexpand and delete whitespace at EOL; ok markus@


# 1.6 17-Nov-2003 markus

replace "gssapi" with "gssapi-with-mic"; from Simon Wilkinson; test + ok jakob.


# 1.5 02-Nov-2003 markus

remove support for SSH_BUG_GSSAPI_BER; simon@sxw.org.uk


# 1.4 21-Oct-2003 markus

make sure the doid is larger than 2


Revision tags: OPENBSD_3_4_BASE
# 1.3 01-Sep-2003 markus

branches: 1.3.2; 1.3.4; 1.3.6;
fix leak


# 1.2 24-Aug-2003 deraadt

64 bit cleanups; markus ok


# 1.1 22-Aug-2003 markus

support GSS API user authentication; patches from Simon Wilkinson,
stripped down and tested by Jakob and myself.


# 1.29 31-Jul-2018 djm

delay bailout for invalid authenticating user until after the packet
containing the request has been fully parsed. Reported by Dariusz Tytko
and Micha�� Sajdak; ok deraadt


# 1.28 10-Jul-2018 djm

kerberos/gssapi fixes for buffer removal


# 1.27 09-Jul-2018 markus

sshd: switch GSSAPI to sshbuf API; ok djm@


Revision tags: OPENBSD_6_2_BASE OPENBSD_6_3_BASE
# 1.26 24-Jun-2017 djm

refactor authentication logging

optionally record successful auth methods and public credentials
used in a file accessible to user sessions

feedback and ok markus@


# 1.25 30-May-2017 markus

switch auth2 to ssh_dispatch API; ok djm@


# 1.24 30-May-2017 markus

protocol handlers all get struct ssh passed; ok djm@


# 1.23 30-May-2017 markus

sshd: pass struct ssh to auth functions; ok djm@


Revision tags: OPENBSD_5_7_BASE OPENBSD_5_8_BASE OPENBSD_5_9_BASE OPENBSD_6_0_BASE OPENBSD_6_1_BASE
# 1.22 19-Jan-2015 markus

move dispatch to struct ssh; ok djm@


Revision tags: OPENBSD_5_5_BASE OPENBSD_5_6_BASE
# 1.21 26-Feb-2014 djm

bz#2107 - cache OIDs of supported GSSAPI mechanisms before privsep
sandboxing, as running this code in the sandbox can cause violations;
ok markus@


Revision tags: OPENBSD_5_4_BASE
# 1.20 17-May-2013 djm

bye, bye xfree(); ok markus@


# 1.19 05-Apr-2013 djm

hush some {unused, printf type} warnings


Revision tags: OPENBSD_5_3_BASE
# 1.18 02-Dec-2012 djm

Fixes logging of partial authentication when privsep is enabled
Previously, we recorded "Failed xxx" since we reset authenticated before
calling auth_log() in auth2.c. This adds an explcit "Partial" state.

Add a "submethod" to auth_log() to report which submethod is used
for keyboard-interactive.

Fix multiple authentication when one of the methods is
keyboard-interactive.

ok markus@


Revision tags: OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE
# 1.17 10-Mar-2011 djm

allow GSSAPI authentication to detect when a server-side failure causes
authentication failure and don't count such failures against MaxAuthTries;
bz#1244 from simon AT sxw.org.uk; ok markus@ before lock


Revision tags: OPENBSD_4_3_BASE OPENBSD_4_4_BASE OPENBSD_4_5_BASE OPENBSD_4_6_BASE OPENBSD_4_7_BASE OPENBSD_4_8_BASE OPENBSD_4_9_BASE
# 1.16 29-Oct-2007 dtucker

Allow build without -DGSSAPI; ok deraadt@


Revision tags: OPENBSD_4_0_BASE OPENBSD_4_1_BASE OPENBSD_4_2_BASE
# 1.15 03-Aug-2006 deraadt

almost entirely get rid of the culture of ".h files that include .h files"
ok djm, sort of ok stevesk
makes the pain stop in one easy step


# 1.14 25-Mar-2006 djm

standardise spacing in $OpenBSD$ tags; requested by deraadt@


# 1.13 20-Mar-2006 djm

GSSAPI related leaks detected by Coverity via elad AT netbsd.org;
reviewed by simon AT sxw.org.uk; deraadt@ ok


Revision tags: OPENBSD_3_9_BASE
# 1.12 13-Oct-2005 stevesk

branches: 1.12.2;
KNF; ok djm@


# 1.11 13-Oct-2005 stevesk

remove unneeded #includes; ok markus@


Revision tags: OPENBSD_3_8_BASE
# 1.10 17-Jul-2005 djm

branches: 1.10.2;
knf says that a 2nd level indent is four (not three or five) spaces


# 1.9 17-Jun-2005 djm

make this -Wsign-compare clean; ok avsm@ markus@


Revision tags: OPENBSD_3_6_BASE OPENBSD_3_7_BASE
# 1.8 21-Jun-2004 avsm

branches: 1.8.2; 1.8.4;
make ssh -Wshadow clean, no functional changes
markus@ ok


Revision tags: OPENBSD_3_5_BASE
# 1.7 21-Nov-2003 djm

branches: 1.7.2;
unexpand and delete whitespace at EOL; ok markus@


# 1.6 17-Nov-2003 markus

replace "gssapi" with "gssapi-with-mic"; from Simon Wilkinson; test + ok jakob.


# 1.5 02-Nov-2003 markus

remove support for SSH_BUG_GSSAPI_BER; simon@sxw.org.uk


# 1.4 21-Oct-2003 markus

make sure the doid is larger than 2


Revision tags: OPENBSD_3_4_BASE
# 1.3 01-Sep-2003 markus

branches: 1.3.2; 1.3.4; 1.3.6;
fix leak


# 1.2 24-Aug-2003 deraadt

64 bit cleanups; markus ok


# 1.1 22-Aug-2003 markus

support GSS API user authentication; patches from Simon Wilkinson,
stripped down and tested by Jakob and myself.


# 1.28 10-Jul-2018 djm

kerberos/gssapi fixes for buffer removal


# 1.27 09-Jul-2018 markus

sshd: switch GSSAPI to sshbuf API; ok djm@


Revision tags: OPENBSD_6_2_BASE OPENBSD_6_3_BASE
# 1.26 24-Jun-2017 djm

refactor authentication logging

optionally record successful auth methods and public credentials
used in a file accessible to user sessions

feedback and ok markus@


# 1.25 30-May-2017 markus

switch auth2 to ssh_dispatch API; ok djm@


# 1.24 30-May-2017 markus

protocol handlers all get struct ssh passed; ok djm@


# 1.23 30-May-2017 markus

sshd: pass struct ssh to auth functions; ok djm@


Revision tags: OPENBSD_5_7_BASE OPENBSD_5_8_BASE OPENBSD_5_9_BASE OPENBSD_6_0_BASE OPENBSD_6_1_BASE
# 1.22 19-Jan-2015 markus

move dispatch to struct ssh; ok djm@


Revision tags: OPENBSD_5_5_BASE OPENBSD_5_6_BASE
# 1.21 26-Feb-2014 djm

bz#2107 - cache OIDs of supported GSSAPI mechanisms before privsep
sandboxing, as running this code in the sandbox can cause violations;
ok markus@


Revision tags: OPENBSD_5_4_BASE
# 1.20 17-May-2013 djm

bye, bye xfree(); ok markus@


# 1.19 05-Apr-2013 djm

hush some {unused, printf type} warnings


Revision tags: OPENBSD_5_3_BASE
# 1.18 02-Dec-2012 djm

Fixes logging of partial authentication when privsep is enabled
Previously, we recorded "Failed xxx" since we reset authenticated before
calling auth_log() in auth2.c. This adds an explcit "Partial" state.

Add a "submethod" to auth_log() to report which submethod is used
for keyboard-interactive.

Fix multiple authentication when one of the methods is
keyboard-interactive.

ok markus@


Revision tags: OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE
# 1.17 10-Mar-2011 djm

allow GSSAPI authentication to detect when a server-side failure causes
authentication failure and don't count such failures against MaxAuthTries;
bz#1244 from simon AT sxw.org.uk; ok markus@ before lock


Revision tags: OPENBSD_4_3_BASE OPENBSD_4_4_BASE OPENBSD_4_5_BASE OPENBSD_4_6_BASE OPENBSD_4_7_BASE OPENBSD_4_8_BASE OPENBSD_4_9_BASE
# 1.16 29-Oct-2007 dtucker

Allow build without -DGSSAPI; ok deraadt@


Revision tags: OPENBSD_4_0_BASE OPENBSD_4_1_BASE OPENBSD_4_2_BASE
# 1.15 03-Aug-2006 deraadt

almost entirely get rid of the culture of ".h files that include .h files"
ok djm, sort of ok stevesk
makes the pain stop in one easy step


# 1.14 25-Mar-2006 djm

standardise spacing in $OpenBSD$ tags; requested by deraadt@


# 1.13 20-Mar-2006 djm

GSSAPI related leaks detected by Coverity via elad AT netbsd.org;
reviewed by simon AT sxw.org.uk; deraadt@ ok


Revision tags: OPENBSD_3_9_BASE
# 1.12 13-Oct-2005 stevesk

branches: 1.12.2;
KNF; ok djm@


# 1.11 13-Oct-2005 stevesk

remove unneeded #includes; ok markus@


Revision tags: OPENBSD_3_8_BASE
# 1.10 17-Jul-2005 djm

branches: 1.10.2;
knf says that a 2nd level indent is four (not three or five) spaces


# 1.9 17-Jun-2005 djm

make this -Wsign-compare clean; ok avsm@ markus@


Revision tags: OPENBSD_3_6_BASE OPENBSD_3_7_BASE
# 1.8 21-Jun-2004 avsm

branches: 1.8.2; 1.8.4;
make ssh -Wshadow clean, no functional changes
markus@ ok


Revision tags: OPENBSD_3_5_BASE
# 1.7 21-Nov-2003 djm

branches: 1.7.2;
unexpand and delete whitespace at EOL; ok markus@


# 1.6 17-Nov-2003 markus

replace "gssapi" with "gssapi-with-mic"; from Simon Wilkinson; test + ok jakob.


# 1.5 02-Nov-2003 markus

remove support for SSH_BUG_GSSAPI_BER; simon@sxw.org.uk


# 1.4 21-Oct-2003 markus

make sure the doid is larger than 2


Revision tags: OPENBSD_3_4_BASE
# 1.3 01-Sep-2003 markus

branches: 1.3.2; 1.3.4; 1.3.6;
fix leak


# 1.2 24-Aug-2003 deraadt

64 bit cleanups; markus ok


# 1.1 22-Aug-2003 markus

support GSS API user authentication; patches from Simon Wilkinson,
stripped down and tested by Jakob and myself.


Revision tags: OPENBSD_6_2_BASE
# 1.26 24-Jun-2017 djm

refactor authentication logging

optionally record successful auth methods and public credentials
used in a file accessible to user sessions

feedback and ok markus@


# 1.25 30-May-2017 markus

switch auth2 to ssh_dispatch API; ok djm@


# 1.24 30-May-2017 markus

protocol handlers all get struct ssh passed; ok djm@


# 1.23 30-May-2017 markus

sshd: pass struct ssh to auth functions; ok djm@


Revision tags: OPENBSD_5_7_BASE OPENBSD_5_8_BASE OPENBSD_5_9_BASE OPENBSD_6_0_BASE OPENBSD_6_1_BASE
# 1.22 19-Jan-2015 markus

move dispatch to struct ssh; ok djm@


Revision tags: OPENBSD_5_5_BASE OPENBSD_5_6_BASE
# 1.21 26-Feb-2014 djm

bz#2107 - cache OIDs of supported GSSAPI mechanisms before privsep
sandboxing, as running this code in the sandbox can cause violations;
ok markus@


Revision tags: OPENBSD_5_4_BASE
# 1.20 17-May-2013 djm

bye, bye xfree(); ok markus@


# 1.19 05-Apr-2013 djm

hush some {unused, printf type} warnings


Revision tags: OPENBSD_5_3_BASE
# 1.18 02-Dec-2012 djm

Fixes logging of partial authentication when privsep is enabled
Previously, we recorded "Failed xxx" since we reset authenticated before
calling auth_log() in auth2.c. This adds an explcit "Partial" state.

Add a "submethod" to auth_log() to report which submethod is used
for keyboard-interactive.

Fix multiple authentication when one of the methods is
keyboard-interactive.

ok markus@


Revision tags: OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE
# 1.17 10-Mar-2011 djm

allow GSSAPI authentication to detect when a server-side failure causes
authentication failure and don't count such failures against MaxAuthTries;
bz#1244 from simon AT sxw.org.uk; ok markus@ before lock


Revision tags: OPENBSD_4_3_BASE OPENBSD_4_4_BASE OPENBSD_4_5_BASE OPENBSD_4_6_BASE OPENBSD_4_7_BASE OPENBSD_4_8_BASE OPENBSD_4_9_BASE
# 1.16 29-Oct-2007 dtucker

Allow build without -DGSSAPI; ok deraadt@


Revision tags: OPENBSD_4_0_BASE OPENBSD_4_1_BASE OPENBSD_4_2_BASE
# 1.15 03-Aug-2006 deraadt

almost entirely get rid of the culture of ".h files that include .h files"
ok djm, sort of ok stevesk
makes the pain stop in one easy step


# 1.14 25-Mar-2006 djm

standardise spacing in $OpenBSD$ tags; requested by deraadt@


# 1.13 20-Mar-2006 djm

GSSAPI related leaks detected by Coverity via elad AT netbsd.org;
reviewed by simon AT sxw.org.uk; deraadt@ ok


Revision tags: OPENBSD_3_9_BASE
# 1.12 13-Oct-2005 stevesk

branches: 1.12.2;
KNF; ok djm@


# 1.11 13-Oct-2005 stevesk

remove unneeded #includes; ok markus@


Revision tags: OPENBSD_3_8_BASE
# 1.10 17-Jul-2005 djm

branches: 1.10.2;
knf says that a 2nd level indent is four (not three or five) spaces


# 1.9 17-Jun-2005 djm

make this -Wsign-compare clean; ok avsm@ markus@


Revision tags: OPENBSD_3_6_BASE OPENBSD_3_7_BASE
# 1.8 21-Jun-2004 avsm

branches: 1.8.2; 1.8.4;
make ssh -Wshadow clean, no functional changes
markus@ ok


Revision tags: OPENBSD_3_5_BASE
# 1.7 21-Nov-2003 djm

branches: 1.7.2;
unexpand and delete whitespace at EOL; ok markus@


# 1.6 17-Nov-2003 markus

replace "gssapi" with "gssapi-with-mic"; from Simon Wilkinson; test + ok jakob.


# 1.5 02-Nov-2003 markus

remove support for SSH_BUG_GSSAPI_BER; simon@sxw.org.uk


# 1.4 21-Oct-2003 markus

make sure the doid is larger than 2


Revision tags: OPENBSD_3_4_BASE
# 1.3 01-Sep-2003 markus

branches: 1.3.2; 1.3.4; 1.3.6;
fix leak


# 1.2 24-Aug-2003 deraadt

64 bit cleanups; markus ok


# 1.1 22-Aug-2003 markus

support GSS API user authentication; patches from Simon Wilkinson,
stripped down and tested by Jakob and myself.