diff options
author | bdrewery <bdrewery@FreeBSD.org> | 2015-03-22 03:28:40 +0800 |
---|---|---|
committer | bdrewery <bdrewery@FreeBSD.org> | 2015-03-22 03:28:40 +0800 |
commit | b114d1ed03b258e47e50dc6cf2dea34169221731 (patch) | |
tree | c45ce0f9d0d00fb35043ebb13fb5598bd40aca23 /security/openssh-portable | |
parent | 38247655647fe044ab5e324bc47735066bd7c952 (diff) | |
download | freebsd-ports-gnome-b114d1ed03b258e47e50dc6cf2dea34169221731.tar.gz freebsd-ports-gnome-b114d1ed03b258e47e50dc6cf2dea34169221731.tar.zst freebsd-ports-gnome-b114d1ed03b258e47e50dc6cf2dea34169221731.zip |
Fix incorrect reference to ETCSSH from r381709
Diffstat (limited to 'security/openssh-portable')
-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 |