Bug 174721 - [maintainer-update] net/xrdp: fix install-time RSA key generation
Summary: [maintainer-update] net/xrdp: fix install-time RSA key generation
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Steve Wills
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-12-26 18:20 UTC by Koichiro Iwao
Modified: 2013-01-09 07:00 UTC (History)
0 users

See Also:


Attachments
file.diff (1.72 KB, patch)
2012-12-26 18:20 UTC, Koichiro Iwao
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Koichiro Iwao freebsd_committer 2012-12-26 18:20:00 UTC
My previous PR ports/173566 doesn't properly generate RSA key.

- Fix install time RSA key pair generation

Fix: Patch attached with submission follows:
Comment 1 Edwin Groothuis freebsd_committer 2012-12-26 18:20:09 UTC
Responsible Changed
From-To: freebsd-ports-bugs->swills

swills@ wants this submitter's PRs (via the GNATS Auto Assign Tool)
Comment 2 Steve Wills freebsd_committer 2013-01-09 06:51:32 UTC
State Changed
From-To: open->closed

Committed. Thanks!
Comment 3 dfilter service freebsd_committer 2013-01-09 06:51:32 UTC
Author: swills
Date: Wed Jan  9 06:51:24 2013
New Revision: 310124
URL: http://svnweb.freebsd.org/changeset/ports/310124

Log:
  - Fix install time RSA key pair generation
  
  PR:		ports/174721
  Submitted by:	Koichiro IWAO <meta+ports@vmeta.jp> (maintainer)

Modified:
  head/net/xrdp/Makefile
  head/net/xrdp/pkg-plist

Modified: head/net/xrdp/Makefile
==============================================================================
--- head/net/xrdp/Makefile	Wed Jan  9 04:21:34 2013	(r310123)
+++ head/net/xrdp/Makefile	Wed Jan  9 06:51:24 2013	(r310124)
@@ -3,7 +3,7 @@
 
 PORTNAME=	xrdp
 PORTVERSION=	0.6.0
-PORTREVISION=	1
+PORTREVISION=	2
 PORTEPOCH=	1
 CATEGORIES=	net
 MASTER_SITES=	SF/xrdp/xrdp/${PORTVERSION}
@@ -76,8 +76,8 @@ post-install:
 		${CP} -p ${PREFIX}/etc/xrdp/$f.sample ${PREFIX}/etc/xrdp/$f ; \
 	fi
 .endfor
-	@cmp -s ${PREFIX}/etc/xrdp/rsakeys.ini.sample ${PREFIX}/etc/xrdp/rsakeys.ini || \
-		${PREFIX}/bin/xrdp-keygen xrdp ${PREFIX}/etc/xrdp/rsakeys.ini
+	@if cmp -s ${PREFIX}/etc/xrdp/rsakeys.ini.sample ${PREFIX}/etc/xrdp/rsakeys.ini; then \
+		${PREFIX}/bin/xrdp-keygen xrdp ${PREFIX}/etc/xrdp/rsakeys.ini; fi
 	@${ECHO_CMD}; ${CAT} ${PKGMESSAGE}; ${ECHO_CMD}
 
 .include <bsd.port.mk>

Modified: head/net/xrdp/pkg-plist
==============================================================================
--- head/net/xrdp/pkg-plist	Wed Jan  9 04:21:34 2013	(r310123)
+++ head/net/xrdp/pkg-plist	Wed Jan  9 06:51:24 2013	(r310124)
@@ -52,7 +52,8 @@ etc/xrdp/rsakeys.ini.sample
 etc/xrdp/sesman.ini.sample
 etc/xrdp/startwm.sh.sample
 etc/xrdp/xrdp.ini.sample
-@exec cmp -s %D/etc/xrdp/rsakeys.ini.sample %D/etc/xrdp/rsakeys.ini || %D/bin/xrdp-keygen xrdp %D/etc/xrdp/rsakeys.ini
+@comment backup pre-compile-time keypair and generate new one
+@exec if [ -f %D/etc/xrdp/rsakeys.ini ]; then cp -a %D/etc/xrdp/rsakeys.ini %D/etc/xrdp/rsakeys.ini.bak`date +%%Y%%m%%d`; %D/bin/xrdp-keygen xrdp %D/etc/xrdp/rsakeys.ini; fi
 @exec [ -f %D/etc/xrdp/sesman.ini ] || cp -p %D/etc/xrdp/sesman.ini.sample %D/etc/xrdp/sesman.ini
 @exec [ -f %D/etc/xrdp/startwm.sh ] || cp -p %D/etc/xrdp/startwm.sh.sample %D/etc/xrdp/startwm.sh
 @exec [ -f %D/etc/xrdp/xrdp.ini ] || cp -p %D/etc/xrdp/xrdp.ini.sample %D/etc/xrdp/xrdp.ini
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"