chore(net-misc/openssh): move to portage-stable

This commit is contained in:
Brandon Philips 2013-02-16 10:07:11 -08:00
parent 3e772fb37e
commit 1b174f51da
24 changed files with 0 additions and 1195 deletions

View File

@ -1,6 +0,0 @@
DIST openssh-5.2p1+x509-6.2.1.diff.gz 153887 RMD160 3642946adfc122f28fb80518719040dddacf84ea SHA1 e48447e4335c543f4b702b3e3d0e41d6d9f7f6aa SHA256 9a745634eaf450fb2c0f9dcc31f3021dcd70d6bbdba0ae5b6952f2dfcb21ee55
DIST openssh-5.2p1-gsskex-all-20090726.patch 90959 RMD160 45763e73aa65181d56aafed9ab7dd217150769f2 SHA1 64058c69fb866a8ab0233d454f3bb8e94a0b9db7 SHA256 6eb297d6fa74be3323c5e4f53df5b6e1f4edf6bf394e3e707c075846886e18e7
DIST openssh-5.2p1-hpn13v6.diff.gz 33540 RMD160 d647d3b0547e4d698c616f5ed6643b3ddbcced95 SHA1 9683d5feb3f7e302ef836901af5366df6c425815 SHA256 90a395037a826a8ebcff68be8e46ddce1f89fd776c312c0e10e73cb703ed21bd
DIST openssh-5.2p1.tar.gz 1016612 RMD160 7c53f342034b16e9faa9f5a09ef46390420722eb SHA1 8273a0237db98179fbdc412207ff8eb14ff3d6de SHA256 4023710c37d0b3d79e6299cb79b6de2a31db7d581fe59e775a5351784034ecae
DIST openssh-5.2pkcs11-0.26.tar.bz2 18642 RMD160 07093fb2ad47247b2f028fae4fe1b80edf4ddaf8 SHA1 755793398e1b04ee6c15458a69ce4ad68d2abee0 SHA256 9655f118c614f76cfdd3164b5c0e3e430f20a4ce16c65df0dc1b594648cf1c07
DIST openssh-lpk-5.2p1-0.3.11.patch.gz 18116 RMD160 2ff9bdff19e0854a96063be1e0589fa3f85da0d7 SHA1 33b36cf94f68a80fca497da110529ce69d62fbb0 SHA256 450b56a989767aa65a974213e8f7e9d0ee9d08522247db7b787730e53685bebd

View File

@ -1,130 +0,0 @@
http://bugs.gentoo.org/43593
http://bugzilla.mindrot.org/show_bug.cgi?id=608
Index: scard-opensc.c
===================================================================
RCS file: /cvs/openssh/scard-opensc.c,v
retrieving revision 1.12
--- scard-opensc.c
+++ scard-opensc.c
@@ -38,6 +38,8 @@
#include "readpass.h"
#include "scard.h"
+int ask_for_pin=0;
+
#if OPENSSL_VERSION_NUMBER < 0x00907000L && defined(CRYPTO_LOCK_ENGINE)
#define USE_ENGINE
#define RSA_get_default_method RSA_get_default_openssl_method
@@ -119,6 +121,7 @@
struct sc_pkcs15_prkey_info *key;
struct sc_pkcs15_object *pin_obj;
struct sc_pkcs15_pin_info *pin;
+ char *passphrase = NULL;
priv = (struct sc_priv_data *) RSA_get_app_data(rsa);
if (priv == NULL)
@@ -156,24 +159,47 @@
goto err;
}
pin = pin_obj->data;
+
+ if (sc_pin)
+ passphrase = sc_pin;
+ else if (ask_for_pin) {
+ /* we need a pin but don't have one => ask for the pin */
+ char prompt[64];
+
+ snprintf(prompt, sizeof(prompt), "Enter PIN for %s: ",
+ key_obj->label ? key_obj->label : "smartcard key");
+ passphrase = read_passphrase(prompt, 0);
+ if (!passphrase || !strcmp(passphrase, ""))
+ goto err;
+ } else
+ /* no pin => error */
+ goto err;
+
r = sc_lock(card);
if (r) {
error("Unable to lock smartcard: %s", sc_strerror(r));
goto err;
}
- if (sc_pin != NULL) {
- r = sc_pkcs15_verify_pin(p15card, pin, sc_pin,
- strlen(sc_pin));
- if (r) {
- sc_unlock(card);
- error("PIN code verification failed: %s",
- sc_strerror(r));
- goto err;
- }
+ r = sc_pkcs15_verify_pin(p15card, pin, passphrase,
+ strlen(passphrase));
+ if (r) {
+ sc_unlock(card);
+ error("PIN code verification failed: %s",
+ sc_strerror(r));
+ goto err;
}
+
*key_obj_out = key_obj;
+ if (!sc_pin) {
+ memset(passphrase, 0, strlen(passphrase));
+ xfree(passphrase);
+ }
return 0;
err:
+ if (!sc_pin && passphrase) {
+ memset(passphrase, 0, strlen(passphrase));
+ xfree(passphrase);
+ }
sc_close();
return -1;
}
Index: scard.c
===================================================================
RCS file: /cvs/openssh/scard.c,v
retrieving revision 1.27
--- scard.c
+++ scard.c
@@ -35,6 +35,9 @@
#include "readpass.h"
#include "scard.h"
+/* currently unused */
+int ask_for_pin = 0;
+
#if OPENSSL_VERSION_NUMBER < 0x00907000L
#define USE_ENGINE
#define RSA_get_default_method RSA_get_default_openssl_method
Index: scard.h
===================================================================
RCS file: /cvs/openssh/scard.h,v
retrieving revision 1.10
--- scard.h
+++ scard.h
@@ -33,6 +33,8 @@
#define SCARD_ERROR_NOCARD -2
#define SCARD_ERROR_APPLET -3
+extern int ask_for_pin;
+
Key **sc_get_keys(const char *, const char *);
void sc_close(void);
int sc_put_key(Key *, const char *);
Index: ssh.c
===================================================================
RCS file: /cvs/openssh/ssh.c,v
retrieving revision 1.180
--- ssh.c
+++ ssh.c
@@ -1155,6 +1155,9 @@
#ifdef SMARTCARD
Key **keys;
+ if (!options.batch_mode)
+ ask_for_pin = 1;
+
if (options.smartcard_device != NULL &&
options.num_identity_files < SSH_MAX_IDENTITY_FILES &&
(keys = sc_get_keys(options.smartcard_device, NULL)) != NULL ) {

View File

@ -1,54 +0,0 @@
allow ldap and hpn patches to play nice
--- servconf.c
+++ servconf.c
@@ -116,24 +116,6 @@
options->num_allow_groups = 0;
options->num_deny_groups = 0;
options->ciphers = NULL;
- options->macs = NULL;
- options->protocol = SSH_PROTO_UNKNOWN;
- options->gateway_ports = -1;
- options->num_subsystems = 0;
- options->max_startups_begin = -1;
- options->max_startups_rate = -1;
- options->max_startups = -1;
- options->max_authtries = -1;
- options->banner = NULL;
- options->use_dns = -1;
- options->client_alive_interval = -1;
- options->client_alive_count_max = -1;
- options->authorized_keys_file = NULL;
- options->authorized_keys_file2 = NULL;
- options->num_accept_env = 0;
- options->permit_tun = -1;
- options->num_permitted_opens = -1;
- options->adm_forced_command = NULL;
#ifdef WITH_LDAP_PUBKEY
/* XXX dirty */
options->lpk.ld = NULL;
@@ -152,6 +134,24 @@
options->lpk.flags = FLAG_EMPTY;
#endif
+ options->macs = NULL;
+ options->protocol = SSH_PROTO_UNKNOWN;
+ options->gateway_ports = -1;
+ options->num_subsystems = 0;
+ options->max_startups_begin = -1;
+ options->max_startups_rate = -1;
+ options->max_startups = -1;
+ options->max_authtries = -1;
+ options->banner = NULL;
+ options->use_dns = -1;
+ options->client_alive_interval = -1;
+ options->client_alive_count_max = -1;
+ options->authorized_keys_file = NULL;
+ options->authorized_keys_file2 = NULL;
+ options->num_accept_env = 0;
+ options->permit_tun = -1;
+ options->num_permitted_opens = -1;
+ options->adm_forced_command = NULL;
}
void

