From 92b2b3565187b5954caf48c2a52e8651e6c844e7 Mon Sep 17 00:00:00 2001 From: Daniel Berteaud Date: Sat, 8 Dec 2018 11:41:08 +0100 Subject: [PATCH] Fix settings logic (need both the SET_ and the VALUE_OF_) --- WAPT/control | 2 +- setup.py | 26 ++++++++++++++++++++------ 2 files changed, 21 insertions(+), 7 deletions(-) diff --git a/WAPT/control b/WAPT/control index 8aab92e..3a7575d 100644 --- a/WAPT/control +++ b/WAPT/control @@ -1,5 +1,5 @@ package : fws-tightvnc-server -version : 2.8.11-1 +version : 2.8.11-2 architecture : all section : base priority : optional diff --git a/setup.py b/setup.py index 735b7ab..61199d0 100644 --- a/setup.py +++ b/setup.py @@ -28,19 +28,33 @@ def install(): props = { 'ADDLOCAL': 'Server', - 'SET_ACCEPTHTTPCONNECTIONS': 0, - 'SET_LOGLEVEL': 3, - 'SET_REMOVEWALLPAPER': 0 + 'SET_ACCEPTHTTPCONNECTIONS': 1, + 'VALUE_OF_ACCEPTHTTPCONNECTIONS': 0, + 'SET_ACCEPTRFBCONNECTIONS': 1, + 'VALUE_OF_ACCEPTRFBCONNECTIONS': 1, + 'SET_LOGLEVEL': 1, + 'VALUE_OF_LOGLEVEL': 3, + 'SET_REMOVEWALLPAPER': 1, + 'VALUE_OF_REMOVEWALLPAPER': 0 } if 'vnc_allowed_ip' in variables: - props['SET_IPACCESSCONTROL'] =','.join( '%s-%s:0' % (ip,ip) if not re.search('\-',ip) else '%s:0' % ip for ip in ensure_list(variables['vnc_allowed_ip']) ) + print('Access will be restricted to %s' % ','.join(variables['vnc_allowed_ip'])) + props['SET_IPACCESSCONTROL'] = 1, + props['VALUE_OF_IPACCESSCONTROL'] = ','.join( '%s-%s:0' % (ip,ip) if not re.search('\-',ip) else '%s:0' % ip for ip in ensure_list(variables['vnc_allowed_ip']) ) if 'vnc_pass' in variables: - props['SET_PASSWORD'] = variables['vnc_pass'] + print('Setting VNC password') + props['SET_USEVNCAUTHENTICATION'] = 1 + props['VALUE_OF_USEVNCAUTHENTICATION'] = 1 + props['SET_PASSWORD'] = 1 + props['VALUE_OF_PASSWORD'] = variables['vnc_pass'] props['SET_USEVNCAUTHENTICATION'] = 1 if 'vnc_admin_pass' in variables: - props['SET_CONTROLPASSWORD'] = variables['vnc_admin_pass'] + print('Setting VNC control password') props['SET_USECONTROLAUTHENTICATION'] = 1 + props['VALUE_OF_USECONTROLAUTHENTICATION'] = 1 + props['SET_CONTROLPASSWORD'] = 1 + props['VALUE_OF_CONTROLPASSWORD'] = variables['vnc_admin_pass'] install_msi_if_needed(msi,min_version=version,properties=props) \ No newline at end of file