Skip to contentSkip to conversation

package/freerdp: fix a comment

PATCH New Yann E. MORIN 2 participants 3 messages Feb 22, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 package/freerdp: fix a comment

---
 package/freerdp/freerdp.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
package/freerdp/freerdp.mk +1 -1
index 37568c0..50b8f18 100644
@@ -176,6 +176,6 @@ else # ! SERVER && ! CLIENT
 
 FREERDP_CONF_OPTS += -DWITH_X11=OFF
 
-endif # ! USES_XLIBS
+endif # ! SERVER && ! CLIENT
 
 $(eval $(cmake-package))
Signature · 1 line
1.9.1
#1 lore raw

PATCH 2/2 package/freerdp: Always install key and certificate

Currently, the keys are only installed if the server is enabled.

However, other packages (e.g. weston) may implement an RDP server, using the FreeRDP library.

So, we must always install the key and certificate.

Install them world-readable so non-root users may start an RDP server without requiring to generate their own keys.

Add a comment in the help text about key and certificate management.

---
 package/freerdp/Config.in  |  6 ++++++
 package/freerdp/freerdp.mk | 23 ++++++++++++++---------
 2 files changed, 20 insertions(+), 9 deletions(-)
package/freerdp/Config.in +6 -0
index 47fd8be..1c203c7 100644
@@ -10,6 +10,12 @@ config BR2_PACKAGE_FREERDP
 
 	  http://www.freerdp.com/
 
+	  Note: this also installs a key and certificate in
+	  /etc/freerdp/keys/ . These are publicly-known, as they
+	  are present in FreeRDP's source tree. It is strongly
+	  suggested that you overwrite them with your own set,
+	  either in an overlay rootfs or in a post-build script.
+
 if BR2_PACKAGE_FREERDP
 
 config BR2_PACKAGE_FREERDP_SERVER
package/freerdp/freerdp.mk +14 -9
index 50b8f18..f73bdd7 100644
@@ -71,15 +71,6 @@ endif
 
 ifeq ($(BR2_PACKAGE_FREERDP_SERVER),y)
 FREERDP_CONF_OPTS += -DWITH_SERVER=ON -DWITH_SERVER_INTERFACE=ON
-# Install the server key and certificate, so that a client can connect.
-# A user can override them with its own in a post-build script, if needed.
-define FREERDP_INSTALL_KEYS
-	$(INSTALL) -D $(@D)/server/X11/server.key \
-		      $(TARGET_DIR)/etc/freerdp/keys/server.key
-	$(INSTALL) -D $(@D)/server/X11/server.crt \
-		      $(TARGET_DIR)/etc/freerdp/keys/server.crt
-endef
-FREERDP_POST_INSTALL_TARGET_HOOKS += FREERDP_INSTALL_KEYS
 else
 FREERDP_CONF_OPTS += -DWITH_SERVER=OFF -DWITH_SERVER_INTERFACE=OFF
 endif
@@ -178,4 +169,18 @@ FREERDP_CONF_OPTS += -DWITH_X11=OFF
 
 endif # ! SERVER && ! CLIENT
 
+# Install the server key and certificate, so that a client can connect.
+# A user can override them with its own in a post-build script, if needed.
+# We install them even if the server is not enabled, since another server
+# can be built and linked with libfreerdp (e.g. weston with the  RDP
+# backend). Key and cert are installed world-readable, so non-root users
+# can start a server.
+define FREERDP_INSTALL_KEYS
+	$(INSTALL) -m 0644 -D $(@D)/server/X11/server.key \
+		      $(TARGET_DIR)/etc/freerdp/keys/server.key
+	$(INSTALL) -m 0644 -D $(@D)/server/X11/server.crt \
+		      $(TARGET_DIR)/etc/freerdp/keys/server.crt
+endef
+FREERDP_POST_INSTALL_TARGET_HOOKS += FREERDP_INSTALL_KEYS
+
 $(eval $(cmake-package))
Signature · 1 line
1.9.1
#2 lore raw

PATCH 1/2 package/freerdp: fix a comment

In reply to Yann E. MORIN

Dear Yann E. MORIN,

Quoted 5 lines · Yann E. MORIN
---
 package/freerdp/freerdp.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Both applied to next, thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com