View File

@ -1,127 +0,0 @@
http://bugs.gentoo.org/165444
https://bugzilla.mindrot.org/show_bug.cgi?id=1008
Index: readconf.c
===================================================================
RCS file: /cvs/openssh/readconf.c,v
retrieving revision 1.135
diff -u -r1.135 readconf.c
--- readconf.c 5 Aug 2006 02:39:40 -0000 1.135
+++ readconf.c 19 Aug 2006 11:59:52 -0000
@@ -126,6 +126,7 @@
oClearAllForwardings, oNoHostAuthenticationForLocalhost,
oEnableSSHKeysign, oRekeyLimit, oVerifyHostKeyDNS, oConnectTimeout,
oAddressFamily, oGssAuthentication, oGssDelegateCreds,
+ oGssTrustDns,
oServerAliveInterval, oServerAliveCountMax, oIdentitiesOnly,
oSendEnv, oControlPath, oControlMaster, oHashKnownHosts,
oTunnel, oTunnelDevice, oLocalCommand, oPermitLocalCommand,
@@ -163,9 +164,11 @@
#if defined(GSSAPI)
{ "gssapiauthentication", oGssAuthentication },
{ "gssapidelegatecredentials", oGssDelegateCreds },
+ { "gssapitrustdns", oGssTrustDns },
#else
{ "gssapiauthentication", oUnsupported },
{ "gssapidelegatecredentials", oUnsupported },
+ { "gssapitrustdns", oUnsupported },
#endif
{ "fallbacktorsh", oDeprecated },
{ "usersh", oDeprecated },
@@ -444,6 +447,10 @@
intptr = &options->gss_deleg_creds;
goto parse_flag;
+ case oGssTrustDns:
+ intptr = &options->gss_trust_dns;
+ goto parse_flag;
+
case oBatchMode:
intptr = &options->batch_mode;
goto parse_flag;
@@ -1010,6 +1017,7 @@
options->challenge_response_authentication = -1;
options->gss_authentication = -1;
options->gss_deleg_creds = -1;
+ options->gss_trust_dns = -1;
options->password_authentication = -1;
options->kbd_interactive_authentication = -1;
options->kbd_interactive_devices = NULL;
@@ -1100,6 +1108,8 @@
options->gss_authentication = 0;
if (options->gss_deleg_creds == -1)
options->gss_deleg_creds = 0;
+ if (options->gss_trust_dns == -1)
+ options->gss_trust_dns = 0;
if (options->password_authentication == -1)
options->password_authentication = 1;
if (options->kbd_interactive_authentication == -1)
Index: readconf.h
===================================================================
RCS file: /cvs/openssh/readconf.h,v
retrieving revision 1.63
diff -u -r1.63 readconf.h
--- readconf.h 5 Aug 2006 02:39:40 -0000 1.63
+++ readconf.h 19 Aug 2006 11:59:52 -0000
@@ -45,6 +45,7 @@
/* Try S/Key or TIS, authentication. */
int gss_authentication; /* Try GSS authentication */
int gss_deleg_creds; /* Delegate GSS credentials */
+ int gss_trust_dns; /* Trust DNS for GSS canonicalization */
int password_authentication; /* Try password
* authentication. */
int kbd_interactive_authentication; /* Try keyboard-interactive auth. */
Index: ssh_config.5
===================================================================
RCS file: /cvs/openssh/ssh_config.5,v
retrieving revision 1.97
diff -u -r1.97 ssh_config.5
--- ssh_config.5 5 Aug 2006 01:34:51 -0000 1.97
+++ ssh_config.5 19 Aug 2006 11:59:53 -0000
@@ -483,7 +483,16 @@
Forward (delegate) credentials to the server.
The default is
.Dq no .
-Note that this option applies to protocol version 2 only.
+Note that this option applies to protocol version 2 connections using GSSAPI.
+.It Cm GSSAPITrustDns
+Set to
+.Dq yes to indicate that the DNS is trusted to securely canonicalize
+the name of the host being connected to. If
+.Dq no, the hostname entered on the
+command line will be passed untouched to the GSSAPI library.
+The default is
+.Dq no .
+This option only applies to protocol version 2 connections using GSSAPI.
.It Cm HashKnownHosts
Indicates that
.Xr ssh 1
Index: sshconnect2.c
===================================================================
RCS file: /cvs/openssh/sshconnect2.c,v
retrieving revision 1.151
diff -u -r1.151 sshconnect2.c
--- sshconnect2.c 18 Aug 2006 14:33:34 -0000 1.151
+++ sshconnect2.c 19 Aug 2006 11:59:53 -0000
@@ -499,6 +499,12 @@
static u_int mech = 0;
OM_uint32 min;
int ok = 0;
+ const char *gss_host;
+
+ if (options.gss_trust_dns)
+ gss_host = get_canonical_hostname(1);
+ else
+ gss_host = authctxt->host;
/* Try one GSSAPI method at a time, rather than sending them all at
* once. */
@@ -511,7 +517,7 @@
/* My DER encoding requires length<128 */
if (gss_supported->elements[mech].length < 128 &&
ssh_gssapi_check_mechanism(&gssctxt,
- &gss_supported->elements[mech], authctxt->host)) {
+ &gss_supported->elements[mech], gss_host)) {
ok = 1; /* Mechanism works */
} else {
mech++;

View File

@ -1,11 +0,0 @@
diff -purN openssh-4.7p1.orig/configure.ac openssh-4.7p1/configure.ac
--- openssh-4.7p1.orig/configure.ac 2007-08-10 00:36:12.000000000 -0400
+++ openssh-4.7p1/configure.ac 2008-03-31 19:38:54.548935620 -0400
@@ -3211,6 +3211,7 @@ AC_ARG_WITH(selinux,
AC_CHECK_LIB(selinux, setexeccon, [ LIBSELINUX="-lselinux" ],
AC_MSG_ERROR(SELinux support requires libselinux library))
SSHDLIBS="$SSHDLIBS $LIBSELINUX"
+ LIBS="$LIBS $LIBSELINUX"
AC_CHECK_FUNCS(getseuserbyname get_default_context_with_level)
LIBS="$save_LIBS"
fi ]

View File

@ -1,91 +0,0 @@
move things around so hpn applies cleanly when using X509
--- servconf.c
+++ servconf.c
@@ -106,6 +106,17 @@
options->log_level = SYSLOG_LEVEL_NOT_SET;
options->rhosts_rsa_authentication = -1;
options->hostbased_authentication = -1;
+ options->hostbased_algorithms = NULL;
+ options->pubkey_algorithms = NULL;
+ ssh_x509flags_initialize(&options->x509flags, 1);
+#ifndef SSH_X509STORE_DISABLED
+ ssh_x509store_initialize(&options->ca);
+#endif /*ndef SSH_X509STORE_DISABLED*/
+#ifdef SSH_OCSP_ENABLED
+ options->va.type = -1;
+ options->va.certificate_file = NULL;
+ options->va.responder_url = NULL;
+#endif /*def SSH_OCSP_ENABLED*/
options->hostbased_uses_name_from_packet_only = -1;
options->rsa_authentication = -1;
options->pubkey_authentication = -1;
@@ -147,18 +158,6 @@
options->num_permitted_opens = -1;
options->adm_forced_command = NULL;
options->chroot_directory = NULL;
-
- options->hostbased_algorithms = NULL;
- options->pubkey_algorithms = NULL;
- ssh_x509flags_initialize(&options->x509flags, 1);
-#ifndef SSH_X509STORE_DISABLED
- ssh_x509store_initialize(&options->ca);
-#endif /*ndef SSH_X509STORE_DISABLED*/
-#ifdef SSH_OCSP_ENABLED
- options->va.type = -1;
- options->va.certificate_file = NULL;
- options->va.responder_url = NULL;
-#endif /*def SSH_OCSP_ENABLED*/
}
void
@@ -329,6 +329,16 @@
/* Portable-specific options */
sUsePAM,
/* Standard Options */
+ sHostbasedAlgorithms,
+ sPubkeyAlgorithms,
+ sX509KeyAlgorithm,
+ sAllowedClientCertPurpose,
+ sKeyAllowSelfIssued, sMandatoryCRL,
+ sCACertificateFile, sCACertificatePath,
+ sCARevocationFile, sCARevocationPath,
+ sCAldapVersion, sCAldapURL,
+ sVAType, sVACertificateFile,
+ sVAOCSPResponderURL,
sPort, sHostKeyFile, sServerKeyBits, sLoginGraceTime, sKeyRegenerationTime,
sPermitRootLogin, sLogFacility, sLogLevel,
sRhostsRSAAuthentication, sRSAAuthentication,
@@ -351,16 +361,6 @@
sGssAuthentication, sGssCleanupCreds, sAcceptEnv, sPermitTunnel,
sMatch, sPermitOpen, sForceCommand,
sUsePrivilegeSeparation,
- sHostbasedAlgorithms,
- sPubkeyAlgorithms,
- sX509KeyAlgorithm,
- sAllowedClientCertPurpose,
- sKeyAllowSelfIssued, sMandatoryCRL,
- sCACertificateFile, sCACertificatePath,
- sCARevocationFile, sCARevocationPath,
- sCAldapVersion, sCAldapURL,
- sVAType, sVACertificateFile,
- sVAOCSPResponderURL,
sDeprecated, sUnsupported
} ServerOpCodes;
--- Makefile.in
+++ Makefile.in
@@ -44,11 +44,12 @@
CC=@CC@
LD=@LD@
CFLAGS=@CFLAGS@
-CPPFLAGS=-I. -I$(srcdir) @CPPFLAGS@ @LDAP_CPPFLAGS@ $(PATHS) @DEFS@
+CPPFLAGS=-I. -I$(srcdir) @CPPFLAGS@ $(PATHS) @DEFS@
LIBS=@LIBS@
SSHDLIBS=@SSHDLIBS@
LIBEDIT=@LIBEDIT@
LIBLDAP=@LDAP_LDFLAGS@ @LDAP_LIBS@
+CPPFLAGS += @LDAP_CPPFLAGS@
AR=@AR@
AWK=@AWK@
RANLIB=@RANLIB@

