diff options
author | Bryan Drewery <bdrewery@FreeBSD.org> | 2015-03-21 19:28:40 +0000 |
---|---|---|
committer | Bryan Drewery <bdrewery@FreeBSD.org> | 2015-03-21 19:28:40 +0000 |
commit | 036c38aa5b513a69591b490f4854ae12b3422c58 (patch) | |
tree | c45ce0f9d0d00fb35043ebb13fb5598bd40aca23 /security | |
parent | e607f220a6f884720b3a6da3d0f8eb91172df5d5 (diff) | |
download | ports-036c38aa5b513a69591b490f4854ae12b3422c58.tar.gz ports-036c38aa5b513a69591b490f4854ae12b3422c58.zip |
Notes
Diffstat (limited to 'security')
-rw-r--r-- | security/openssh-portable/Makefile | 2 | ||||
-rw-r--r-- | security/openssh-portable/files/openssh.in | 46 |
2 files changed, 24 insertions, 24 deletions
diff --git a/security/openssh-portable/Makefile b/security/openssh-portable/Makefile index d593cbafe89e..9b96fb614097 100644 --- a/security/openssh-portable/Makefile +++ b/security/openssh-portable/Makefile @@ -3,7 +3,7 @@ PORTNAME= openssh DISTVERSION= 6.7p1 -PORTREVISION= 1 +PORTREVISION= 2 PORTEPOCH= 1 CATEGORIES= security ipv6 MASTER_SITES= ${MASTER_SITE_OPENBSD} diff --git a/security/openssh-portable/files/openssh.in b/security/openssh-portable/files/openssh.in index 215095098a9f..230179312af1 100644 --- a/security/openssh-portable/files/openssh.in +++ b/security/openssh-portable/files/openssh.in @@ -35,11 +35,11 @@ pidfile=${openssh_pidfile:="/var/run/sshd.pid"} openssh_keygen() { - if [ -f %%ETCSSH%%/ssh_host_key -a \ - -f %%ETCSSH%%/ssh_host_dsa_key -a \ - -f %%ETCSSH%%/ssh_host_rsa_key -a \ - -f %%ETCSSH%%/ssh_host_ecdsa_key -a \ - -f %%ETCSSH%%/ssh_host_ed25519_key ]; then + if [ -f %%ETCDIR%%/ssh_host_key -a \ + -f %%ETCDIR%%/ssh_host_dsa_key -a \ + -f %%ETCDIR%%/ssh_host_rsa_key -a \ + -f %%ETCDIR%%/ssh_host_ecdsa_key -a \ + -f %%ETCDIR%%/ssh_host_ed25519_key ]; then return 0 fi @@ -49,49 +49,49 @@ openssh_keygen() [ -x %%PREFIX%%/bin/ssh-keygen ] || err 1 "%%PREFIX%%/bin/ssh-keygen does not exist." - if [ -f %%ETCSSH%%/ssh_host_key ]; then + if [ -f %%ETCDIR%%/ssh_host_key ]; then echo "You already have an RSA host key" \ - "in %%ETCSSH%%/ssh_host_key" + "in %%ETCDIR%%/ssh_host_key" echo "Skipping protocol version 1 RSA Key Generation" else %%PREFIX%%/bin/ssh-keygen -t rsa1 -b 1024 \ - -f %%ETCSSH%%/ssh_host_key -N '' + -f %%ETCDIR%%/ssh_host_key -N '' fi - if [ -f %%ETCSSH%%/ssh_host_dsa_key ]; then + if [ -f %%ETCDIR%%/ssh_host_dsa_key ]; then echo "You already have a DSA host key" \ - "in %%ETCSSH%%/ssh_host_dsa_key" + "in %%ETCDIR%%/ssh_host_dsa_key" echo "Skipping protocol version 2 DSA Key Generation" else %%PREFIX%%/bin/ssh-keygen -t dsa \ - -f %%ETCSSH%%/ssh_host_dsa_key -N '' + -f %%ETCDIR%%/ssh_host_dsa_key -N '' fi - if [ -f %%ETCSSH%%/ssh_host_rsa_key ]; then + if [ -f %%ETCDIR%%/ssh_host_rsa_key ]; then echo "You already have a RSA host key" \ - "in %%ETCSSH%%/ssh_host_rsa_key" + "in %%ETCDIR%%/ssh_host_rsa_key" echo "Skipping protocol version 2 RSA Key Generation" else %%PREFIX%%/bin/ssh-keygen -t rsa \ - -f %%ETCSSH%%/ssh_host_rsa_key -N '' + -f %%ETCDIR%%/ssh_host_rsa_key -N '' fi - if [ -f %%ETCSSH%%/ssh_host_ecdsa_key ]; then + if [ -f %%ETCDIR%%/ssh_host_ecdsa_key ]; then echo "You already have a Elliptic Curve DSA host key" \ - "in %%ETCSSH%%/ssh_host_ecdsa_key" + "in %%ETCDIR%%/ssh_host_ecdsa_key" echo "Skipping protocol version 2 Elliptic Curve DSA Key Generation" else %%PREFIX%%/bin/ssh-keygen -t ecdsa \ - -f %%ETCSSH%%/ssh_host_ecdsa_key -N '' + -f %%ETCDIR%%/ssh_host_ecdsa_key -N '' fi - if [ -f %%ETCSSH%%/ssh_host_ed25519_key ]; then + if [ -f %%ETCDIR%%/ssh_host_ed25519_key ]; then echo "You already have a Elliptic Curve ED25519 host key" \ - "in %%ETCSSH%%/ssh_host_ed25519_key" + "in %%ETCDIR%%/ssh_host_ed25519_key" echo "Skipping protocol version 2 Elliptic Curve ED25519 Key Generation" else %%PREFIX%%/bin/ssh-keygen -t ed25519 \ - -f %%ETCSSH%%/ssh_host_ed25519_key -N '' + -f %%ETCDIR%%/ssh_host_ed25519_key -N '' fi } @@ -105,20 +105,20 @@ openssh_check_same_ports(){ #check if opensshd-portable installed in replacement of base sshd - if [ "%%ETCSSH%%" = "/etc/ssh" ]; then + if [ "%%ETCDIR%%" = "/etc/ssh" ]; then return 1 fi self_port=$(awk '$1~/^ListenAddress/ \ {mlen=match($0,":[0-9]*$"); print \ - substr($0,mlen+1,length($0)-mlen)}' %%ETCSSH%%/sshd_config) + substr($0,mlen+1,length($0)-mlen)}' %%ETCDIR%%/sshd_config) if [ -z "$self_port" ]; then self_port=$(echo $openssh_flags | awk \ '{for (i = 1; i <= NF; i++) if ($i == "-p") \ {i++; printf "%s", $i; break; }; }') if [ -z "$self_port" ]; then self_port=$(awk '$1~/^Port/ {print $2}' \ - %%ETCSSH%%/sshd_config) + %%ETCDIR%%/sshd_config) fi fi # assume default 22 port |