This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch release/4.0.1.x in repository x2goserver. commit 6232fbb825df7e1538ab1f1ab42fec5b02c50a55 Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Date: Sun Jun 29 00:18:07 2014 +0200 Provide support for client-side choice of clipboard security. (Fixes: #524). --- debian/changelog | 2 ++ x2goserver/bin/x2goresume-session | 11 ++++++++++- x2goserver/bin/x2gostartagent | 9 +++++++-- x2goserver/share/x2gofeature.d/x2goserver.features | 1 + 4 files changed, 20 insertions(+), 3 deletions(-) diff --git a/debian/changelog b/debian/changelog index ec15d3d..4384a31 100644 --- a/debian/changelog +++ b/debian/changelog @@ -46,6 +46,8 @@ x2goserver (4.0.1.16-0x2go1) UNRELEASED; urgency=low - Don't die if no session state file is found, as it will break X2Go completely after upgrading from versions << 4.0.1.16 if sessions are still running/suspended during package upgrade. + - Provide support for client-side choice of clipboard security. (Fixes: + #524). * debian/control, x2goserver.spec: + Update versioned D: x2goagent (>= 3.5.0.25). This assures that X2Go works with poly-instantiated /tmp directories. diff --git a/x2goserver/bin/x2goresume-session b/x2goserver/bin/x2goresume-session index b25e2be..8f91aef 100755 --- a/x2goserver/bin/x2goresume-session +++ b/x2goserver/bin/x2goresume-session @@ -33,6 +33,7 @@ X2GO_PACK="$4" X2GO_KBD_LAYOUT="$5" X2GO_KBD_TYPE="$6" X2GO_SET_KBD="$7" +X2GO_CLIPBOARD="$8" X2GO_LIB_PATH="$(x2gopath libexec)"; X2GO_AGENT_PID=`$X2GO_LIB_PATH/x2gogetagent "$SESSION_NAME"` @@ -186,10 +187,12 @@ if [ -n "$test_GSTR" ]; then RSTR=`echo "$OPTIONS" | awk -F, {'print $13'}` FSTR=`echo "$OPTIONS" | awk -F, {'print $14'}` LISTSTR=`echo "$OPTIONS" | awk -F, {'print $16'}` + CLIPBOARD=`echo "$OPTIONS" | awk -F, {'print $17'}` else RSTR=`echo "$OPTIONS" | awk -F, {'print $14'}` FSTR=`echo "$OPTIONS" | awk -F, {'print $15'}` LISTSTR=`echo "$OPTIONS" | awk -F, {'print $17'}` + CLIPBOARD=`echo "$OPTIONS" | awk -F, {'print $18'}` fi KTSTR=`echo "$KTSTR" | sed "s/\//\\\\\\\\\//"` @@ -201,13 +204,19 @@ else keyboard_type="$X2GO_KBD_TYPE" fi +if [ -n "$X2GO_CLIPBOARD" ] && [ -z "`echo $X2GO_CLIPBOARD | sed -re 's/(0|none|client|server|both|1)//'`" ]; then + clipboard="clipboard=$X2GO_CLIPBOARD" +fi + NEWOPTIONS=`echo "$OPTIONS" | sed -e "s/$LSTR/link=$X2GO_LINK/"\ -e "s/$PSTR/pack=$X2GO_PACK/"\ -e "s/$KTSTR/kbtype=$keyboard_type/"\ -e "s/$GSTR/geometry=$X2GO_GEOMETRY/"\ -e "s/$RSTR/resize=$X2GO_RESIZE/"\ -e "s/$LISTSTR/listen=$GR_PORT/"\ - -e "s/$FSTR/fullscreen=$X2GO_FULLSCREEN/"` + -e "s/$FSTR/fullscreen=$X2GO_FULLSCREEN/" \ + -e "s/$CLIPBOARD/$clipboard/" \ +` if [ -z "$X2GO_GEOMETRY" ] || [ "$X2GO_GEOMETRY" == "fullscreen" ]; then NEWOPTIONS=`echo $NEWOPTIONS | sed -e "s/geometry=${X2GO_GEOMETRY},//"` diff --git a/x2goserver/bin/x2gostartagent b/x2goserver/bin/x2gostartagent index ce89317..fbcfd7b 100755 --- a/x2goserver/bin/x2gostartagent +++ b/x2goserver/bin/x2gostartagent @@ -59,6 +59,7 @@ X2GO_KBD_TYPE="$1"; shift X2GO_SET_KBD="$1"; shift X2GO_STYPE="$1"; shift X2GO_CMD="$1"; shift +X2GO_CLIPBOARD="$1"; shift X2GO_RESIZE=1 X2GO_FULLSCREEN=0 @@ -268,10 +269,14 @@ if [ -n "$X2GO_GEOMETRY" ] && [ "$X2GO_GEOMETRY" != "fullscreen" ]; then option_geometry="geometry=${X2GO_GEOMETRY}," fi +if [ -n "$X2GO_CLIPBOARD" ] && [ -z "`echo $X2GO_CLIPBOARD | sed -re 's/(0|none|client|server|both|1)//'`" ]; then + clipboard=",clipboard=$X2GO_CLIPBOARD" +fi + if [ "$X2GO_SET_KBD" == "0" ] || [ "$X2GO_KBD_TYPE" == "auto" ];then - X2GO_HOST="nx/nx,link=${X2GO_LINK},pack=${X2GO_PACK},limit=0,root=${SESSION_DIR},cache=8M,images=32M,type=${X2GO_TYPE},id=${SESSION_NAME},cookie=$X2GO_COOKIE,errors=${SESSION_LOG},kbtype=null/null,${option_geometry}resize=${X2GO_RESIZE},fullscreen=${X2GO_FULLSCREEN},accept=${REMOTE},listen=${GR_PORT},client=linux,menu=0,state=${STATE_FILE}" + X2GO_HOST="nx/nx,link=${X2GO_LINK},pack=${X2GO_PACK},limit=0,root=${SESSION_DIR},cache=8M,images=32M,type=${X2GO_TYPE},id=${SESSION_NAME},cookie=$X2GO_COOKIE,errors=${SESSION_LOG},kbtype=null/null,${option_geometry}resize=${X2GO_RESIZE},fullscreen=${X2GO_FULLSCREEN},accept=${REMOTE},listen=${GR_PORT}${clipboard},client=linux,menu=0,state=${STATE_FILE}," else - X2GO_HOST="nx/nx,link=${X2GO_LINK},pack=${X2GO_PACK},limit=0,root=${SESSION_DIR},cache=8M,images=32M,type=${X2GO_TYPE},id=${SESSION_NAME},cookie=$X2GO_COOKIE,errors=${SESSION_LOG},kbtype=${X2GO_KBD_TYPE},${option_geometry}resize=${X2GO_RESIZE},fullscreen=${X2GO_FULLSCREEN},accept=${REMOTE},listen=${GR_PORT},client=linux,menu=0,state=${STATE_FILE}" + X2GO_HOST="nx/nx,link=${X2GO_LINK},pack=${X2GO_PACK},limit=0,root=${SESSION_DIR},cache=8M,images=32M,type=${X2GO_TYPE},id=${SESSION_NAME},cookie=$X2GO_COOKIE,errors=${SESSION_LOG},kbtype=${X2GO_KBD_TYPE},${option_geometry}resize=${X2GO_RESIZE},fullscreen=${X2GO_FULLSCREEN},accept=${REMOTE},listen=${GR_PORT}${clipboard},client=linux,menu=0,state=${STATE_FILE},${clipboard}" fi diff --git a/x2goserver/share/x2gofeature.d/x2goserver.features b/x2goserver/share/x2gofeature.d/x2goserver.features index 12cea35..f917977 100755 --- a/x2goserver/share/x2gofeature.d/x2goserver.features +++ b/x2goserver/share/x2gofeature.d/x2goserver.features @@ -37,6 +37,7 @@ case "$X2GO_FEATURE" in "X2GO_SERVERSIDE_DESKTOPCOMMANDS") echo "ok"; exit 0;; "X2GO_SET_KEYBOARD") echo "ok"; exit 0;; "X2GO_MOUNT_UNCPATHS") echo "ok"; exit 0;; + "X2GO_CLIPBOARD_MODES") echo "ok"; exit 0;; *) exit -1;; esac -- Alioth's /srv/git/_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goserver.git