View File

@ -1,21 +0,0 @@
a simple 'int main(){}' function won't generate references to SSP functions
when using -fstack-protector which means systems that dont have SSP support
wont get properly detected as lacking support. instead, create a big buffer
on the stack and use it as that seems to do the trick.
https://bugzilla.mindrot.org/show_bug.cgi?id=1538
https://bugs.gentoo.org/244776
--- openssh-5.1p1/configure.ac
+++ openssh-5.1p1/configure.ac
@@ -145,8 +145,8 @@ int main(void){return 0;}
AC_MSG_CHECKING(if $t works)
AC_RUN_IFELSE(
[AC_LANG_SOURCE([
-#include <stdlib.h>
-int main(void){exit(0);}
+#include <stdio.h>
+int main(void){char foo[[1024]];return sprintf(foo, "moo cow") == 7;}
])],
[ AC_MSG_RESULT(yes)
break ],

View File

@ -1,18 +0,0 @@
don't escape the banner output
http://bugs.gentoo.org/244222
https://bugzilla.mindrot.org/show_bug.cgi?id=1533
fix by Michał Górny <mgorny.3ehbo@mailnull.com>
--- sshconnect2.c
+++ sshconnect2.c
@@ -415,7 +415,7 @@ input_userauth_banner(int type, u_int32_t seq, void *ctxt)
if (len > 65536)
len = 65536;
msg = xmalloc(len * 4 + 1); /* max expansion from strnvis() */
- strnvis(msg, raw, len * 4 + 1, VIS_SAFE|VIS_OCTAL);
+ strnvis(msg, raw, len * 4 + 1, VIS_SAFE|VIS_OCTAL|VIS_NOSLASH);
fprintf(stderr, "%s", msg);
xfree(msg);
}

