diff options
author | glarkin <glarkin@FreeBSD.org> | 2010-01-19 22:52:14 +0800 |
---|---|---|
committer | glarkin <glarkin@FreeBSD.org> | 2010-01-19 22:52:14 +0800 |
commit | 341c375ec65e8bee313de147242c76442c57b33b (patch) | |
tree | 0702316b93579f7b3697080fe72b5210f968d1d2 /security | |
parent | 7f679ff83c9daf617ca266dce27407d20db062ba (diff) | |
download | freebsd-ports-gnome-341c375ec65e8bee313de147242c76442c57b33b.tar.gz freebsd-ports-gnome-341c375ec65e8bee313de147242c76442c57b33b.tar.zst freebsd-ports-gnome-341c375ec65e8bee313de147242c76442c57b33b.zip |
Provide a fast way to delete entries from OpenSSH's known_hosts
file. This is a simple automation of the things normally done by
the user when having an "offending key" in his/her known_hosts file
caused by a changing host key of the destination.
WWW: http://unssh.sourceforge.net/
PR: ports/137254
Submitted by: Dax Labrador <semprix at bsdmail.org>
Diffstat (limited to 'security')
-rw-r--r-- | security/Makefile | 1 | ||||
-rw-r--r-- | security/unssh/Makefile | 35 | ||||
-rw-r--r-- | security/unssh/distinfo | 3 | ||||
-rw-r--r-- | security/unssh/files/extra-patch-unssh.sh.in | 26 | ||||
-rw-r--r-- | security/unssh/pkg-descr | 6 |
5 files changed, 71 insertions, 0 deletions
diff --git a/security/Makefile b/security/Makefile index d80fa5815285..2b0ccc431c09 100644 --- a/security/Makefile +++ b/security/Makefile @@ -840,6 +840,7 @@ SUBDIR += umit SUBDIR += unhide SUBDIR += unicornscan + SUBDIR += unssh SUBDIR += vida SUBDIR += vinetto SUBDIR += vlock diff --git a/security/unssh/Makefile b/security/unssh/Makefile new file mode 100644 index 000000000000..df012d93cc92 --- /dev/null +++ b/security/unssh/Makefile @@ -0,0 +1,35 @@ +# New ports collection makefile for: unssh +# Date created: 30 July 2009 +# Whom: Dax Labrador <semprix@bsdmail.org> +# +# $FreeBSD$ +# + +PORTNAME= unssh +PORTVERSION= 1.4 +CATEGORIES= security +MASTER_SITES= SF +MASTER_SITE_SUBDIR= ${PORTNAME:L}/${PORTNAME:L}/${PORTNAME:L}-${PORTVERSION} + +MAINTAINER= semprix@bsdmail.org +COMMENT= Fast way to delete entries from OpenSSH known_hosts file + +RUN_DEPENDS= bash:${PORTSDIR}/shells/bash + +NO_BUILD= yes +PLIST_FILES= bin/unssh + +PATCH_LIST= extra-patch-unssh.sh +EXTRA_PATCHES= ${PATCH_LIST:C|^|${WRKDIR}/|g} + +pre-patch: +.for patch in ${PATCH_LIST} + @${SED} ${_SUB_LIST_TEMP} ${FILESDIR}/${patch}.in > ${WRKDIR}/${patch} +.endfor + +do-install: + @${INSTALL} -d ${PREFIX}/bin + @${CP} ${WRKSRC}/unssh.sh ${PREFIX}/bin/unssh + @${CHMOD} ${BINMODE} ${PREFIX}/bin/unssh + +.include <bsd.port.mk> diff --git a/security/unssh/distinfo b/security/unssh/distinfo new file mode 100644 index 000000000000..a6441c28f935 --- /dev/null +++ b/security/unssh/distinfo @@ -0,0 +1,3 @@ +MD5 (unssh-1.4.tar.gz) = c5045e0420a4ac81f53499f59e071915 +SHA256 (unssh-1.4.tar.gz) = 8252d0818d044452241a279031a903634b983cf94e4671e32f4df5a754f686f2 +SIZE (unssh-1.4.tar.gz) = 11381 diff --git a/security/unssh/files/extra-patch-unssh.sh.in b/security/unssh/files/extra-patch-unssh.sh.in new file mode 100644 index 000000000000..1fa941866a5e --- /dev/null +++ b/security/unssh/files/extra-patch-unssh.sh.in @@ -0,0 +1,26 @@ +--- ./unssh.sh.orig 2009-07-12 19:31:45.000000000 -0400 ++++ ./unssh.sh 2010-01-18 17:57:11.000000000 -0500 +@@ -1,4 +1,4 @@ +-#!/bin/bash ++#!%%LOCALBASE%%/bin/bash + # This simple script helps deleting hosts from the user's known_hosts + # file when their pubkey has changed. + # Copyright (C) 2006-2009 by Phil Sutter <phil@nwl.cc> +@@ -52,7 +52,7 @@ + return $1 + } + search_in_sshcnf() { # (expr) +- grep -qi "^host $1$" $SSH_CNF || return 1 ++ grep -qi "^host $1$" $SSH_CNF >/dev/null 2>&1 || return 1 + # the code below calls awk in three steps: + # * filter empty and commented out lines + # * divide content into records containing a single "Host" definition +@@ -107,7 +107,7 @@ + name="$1" + fi + # does a host lookup to get the corresponding IP/hostname +- eval "$(hostx "$name" 2>&1 | \ ++ eval "$(nslookup "$name" 2>&1 | \ + awk '/exist/{exit 1} \ + /Name:/{print "LU_HOST="$2} \ + /Address:/{print "LU_IP="$2} \ diff --git a/security/unssh/pkg-descr b/security/unssh/pkg-descr new file mode 100644 index 000000000000..538d75f12adb --- /dev/null +++ b/security/unssh/pkg-descr @@ -0,0 +1,6 @@ +Provide a fast way to delete entries from OpenSSH's known_hosts +file. This is a simple automation of the things normally done by +the user when having an "offending key" in his/her known_hosts file +caused by a changing host key of the destination. + +WWW: http://unssh.sourceforge.net/ |