SPECS: amanda.spec - rel 3 - build secure client ssh pub key

baggins baggins at pld-linux.org
Wed May 14 15:11:08 CEST 2008


Author: baggins                      Date: Wed May 14 13:11:08 2008 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- rel 3
- build secure client ssh pub key

---- Files affected:
SPECS:
   amanda.spec (1.171 -> 1.172) 

---- Diffs:

================================================================
Index: SPECS/amanda.spec
diff -u SPECS/amanda.spec:1.171 SPECS/amanda.spec:1.172
--- SPECS/amanda.spec:1.171	Tue May 13 11:43:40 2008
+++ SPECS/amanda.spec	Wed May 14 15:11:03 2008
@@ -10,7 +10,7 @@
 Summary(pl.UTF-8):	Sieciowo zorientowany system tworzenia kopii zapasowych
 Name:		amanda
 Version:	2.6.0
-Release:	2
+Release:	3
 License:	BSD
 Group:		Networking/Utilities
 Source0:	http://dl.sourceforge.net/amanda/%{name}-%{version}.tar.gz
@@ -298,6 +298,7 @@
 %service -q rc-inetd reload
 if [ ! -e /var/lib/amanda/.ssh/id_rsa_amrecover ] ; then
 	HOST="`/bin/hostname`"
+	FQDNHOST="`/bin/hostname -f`"
 	if [ -z "$HOST" ] ; then
 		COMMENT="root at client"
 	else
@@ -306,6 +307,13 @@
 	/usr/bin/ssh-keygen -t rsa -C $COMMENT -f /var/lib/amanda/.ssh/id_rsa_amrecover -N "" || :
 	chown amanda:amanda /var/lib/amanda/.ssh/id_rsa_amrecover{,.pub} || :
 	chmod 600 /var/lib/amanda/.ssh/id_rsa_amrecover{,.pub} || :
+	if [ -n "$FQDNHOST" ]; then
+		echo -n "from=\"$FQDNHOST\",no-port-forwarding,no-X11-forwarding,no-agent-forwarding,command=\"%{_ulibdir}/amanda/amandad -auth=ssh amindexd amidxtaped\" " >/var/lib/amanda/.ssh/server_authorized_keys
+		cat /var/lib/amanda/.ssh/id_rsa_amrecover.pub >>/var/lib/amanda/.ssh/server_authorized_keys
+
+		echo "Remember to copy the contents of /var/lib/amanda/.ssh/server_authorized_keys to"
+		echo "/var/lib/amanda/.ssh/authorized_keys on amanda server"
+	fi
 fi
 
 %postun client
@@ -547,6 +555,10 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.172  2008-05-14 13:11:03  baggins
+- rel 3
+- build secure client ssh pub key
+
 Revision 1.171  2008-05-13 09:43:40  baggins
 - fix heimdal kerberos case
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SPECS/amanda.spec?r1=1.171&r2=1.172&f=u



More information about the pld-cvs-commit mailing list