View File

@ -1,55 +0,0 @@
diff -Nuar --exclude '*.rej' --exclude '*.orig' openssh-5.1p1+lpk/servconf.c openssh-5.1p1+lpk+glue/servconf.c
--- openssh-5.1p1+lpk/servconf.c 2008-08-23 14:37:18.000000000 -0700
+++ openssh-5.1p1+lpk+glue/servconf.c 2008-08-23 14:52:19.000000000 -0700
@@ -111,6 +111,25 @@
options->num_allow_groups = 0;
options->num_deny_groups = 0;
options->ciphers = NULL;
+#ifdef WITH_LDAP_PUBKEY
+ /* XXX dirty */
+ options->lpk.ld = NULL;
+ options->lpk.on = -1;
+ options->lpk.servers = NULL;
+ options->lpk.u_basedn = NULL;
+ options->lpk.g_basedn = NULL;
+ options->lpk.binddn = NULL;
+ options->lpk.bindpw = NULL;
+ options->lpk.sgroup = NULL;
+ options->lpk.filter = NULL;
+ options->lpk.fgroup = NULL;
+ options->lpk.l_conf = NULL;
+ options->lpk.tls = -1;
+ options->lpk.b_timeout.tv_sec = -1;
+ options->lpk.s_timeout.tv_sec = -1;
+ options->lpk.flags = FLAG_EMPTY;
+#endif
+
options->macs = NULL;
options->protocol = SSH_PROTO_UNKNOWN;
options->gateway_ports = -1;
@@ -131,25 +150,6 @@
options->num_permitted_opens = -1;
options->adm_forced_command = NULL;
options->chroot_directory = NULL;
-#ifdef WITH_LDAP_PUBKEY
- /* XXX dirty */
- options->lpk.ld = NULL;
- options->lpk.on = -1;
- options->lpk.servers = NULL;
- options->lpk.u_basedn = NULL;
- options->lpk.g_basedn = NULL;
- options->lpk.binddn = NULL;
- options->lpk.bindpw = NULL;
- options->lpk.sgroup = NULL;
- options->lpk.filter = NULL;
- options->lpk.fgroup = NULL;
- options->lpk.l_conf = NULL;
- options->lpk.tls = -1;
- options->lpk.b_timeout.tv_sec = -1;
- options->lpk.s_timeout.tv_sec = -1;
- options->lpk.flags = FLAG_EMPTY;
-#endif
-
}
void

View File

@ -1,35 +0,0 @@
apply fixes from upstream for empty banner
https://bugzilla.mindrot.org/show_bug.cgi?id=1496
http://bugs.gentoo.org/244222
----------------------------
revision 1.168
date: 2008/10/03 23:56:28; author: deraadt; state: Exp; lines: +3 -3
Repair strnvis() buffersize of 4*n+1, with termination gauranteed by the
function.
spotted by des@freebsd, who commited an incorrect fix to the freebsd tree
and (as is fairly typical) did not report the problem to us. But this fix
is correct.
ok djm
----------------------------
revision 1.167
date: 2008/07/31 14:48:28; author: markus; state: Exp; lines: +2 -2
don't allocate space for empty banners; report t8m at centrum.cz; ok deraadt
--- src/usr.bin/ssh/sshconnect2.c 2008/07/17 09:48:00 1.166
+++ src/usr.bin/ssh/sshconnect2.c 2008/10/04 00:56:28 1.168
@@ -377,11 +377,11 @@ input_userauth_banner(int type, u_int32_t seq, void *c
debug3("input_userauth_banner");
raw = packet_get_string(&len);
lang = packet_get_string(NULL);
- if (options.log_level >= SYSLOG_LEVEL_INFO) {
+ if (len > 0 && options.log_level >= SYSLOG_LEVEL_INFO) {
if (len > 65536)
len = 65536;
- msg = xmalloc(len * 4); /* max expansion from strnvis() */
- strnvis(msg, raw, len * 4, VIS_SAFE|VIS_OCTAL);
+ msg = xmalloc(len * 4 + 1); /* max expansion from strnvis() */
+ strnvis(msg, raw, len * 4 + 1, VIS_SAFE|VIS_OCTAL);
fprintf(stderr, "%s", msg);
xfree(msg);
}

View File

@ -1,14 +0,0 @@
need strsep() prototype for 64bit systems
http://bugs.gentoo.org/258795
--- a/auth2-pubkey.c
+++ b/auth2-pubkey.c
@@ -54,6 +54,7 @@
#endif
#include "monitor_wrap.h"
#include "ssh-x509.h"
+#include <string.h>
#include "misc.h"
/* import */

View File

@ -1,96 +0,0 @@
Move things around so hpn applies cleanly when using X509.
Forward-Ported-from: files/openssh-4.9_p1-x509-hpn-glue.patch
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
diff -Nuar --exclude '*.orig' --exclude '*.rej' openssh-5.1p1+x509/Makefile.in openssh-5.1p1+x509-hpn-glue/Makefile.in
--- openssh-5.1p1+x509/Makefile.in 2008-08-23 14:12:53.000000000 -0700
+++ openssh-5.1p1+x509-hpn-glue/Makefile.in 2008-08-23 14:13:51.000000000 -0700
@@ -44,11 +44,12 @@
CC=@CC@
LD=@LD@
CFLAGS=@CFLAGS@
-CPPFLAGS=-I. -I$(srcdir) @CPPFLAGS@ @LDAP_CPPFLAGS@ $(PATHS) @DEFS@
+CPPFLAGS=-I. -I$(srcdir) @CPPFLAGS@ $(PATHS) @DEFS@
LIBS=@LIBS@
SSHDLIBS=@SSHDLIBS@
LIBEDIT=@LIBEDIT@
LIBLDAP=@LDAP_LDFLAGS@ @LDAP_LIBS@
+CPPFLAGS += @LDAP_CPPFLAGS@
AR=@AR@
AWK=@AWK@
RANLIB=@RANLIB@
diff -Nuar --exclude '*.orig' --exclude '*.rej' openssh-5.1p1+x509/servconf.c openssh-5.1p1+x509-hpn-glue/servconf.c
--- openssh-5.1p1+x509/servconf.c 2008-08-23 14:12:53.000000000 -0700
+++ openssh-5.1p1+x509-hpn-glue/servconf.c 2008-08-23 14:23:56.000000000 -0700
@@ -108,6 +108,17 @@
options->log_level = SYSLOG_LEVEL_NOT_SET;
options->rhosts_rsa_authentication = -1;
options->hostbased_authentication = -1;
+ options->hostbased_algorithms = NULL;
+ options->pubkey_algorithms = NULL;
+ ssh_x509flags_initialize(&options->x509flags, 1);
+#ifndef SSH_X509STORE_DISABLED
+ ssh_x509store_initialize(&options->ca);
+#endif /*ndef SSH_X509STORE_DISABLED*/
+#ifdef SSH_OCSP_ENABLED
+ options->va.type = -1;
+ options->va.certificate_file = NULL;
+ options->va.responder_url = NULL;
+#endif /*def SSH_OCSP_ENABLED*/
options->hostbased_uses_name_from_packet_only = -1;
options->rsa_authentication = -1;
options->pubkey_authentication = -1;
@@ -151,18 +162,6 @@
options->num_permitted_opens = -1;
options->adm_forced_command = NULL;
options->chroot_directory = NULL;
-
- options->hostbased_algorithms = NULL;
- options->pubkey_algorithms = NULL;
- ssh_x509flags_initialize(&options->x509flags, 1);
-#ifndef SSH_X509STORE_DISABLED
- ssh_x509store_initialize(&options->ca);
-#endif /*ndef SSH_X509STORE_DISABLED*/
-#ifdef SSH_OCSP_ENABLED
- options->va.type = -1;
- options->va.certificate_file = NULL;
- options->va.responder_url = NULL;
-#endif /*def SSH_OCSP_ENABLED*/
}
void
@@ -338,6 +337,16 @@
/* Portable-specific options */
sUsePAM,
/* Standard Options */
+ sHostbasedAlgorithms,
+ sPubkeyAlgorithms,
+ sX509KeyAlgorithm,
+ sAllowedClientCertPurpose,
+ sKeyAllowSelfIssued, sMandatoryCRL,
+ sCACertificateFile, sCACertificatePath,
+ sCARevocationFile, sCARevocationPath,
+ sCAldapVersion, sCAldapURL,
+ sVAType, sVACertificateFile,
+ sVAOCSPResponderURL,
sPort, sHostKeyFile, sServerKeyBits, sLoginGraceTime, sKeyRegenerationTime,
sPermitRootLogin, sLogFacility, sLogLevel,
sRhostsRSAAuthentication, sRSAAuthentication,
@@ -360,16 +369,6 @@
sGssAuthentication, sGssCleanupCreds, sAcceptEnv, sPermitTunnel,
sMatch, sPermitOpen, sForceCommand, sChrootDirectory,
sUsePrivilegeSeparation, sAllowAgentForwarding,
- sHostbasedAlgorithms,
- sPubkeyAlgorithms,
- sX509KeyAlgorithm,
- sAllowedClientCertPurpose,
- sKeyAllowSelfIssued, sMandatoryCRL,
- sCACertificateFile, sCACertificatePath,
- sCARevocationFile, sCARevocationPath,
- sCAldapVersion, sCAldapURL,
- sVAType, sVACertificateFile,
- sVAOCSPResponderURL,
sDeprecated, sUnsupported
} ServerOpCodes;

