1 --- hpn-ssh-hpn-18.4.2/pathnames.h.orig
2 +++ hpn-ssh-hpn-18.4.2/pathnames.h
4 #define _PATH_HOST_XMSS_KEY_FILE SSHDIR "/ssh_host_xmss_key"
5 #define _PATH_HOST_RSA_KEY_FILE SSHDIR "/ssh_host_rsa_key"
6 #define _PATH_DH_MODULI SSHDIR "/moduli"
7 +#define _PATH_DEFAULT_LOGIN ETCDIR "/default/login"
9 #ifndef _PATH_SSH_PROGRAM
10 #define _PATH_SSH_PROGRAM "/usr/bin/hpnssh"
11 --- hpn-ssh-hpn-18.4.2/servconf.c.orig
12 +++ hpn-ssh-hpn-18.4.2/servconf.c
22 return o == NULL || strcasecmp(o, "none") == 0;
26 + * Reads /etc/default/login and defaults several ServerOptions:
29 + * PermitEmptyPasswords
32 + * CONSOLE=* -> PermitRootLogin=without-password
33 + * #CONSOLE=* -> PermitRootLogin=yes
35 + * PASSREQ=YES -> PermitEmptyPasswords=no
36 + * PASSREQ=NO -> PermitEmptyPasswords=yes
37 + * #PASSREQ=* -> PermitEmptyPasswords=no
39 + * TIMEOUT=<secs> -> LoginGraceTime=<secs>
40 + * #TIMEOUT=<secs> -> LoginGraceTime=300
43 +deflt_fill_default_server_options(ServerOptions *options)
48 + if (defopen(_PATH_DEFAULT_LOGIN))
52 + flags = defcntl(DC_GETFLAGS, 0);
53 + TURNOFF(flags, DC_CASE);
54 + (void) defcntl(DC_SETFLAGS, flags);
56 + if (options->permit_root_login == PERMIT_NOT_SET &&
57 + (ptr = defread("CONSOLE=")) != NULL)
58 + options->permit_root_login = PERMIT_NO_PASSWD;
60 + if (options->permit_empty_passwd == -1 &&
61 + (ptr = defread("PASSREQ=")) != NULL) {
62 + if (strcasecmp("YES", ptr) == 0)
63 + options->permit_empty_passwd = 0;
64 + else if (strcasecmp("NO", ptr) == 0)
65 + options->permit_empty_passwd = 1;
68 + if (options->max_authtries == -1 &&
69 + (ptr = defread("RETRIES=")) != NULL) {
70 + options->max_authtries = atoi(ptr);
73 + if (options->login_grace_time == -1) {
74 + if ((ptr = defread("TIMEOUT=")) != NULL)
75 + options->login_grace_time = (unsigned)atoi(ptr);
77 + options->login_grace_time = 300;
80 + (void) defopen((char *)NULL);
84 assemble_algorithms(ServerOptions *o)
90 + deflt_fill_default_server_options(options);
92 /* Standard Options */
93 if (options->num_host_key_files == 0) {
94 /* fill default hostkeys for protocols */
95 --- hpn-ssh-hpn-18.4.2/hpnsshd_config.5.orig
96 +++ hpn-ssh-hpn-18.4.2/hpnsshd_config.5
97 @@ -1349,7 +1349,14 @@
99 Once the number of failures reaches half this value,
100 additional failures are logged.
102 +The default is 6, or the value given by
105 +.Pa /etc/default/login ,
111 Specifies the maximum number of open shell, login or subsystem (e.g. sftp)
112 sessions permitted per network connection.
113 @@ -1437,7 +1444,14 @@
114 When password authentication is allowed, it specifies whether the
115 server allows login to accounts with empty password strings.
122 +.Pa /etc/default/login
127 Specifies the addresses/ports on which a remote TCP port forwarding may listen.
128 The listen specification must be one of the following forms: