]> git.ipfire.org Git - thirdparty/openssh-portable.git/commitdiff
upstream commit V_7_0 anongit/V_7_0 github-selfhosted/V_7_0 github/V_7_0 V_7_0_P1
authorderaadt@openbsd.org <deraadt@openbsd.org>
Thu, 6 Aug 2015 14:53:21 +0000 (14:53 +0000)
committerDamien Miller <djm@mindrot.org>
Tue, 11 Aug 2015 08:57:29 +0000 (18:57 +1000)
add prohibit-password as a synonymn for without-password,
 since the without-password is causing too many questions.  Harden it to ban
 all but pubkey, hostbased, and GSSAPI auth (when the latter is enabled) from
 djm, ok markus

Upstream-ID: d53317d7b28942153e6236d3fd6e12ceb482db7a

auth.c
servconf.c
sshd_config
sshd_config.5

diff --git a/auth.c b/auth.c
index e6c094d1f16df9347880576d2ff4ef5995c461bd..fc32f6c4bbc92e294386513ca268c06de6e6bda9 100644 (file)
--- a/auth.c
+++ b/auth.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: auth.c,v 1.111 2015/05/01 04:17:51 djm Exp $ */
+/* $OpenBSD: auth.c,v 1.112 2015/08/06 14:53:21 deraadt Exp $ */
 /*
  * Copyright (c) 2000 Markus Friedl.  All rights reserved.
  *
@@ -352,7 +352,9 @@ auth_root_allowed(const char *method)
        case PERMIT_YES:
                return 1;
        case PERMIT_NO_PASSWD:
-               if (strcmp(method, "password") != 0)
+               if (strcmp(method, "publickey") == 0 ||
+                   strcmp(method, "hostbased") == 0 ||
+                   strcmp(method, "gssapi-with-mic"))
                        return 1;
                break;
        case PERMIT_FORCED_ONLY:
index f06e1748f94fbd08230a6619fe50a29b3a683f50..6c7a91e6b22fe15e5b379e91264e3f04c4124f57 100644 (file)
@@ -1,5 +1,5 @@
 
-/* $OpenBSD: servconf.c,v 1.279 2015/07/31 15:38:09 chris Exp $ */
+/* $OpenBSD: servconf.c,v 1.280 2015/08/06 14:53:21 deraadt Exp $ */
 /*
  * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
  *                    All rights reserved
@@ -916,6 +916,7 @@ static const struct multistate multistate_addressfamily[] = {
 };
 static const struct multistate multistate_permitrootlogin[] = {
        { "without-password",           PERMIT_NO_PASSWD },
+       { "prohibit-password",          PERMIT_NO_PASSWD },
        { "forced-commands-only",       PERMIT_FORCED_ONLY },
        { "yes",                        PERMIT_YES },
        { "no",                         PERMIT_NO },
index 46df1622f409c59b259bd35206ebb6777729dee3..4d77f05aa2dd2e4eaa232127d7f8c59331699ec3 100644 (file)
@@ -1,4 +1,4 @@
-#      $OpenBSD: sshd_config,v 1.96 2015/07/30 19:23:02 deraadt Exp $
+#      $OpenBSD: sshd_config,v 1.97 2015/08/06 14:53:21 deraadt Exp $
 
 # This is the sshd server system-wide configuration file.  See
 # sshd_config(5) for more information.
@@ -41,7 +41,7 @@
 # Authentication:
 
 #LoginGraceTime 2m
-#PermitRootLogin without-password
+#PermitRootLogin prohibit-password
 #StrictModes yes
 #MaxAuthTries 6
 #MaxSessions 10
index 6eec1f668954fa11f16439cf56809475849bfb0d..58e277f958f6ffb4d74af3c92f0bdc9da05425ac 100644 (file)
@@ -33,8 +33,8 @@
 .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 .\"
-.\" $OpenBSD: sshd_config.5,v 1.209 2015/07/30 19:23:02 deraadt Exp $
-.Dd $Mdocdate: July 30 2015 $
+.\" $OpenBSD: sshd_config.5,v 1.210 2015/08/06 14:53:21 deraadt Exp $
+.Dd $Mdocdate: August 6 2015 $
 .Dt SSHD_CONFIG 5
 .Os
 .Sh NAME
@@ -1204,16 +1204,19 @@ Specifies whether root can log in using
 .Xr ssh 1 .
 The argument must be
 .Dq yes ,
+.Dq prohibit-password ,
 .Dq without-password ,
 .Dq forced-commands-only ,
 or
 .Dq no .
 The default is
-.Dq without-password .
+.Dq prohibit-password .
 .Pp
 If this option is set to
+.Dq prohibit-password
+or
 .Dq without-password ,
-password authentication is disabled for root.
+password and keyboard-interactive authentication are disabled for root.
 .Pp
 If this option is set to
 .Dq forced-commands-only ,