View File

@ -1,15 +0,0 @@
workaround problems with autoconf-2.63
http://lists.gnu.org/archive/html/autoconf/2009-04/msg00007.html
--- a/configure.ac
+++ b/configure.ac
@@ -3603,7 +3603,7 @@
#include <shadow.h>
struct spwd sp;
],[ sp.sp_expire = sp.sp_lstchg = sp.sp_inact = 0; ],
- [ sp_expire_available=yes ], []
+ [ sp_expire_available=yes ], [:]
)
if test "x$sp_expire_available" = "xyes" ; then

View File

@ -1,16 +0,0 @@
--- clientloop.c
+++ clientloop.c
@@ -1434,11 +1434,13 @@
if (!rekeying) {
channel_after_select(readset, writeset);
+#ifdef GSSAPI
if (options.gss_renewal_rekey &&
ssh_gssapi_credentials_updated(GSS_C_NO_CONTEXT)) {
debug("credentials updated - forcing rekey");
need_rekeying = 1;
}
+#endif
if (need_rekeying || packet_need_rekeying()) {
debug("need rekeying");

View File

@ -1,15 +0,0 @@
fix from newer versions for parallel build failures
http://crosbug.com/31285
--- Makefile.in
+++ Makefile.in
@@ -149,7 +149,7 @@
ssh-keygen$(EXEEXT): $(LIBCOMPAT) libssh.a ssh-keygen.o
$(LD) -o $@ ssh-keygen.o $(LDFLAGS) -lssh -lopenbsd-compat $(LIBS)
-ssh-keysign$(EXEEXT): $(LIBCOMPAT) libssh.a ssh-keysign.o
+ssh-keysign$(EXEEXT): $(LIBCOMPAT) libssh.a ssh-keysign.o readconf.o
$(LD) -o $@ ssh-keysign.o readconf.o $(LDFLAGS) -lssh -lopenbsd-compat $(LIBS)
ssh-keyscan$(EXEEXT): $(LIBCOMPAT) libssh.a ssh-keyscan.o

View File

@ -1,91 +0,0 @@
Move things around so hpn applies cleanly when using X509.
--- openssh-5.2p1+x509/Makefile.in
+++ openssh-5.2p1+x509/Makefile.in
@@ -44,11 +44,12 @@
CC=@CC@
LD=@LD@
CFLAGS=@CFLAGS@
-CPPFLAGS=-I. -I$(srcdir) @CPPFLAGS@ @LDAP_CPPFLAGS@ $(PATHS) @DEFS@
+CPPFLAGS=-I. -I$(srcdir) @CPPFLAGS@ $(PATHS) @DEFS@
LIBS=@LIBS@
SSHDLIBS=@SSHDLIBS@
LIBEDIT=@LIBEDIT@
LIBLDAP=@LDAP_LDFLAGS@ @LDAP_LIBS@
+CPPFLAGS += @LDAP_CPPFLAGS@
AR=@AR@
AWK=@AWK@
RANLIB=@RANLIB@
--- openssh-5.2p1+x509/servconf.c
+++ openssh-5.2p1+x509/servconf.c
@@ -108,6 +108,17 @@
options->log_level = SYSLOG_LEVEL_NOT_SET;
options->rhosts_rsa_authentication = -1;
options->hostbased_authentication = -1;
+ options->hostbased_algorithms = NULL;
+ options->pubkey_algorithms = NULL;
+ ssh_x509flags_initialize(&options->x509flags, 1);
+#ifndef SSH_X509STORE_DISABLED
+ ssh_x509store_initialize(&options->ca);
+#endif /*ndef SSH_X509STORE_DISABLED*/
+#ifdef SSH_OCSP_ENABLED
+ options->va.type = -1;
+ options->va.certificate_file = NULL;
+ options->va.responder_url = NULL;
+#endif /*def SSH_OCSP_ENABLED*/
options->hostbased_uses_name_from_packet_only = -1;
options->rsa_authentication = -1;
options->pubkey_authentication = -1;
@@ -152,18 +163,6 @@
options->adm_forced_command = NULL;
options->chroot_directory = NULL;
options->zero_knowledge_password_authentication = -1;
-
- options->hostbased_algorithms = NULL;
- options->pubkey_algorithms = NULL;
- ssh_x509flags_initialize(&options->x509flags, 1);
-#ifndef SSH_X509STORE_DISABLED
- ssh_x509store_initialize(&options->ca);
-#endif /*ndef SSH_X509STORE_DISABLED*/
-#ifdef SSH_OCSP_ENABLED
- options->va.type = -1;
- options->va.certificate_file = NULL;
- options->va.responder_url = NULL;
-#endif /*def SSH_OCSP_ENABLED*/
}
void
@@ -341,6 +340,16 @@
/* Portable-specific options */
sUsePAM,
/* Standard Options */
+ sHostbasedAlgorithms,
+ sPubkeyAlgorithms,
+ sX509KeyAlgorithm,
+ sAllowedClientCertPurpose,
+ sKeyAllowSelfIssued, sMandatoryCRL,
+ sCACertificateFile, sCACertificatePath,
+ sCARevocationFile, sCARevocationPath,
+ sCAldapVersion, sCAldapURL,
+ sVAType, sVACertificateFile,
+ sVAOCSPResponderURL,
sPort, sHostKeyFile, sServerKeyBits, sLoginGraceTime, sKeyRegenerationTime,
sPermitRootLogin, sLogFacility, sLogLevel,
sRhostsRSAAuthentication, sRSAAuthentication,
@@ -364,16 +373,6 @@
sMatch, sPermitOpen, sForceCommand, sChrootDirectory,
sUsePrivilegeSeparation, sAllowAgentForwarding,
sZeroKnowledgePasswordAuthentication,
- sHostbasedAlgorithms,
- sPubkeyAlgorithms,
- sX509KeyAlgorithm,
- sAllowedClientCertPurpose,
- sKeyAllowSelfIssued, sMandatoryCRL,
- sCACertificateFile, sCACertificatePath,
- sCARevocationFile, sCARevocationPath,
- sCAldapVersion, sCAldapURL,
- sVAType, sVACertificateFile,
- sVAOCSPResponderURL,
sDeprecated, sUnsupported
} ServerOpCodes;

View File

@ -1,10 +0,0 @@
--- ldapauth.c.orig 2009-04-18 18:06:38.000000000 +0200
+++ ldapauth.c 2009-04-18 18:06:11.000000000 +0200
@@ -31,6 +31,7 @@
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
+#include <stdarg.h>
#include "ldapauth.h"
#include "log.h"

View File

@ -1,15 +0,0 @@
diff -Nuar openssh-5.3p1/Makefile.in openssh-5.3p1.pkcs-hpn-glue/Makefile.in
--- openssh-5.3p1/Makefile.in 2009-10-10 22:52:10.081356354 -0700
+++ openssh-5.3p1.pkcs-hpn-glue/Makefile.in 2009-10-10 22:55:47.158418049 -0700
@@ -64,10 +64,10 @@
LIBSSH_OBJS=acss.o authfd.o authfile.o bufaux.o bufbn.o buffer.o \
canohost.o channels.o cipher.o cipher-acss.o cipher-aes.o \
- pkcs11.o \
cipher-bf1.o cipher-ctr.o cipher-3des1.o cleanup.o \
compat.o compress.o crc32.o deattack.o fatal.o hostfile.o \
log.o match.o md-sha256.o moduli.o nchan.o packet.o \
+ pkcs11.o \
readpass.o rsa.o ttymodes.o xmalloc.o addrmatch.o \
atomicio.o key.o dispatch.o kex.o mac.o uidswap.o uuencode.o misc.o \
monitor_fdpass.o rijndael.o ssh-dss.o ssh-rsa.o dh.o kexdh.o \

View File

@ -1,21 +0,0 @@
# /etc/conf.d/sshd: config file for /etc/init.d/sshd
# Where is your sshd_config file stored?
SSHD_CONFDIR="/etc/ssh"
# Any random options you want to pass to sshd.
# See the sshd(8) manpage for more info.
SSHD_OPTS=""
# Pid file to use (needs to be absolute path).
#SSHD_PIDFILE="/var/run/sshd.pid"
# Path to the sshd binary (needs to be absolute path).
#SSHD_BINARY="/usr/sbin/sshd"

View File

@ -1,9 +0,0 @@
#%PAM-1.0
auth required pam_stack.so service=system-auth
auth required pam_shells.so
auth required pam_nologin.so
account required pam_stack.so service=system-auth
password required pam_stack.so service=system-auth
session required pam_stack.so service=system-auth

View File

@ -1,4 +0,0 @@
auth include system-remote-login
account include system-remote-login
password include system-remote-login
session include system-remote-login

View File

@ -1,81 +0,0 @@
#!/sbin/runscript
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-misc/openssh/files/sshd.rc6,v 1.27 2009/08/12 08:09:52 idl0r Exp $
opts="${opts} reload checkconfig gen_keys"
depend() {
use logger dns
need net
}
SSHD_CONFDIR=${SSHD_CONFDIR:-/etc/ssh}
SSHD_PIDFILE=${SSHD_PIDFILE:-/var/run/${SVCNAME}.pid}
SSHD_BINARY=${SSHD_BINARY:-/usr/sbin/sshd}
checkconfig() {
if [ ! -d /var/empty ] ; then
mkdir -p /var/empty || return 1
fi
if [ ! -e "${SSHD_CONFDIR}"/sshd_config ] ; then
eerror "You need an ${SSHD_CONFDIR}/sshd_config file to run sshd"
eerror "There is a sample file in /usr/share/doc/openssh"
return 1
fi
gen_keys || return 1
"${SSHD_BINARY}" -t ${myopts} || return 1
}
gen_keys() {
if [ ! -e "${SSHD_CONFDIR}"/ssh_host_key ] ; then
einfo "Generating Hostkey..."
/usr/bin/ssh-keygen -t rsa1 -f "${SSHD_CONFDIR}"/ssh_host_key -N '' || return 1
fi
if [ ! -e "${SSHD_CONFDIR}"/ssh_host_dsa_key ] ; then
einfo "Generating DSA-Hostkey..."
/usr/bin/ssh-keygen -d -f "${SSHD_CONFDIR}"/ssh_host_dsa_key -N '' || return 1
fi
if [ ! -e "${SSHD_CONFDIR}"/ssh_host_rsa_key ] ; then
einfo "Generating RSA-Hostkey..."
/usr/bin/ssh-keygen -t rsa -f "${SSHD_CONFDIR}"/ssh_host_rsa_key -N '' || return 1
fi
return 0
}
start() {
local myopts=""
[ "${SSHD_PIDFILE}" != "/var/run/sshd.pid" ] \
&& myopts="${myopts} -o PidFile=${SSHD_PIDFILE}"
[ "${SSHD_CONFDIR}" != "/etc/ssh" ] \
&& myopts="${myopts} -f ${SSHD_CONFDIR}/sshd_config"
checkconfig || return 1
ebegin "Starting ${SVCNAME}"
start-stop-daemon --start --exec "${SSHD_BINARY}" \
--pidfile "${SSHD_PIDFILE}" \
-- ${myopts} ${SSHD_OPTS}
eend $?
}
stop() {
if [ "${RC_CMD}" = "restart" ] ; then
checkconfig || return 1
fi
ebegin "Stopping ${SVCNAME}"
start-stop-daemon --stop --exec "${SSHD_BINARY}" \
--pidfile "${SSHD_PIDFILE}" --quiet
eend $?
}
reload() {
checkconfig || return 1
ebegin "Reloading ${SVCNAME}"
start-stop-daemon --stop --signal HUP --oknodo \
--exec "${SSHD_BINARY}" --pidfile "${SSHD_PIDFILE}"
eend $?
}

View File

@ -1 +0,0 @@
openssh-5.2_p1-r3.ebuild

View File

@ -1,259 +0,0 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-misc/openssh/openssh-5.2_p1-r3.ebuild,v 1.7 2009/10/11 20:21:40 nixnut Exp $
inherit eutils flag-o-matic multilib autotools pam useradd
# Make it more portable between straight releases
# and _p? releases.
PARCH=${P/_/}
HPN_PATCH="${PARCH}-hpn13v6.diff.gz"
LDAP_PATCH="${PARCH/openssh/openssh-lpk}-0.3.11.patch.gz"
PKCS11_PATCH="${PARCH/p1}pkcs11-0.26.tar.bz2"
X509_VER="6.2.1" X509_PATCH="${PARCH}+x509-${X509_VER}.diff.gz"
DESCRIPTION="Port of OpenBSD's free SSH release"
HOMEPAGE="http://www.openssh.org/"
# HPN appears twice as sometimes Gentoo has a custom version of it.
SRC_URI="mirror://openbsd/OpenSSH/portable/${PARCH}.tar.gz
http://www.sxw.org.uk/computing/patches/openssh-5.2p1-gsskex-all-20090726.patch
${HPN_PATCH:+hpn? ( http://www.psc.edu/networking/projects/hpn-ssh/${HPN_PATCH} )}
${LDAP_PATCH:+ldap? ( mirror://gentoo/${LDAP_PATCH} )}
${PKCS11_PATCH:+pkcs11? ( http://alon.barlev.googlepages.com/${PKCS11_PATCH} )}
${X509_PATCH:+X509? ( http://roumenpetrov.info/openssh/x509-${X509_VER}/${X509_PATCH} )}"
LICENSE="as-is"
SLOT="0"
KEYWORDS="alpha amd64 arm hppa ~ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh ~sparc x86 ~sparc-fbsd ~x86-fbsd"
IUSE="hpn kerberos ldap libedit pam pkcs11 selinux skey smartcard static tcpd X X509"
RDEPEND="pam? ( virtual/pam )
kerberos? ( virtual/krb5 )
selinux? ( >=sys-libs/libselinux-1.28 )
skey? ( >=sys-auth/skey-1.1.5-r1 )
ldap? ( net-nds/openldap )
libedit? ( dev-libs/libedit )
>=dev-libs/openssl-0.9.6d
>=sys-libs/zlib-1.2.3
smartcard? ( dev-libs/opensc )
pkcs11? ( dev-libs/pkcs11-helper )
tcpd? ( >=sys-apps/tcp-wrappers-7.6 )
X? ( x11-apps/xauth )
userland_GNU? ( sys-apps/shadow )"
DEPEND="${RDEPEND}
dev-util/pkgconfig
virtual/os-headers
sys-devel/autoconf"
RDEPEND="${RDEPEND}
pam? ( >=sys-auth/pambase-20081028 )"
PROVIDE="virtual/ssh"
S=${WORKDIR}/${PARCH}
pkg_setup() {
# this sucks, but i'd rather have people unable to `emerge -u openssh`
# than not be able to log in to their server any more
maybe_fail() { [[ -z ${!2} ]] && use ${1} && echo ${1} ; }
local fail="
$(maybe_fail ldap LDAP_PATCH)
$(maybe_fail pkcs11 PKCS11_PATCH)
$(maybe_fail X509 X509_PATCH)
"
fail=$(echo ${fail})
if [[ -n ${fail} ]] ; then
eerror "Sorry, but this version does not yet support features"
eerror "that you requested: ${fail}"
eerror "Please mask ${PF} for now and check back later:"
eerror " # echo '=${CATEGORY}/${PF}' >> /etc/portage/package.mask"
die "booooo"
fi
}
src_unpack() {
unpack ${PARCH}.tar.gz
cd "${S}"
sed -i \
-e '/_PATH_XAUTH/s:/usr/X11R6/bin/xauth:/usr/bin/xauth:' \
pathnames.h || die
if use pkcs11 ; then
cd "${WORKDIR}"
unpack "${PKCS11_PATCH}"
cd "${S}"
EPATCH_OPTS="-p1" epatch "${WORKDIR}"/*pkcs11*/{1,2,4}*
use X509 && EPATCH_OPTS="-R" epatch "${WORKDIR}"/*pkcs11*/1000_all_log.patch
fi
use X509 && epatch "${DISTDIR}"/${X509_PATCH} "${FILESDIR}"/${P}-x509-hpn-glue.patch
use smartcard && epatch "${FILESDIR}"/openssh-3.9_p1-opensc.patch
if ! use X509 ; then
if [[ -n ${LDAP_PATCH} ]] && use ldap ; then
# The patch for bug 210110 64-bit stuff is now included.
epatch "${DISTDIR}"/${LDAP_PATCH}
epatch "${FILESDIR}"/${PN}-5.2p1-ldap-stdargs.diff #266654
fi
epatch "${DISTDIR}"/openssh-5.2p1-gsskex-all-20090726.patch #115553 #216932 #279488
epatch "${FILESDIR}"/${P}-gsskex-fix.patch
else
use ldap && ewarn "Sorry, X509 and ldap don't get along, disabling ldap"
fi
#epatch "${FILESDIR}"/${PN}-4.7_p1-GSSAPI-dns.patch #165444 integrated into gsskex
[[ -n ${HPN_PATCH} ]] && use hpn && epatch "${DISTDIR}"/${HPN_PATCH}
epatch "${FILESDIR}"/${PN}-4.7p1-selinux.diff #191665
epatch "${FILESDIR}"/${P}-autoconf.patch
epatch "${FILESDIR}"/${P}-ssh-keysign-readconf.patch
# in 5.2p1, the AES-CTR multithreaded variant is temporarily broken, and
# causes random hangs when combined with the -f switch of ssh.
# To avoid this, we change the internal table to use the non-multithread
# version for the meantime.
sed -i \
-e '/aes...-ctr.*SSH_CIPHER_SSH2/s,evp_aes_ctr_mt,evp_aes_128_ctr,' \
cipher.c || die
sed -i "s:-lcrypto:$(pkg-config --libs openssl):" configure{,.ac} || die
# Disable PATH reset, trust what portage gives us. bug 254615
sed -i -e 's:^PATH=/:#PATH=/:' configure || die
eautoreconf
}
static_use_with() {
local flag=$1
if use static && use ${flag} ; then
ewarn "Disabling '${flag}' support because of USE='static'"
# rebuild args so that we invert the first one (USE flag)
# but otherwise leave everything else working so we can
# just leverage use_with
shift
[[ -z $1 ]] && flag="${flag} ${flag}"
set -- !${flag} "$@"
fi
use_with "$@"
}
src_compile() {
export CFLAGS
CFLAGS+=" -fno-strict-aliasing"
addwrite /dev/ptmx
addpredict /etc/skey/skeykeys #skey configure code triggers this
local myconf=""
use static && append-ldflags -static
econf \
--with-ldflags="${LDFLAGS}" \
--disable-strip \
--sysconfdir=/etc/ssh \
--libexecdir=/usr/$(get_libdir)/misc \
--datadir=/usr/share/openssh \
--with-privsep-path=/var/empty \
--with-privsep-user=sshd \
--with-md5-passwords \
--with-ssl-engine \
$(static_use_with pam) \
$(static_use_with kerberos kerberos5 /usr) \
${LDAP_PATCH:+$(use ldap && use_with ldap)} \
$(use_with libedit) \
${PKCS11_PATCH:+$(use pkcs11 && static_use_with pkcs11)} \
$(use_with selinux) \
$(use_with skey) \
$(use_with smartcard opensc) \
$(use_with tcpd tcp-wrappers) \
${myconf} \
|| die "bad configure"
emake || die "compile problem"
}
src_install() {
emake install-nokeys DESTDIR="${D}" || die
fperms 600 /etc/ssh/sshd_config
dobin contrib/ssh-copy-id
newconfd "${FILESDIR}"/sshd.confd sshd
keepdir /var/empty
newpamd "${FILESDIR}"/sshd.pam_include.2 sshd
if use pam ; then
sed -i \
-e "/^#UsePAM /s:.*:UsePAM yes:" \
-e "/^#PasswordAuthentication /s:.*:PasswordAuthentication no:" \
-e "/^#PrintMotd /s:.*:PrintMotd no:" \
-e "/^#PrintLastLog /s:.*:PrintLastLog no:" \
"${D}"/etc/ssh/sshd_config || die "sed of configuration file failed"
fi
# This instruction is from the HPN webpage,
# Used for the server logging functionality
if [[ -n ${HPN_PATCH} ]] && use hpn; then
keepdir /var/empty/dev
fi
doman contrib/ssh-copy-id.1
dodoc ChangeLog CREDITS OVERVIEW README* TODO sshd_config
diropts -m 0700
dodir /etc/skel/.ssh
}
src_test() {
local t tests skipped failed passed shell
tests="interop-tests compat-tests"
skipped=""
shell=$(getent passwd ${UID} | cut -d: -f7)
if [[ ${shell} == */nologin ]] || [[ ${shell} == */false ]] ; then
elog "Running the full OpenSSH testsuite"
elog "requires a usable shell for the 'portage'"
elog "user, so we will run a subset only."
skipped="${skipped} tests"
else
tests="${tests} tests"
fi
for t in ${tests} ; do
# Some tests read from stdin ...
emake -k -j1 ${t} </dev/null \
&& passed="${passed}${t} " \
|| failed="${failed}${t} "
done
einfo "Passed tests: ${passed}"
ewarn "Skipped tests: ${skipped}"
if [[ -n ${failed} ]] ; then
ewarn "Failed tests: ${failed}"
die "Some tests failed: ${failed}"
else
einfo "Failed tests: ${failed}"
return 0
fi
}
pkg_postinst() {
add_group sshd 22
add_user "sshd" "*" 22 22 "sshd_user" /dev/null /bin/false
# help fix broken perms caused by older ebuilds.
# can probably cut this after the next stage release.
chmod u+x "${ROOT}"/etc/skel/.ssh >& /dev/null
ewarn "Remember to merge your config files in /etc/ssh/ and then"
ewarn "reload sshd: '/etc/init.d/sshd reload'."
if use pam ; then
echo
ewarn "Please be aware users need a valid shell in /etc/passwd"
ewarn "in order to be allowed to login."
fi
if use pkcs11 ; then
echo
einfo "For PKCS#11 you should also emerge one of the askpass softwares"
einfo "Example: net-misc/x11-ssh-askpass"
fi
# This instruction is from the HPN webpage,
# Used for the server logging functionality
if [[ -n ${HPN_PATCH} ]] && use hpn; then
echo
einfo "For the HPN server logging patch, you must ensure that"
einfo "your syslog application also listens at /var/empty/dev/log."
fi
}