diff --git a/actor/linux/build-packages.sh b/actor/linux/build-packages.sh index 1a3ef85b..c3c8aeb6 100755 --- a/actor/linux/build-packages.sh +++ b/actor/linux/build-packages.sh @@ -11,6 +11,9 @@ dpkg-buildpackage -b cat udsactor-template.spec | sed -e s/"version 0.0.0"/"version ${VERSION}"/g | sed -e s/"release 1"/"release ${RELEASE}"/g > udsactor-$VERSION.spec +cat udsactor-unmanaged-template.spec | + sed -e s/"version 0.0.0"/"version ${VERSION}"/g | + sed -e s/"release 1"/"release ${RELEASE}"/g > udsactor-unmanaged-$VERSION.spec # Now fix dependencies for opensuse # Note that, although on opensuse the library is "libXss1" on newer, @@ -22,7 +25,7 @@ cat udsactor-template.spec | # sed -e s/"libXScrnSaver"/"libXss1"/g > udsactor-opensuse-$VERSION.spec #for pkg in udsactor-$VERSION.spec udsactor-opensuse-$VERSION.spec; do -for pkg in udsactor-$VERSION.spec; do +for pkg in udsactor-*$VERSION.spec; do rm -rf rpm for folder in SOURCES BUILD RPMS SPECS SRPMS; do diff --git a/actor/linux/debian/changelog b/actor/linux/debian/changelog index 2181da93..4aacffeb 100644 --- a/actor/linux/debian/changelog +++ b/actor/linux/debian/changelog @@ -2,7 +2,13 @@ udsactor (4.0.0) stable; urgency=medium * Upgraded to 4.0.0 release - -- Adolfo Gómez García Mon, 5 Oct 2021 12:54:18 +0200 + -- Adolfo Gómez García Fri, 1 Jul 2022 15:00:00 +0200 + +udsactor (3.6.0) stable; urgency=medium + + * Upgraded to 3.6.0 release + + -- Adolfo Gómez García Fri, 1 Jul 2022 14:00:00 +0200 udsactor (3.5.0) stable; urgency=medium diff --git a/actor/linux/debian/files b/actor/linux/debian/files index 3274252a..f23b0ee6 100644 --- a/actor/linux/debian/files +++ b/actor/linux/debian/files @@ -1,3 +1,3 @@ -udsactor-unmanaged_3.5.0_all.deb admin optional -udsactor_3.5.0_all.deb admin optional -udsactor_3.5.0_amd64.buildinfo admin optional +udsactor-unmanaged_3.6.0_all.deb admin optional +udsactor_3.6.0_all.deb admin optional +udsactor_3.6.0_amd64.buildinfo admin optional diff --git a/actor/linux/udsactor-unmanaged-template.spec b/actor/linux/udsactor-unmanaged-template.spec new file mode 100644 index 00000000..77ec885e --- /dev/null +++ b/actor/linux/udsactor-unmanaged-template.spec @@ -0,0 +1,70 @@ +%define _topdir %(echo $PWD)/rpm +%define name udsactor-unmanaged +%define version 0.0.0 +%define release 1 +%define buildroot %{_topdir}/%{name}-%{version}-%{release}-root + +BuildRoot: %{buildroot} +Name: %{name} +Version: %{version} +Release: %{release} +Summary: Actor for Universal Desktop Services (UDS) Broker +License: BSD3 +Group: Admin +Requires: python3-six python3-requests python3-qt5 libXScrnSaver +Vendor: Virtual Cable S.L.U. +URL: http://www.udsenterprise.com +Provides: udsactor + +%define _rpmdir ../ +%define _rpmfilename %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm + + +%install +curdir=`pwd` +cd ../.. +make DESTDIR=$RPM_BUILD_ROOT DISTRO=rh install-udsactor-unmanaged +cd $curdir + +%clean +rm -rf $RPM_BUILD_ROOT +curdir=`pwd` +cd ../.. +make DESTDIR=$RPM_BUILD_ROOT DISTRO=rh clean +cd $curdir + + +%post +systemctl enable udsactor.service > /dev/null 2>&1 + +%preun +systemctl disable udsactor.service > /dev/null 2>&1 +systemctl stop udsactor.service > /dev/null 2>&1 + +%postun +# $1 == 0 on uninstall, == 1 on upgrade for preun and postun (just a reminder for me... :) ) +if [ $1 -eq 0 ]; then + rm -rf /etc/udsactor + rm /var/log/udsactor.log +fi +# And, posibly, the .pyc leaved behind on /usr/share/UDSActor +rm -rf /usr/share/UDSActor > /dev/null 2>&1 + +%description +This package provides the required components to allow this unmanaged machine to work on an environment managed by UDS Broker. + +%files +%defattr(-,root,root) +/etc/udsactor +/etc/xdg/autostart/UDSActorTool.desktop +/etc/systemd/system/udsactor.service +/usr/bin/UDSActorTool-startup +/usr/bin/udsactor +/usr/bin/udsvapp +/usr/bin/UDSActorTool +/usr/sbin/UDSActorConfig +/usr/sbin/UDSActorConfig-pkexec +/usr/share/UDSActor/* +/usr/share/applications/UDS_Actor_Configuration.desktop +/usr/share/autostart/UDSActorTool.desktop +/usr/share/polkit-1/actions/org.openuds.pkexec.UDSActorConfig.policy diff --git a/actor/src/udsactor/__init__.py b/actor/src/udsactor/__init__.py index 630f9f4d..259aaa00 100644 --- a/actor/src/udsactor/__init__.py +++ b/actor/src/udsactor/__init__.py @@ -35,4 +35,4 @@ from . import platform __title__ = 'udsactor' __author__ = 'Adolfo Gómez ' __license__ = "BSD 3-clause" -__copyright__ = "Copyright 2014-2020 VirtualCable S.L.U." +__copyright__ = "Copyright 2014-2022 VirtualCable S.L.U." diff --git a/client-py3/full/linux/debian/changelog b/client-py3/full/linux/debian/changelog index 106eb4ec..f6a93f54 100644 --- a/client-py3/full/linux/debian/changelog +++ b/client-py3/full/linux/debian/changelog @@ -2,7 +2,13 @@ udsclient3 (4.0.0) stable; urgency=medium * Upgraded to 4.0.0 release - -- Adolfo Gómez García Mon, 5 Oct 2021 12:54:18 +0200 + -- Adolfo Gómez García Fri, 1 Jul 2022 15:12:10 +0200 + +udsclient3 (4.0.0) stable; urgency=medium + + * Upgraded to 3.6.0 release + + -- Adolfo Gómez García Fri, 1 Jul 2022 14:12:10 +0200 udsclient3 (3.5.0) stable; urgency=medium diff --git a/client-py3/full/src/uds/__init__.py b/client-py3/full/src/uds/__init__.py index 7a2581c1..05deffba 100644 --- a/client-py3/full/src/uds/__init__.py +++ b/client-py3/full/src/uds/__init__.py @@ -29,13 +29,11 @@ ''' @author: Adolfo Gómez, dkmaster at dkmon dot com ''' -from __future__ import unicode_literals - -VERSION = '3.5.0' +VERSION = '3.6.0' __title__ = 'udclient' __version__ = VERSION -__build__ = 0x010760 -__author__ = 'Adolfo Gómez' +__build__ = 0x010712 +__author__ = 'Adolfo Gómez ' __license__ = "BSD 3-clause" -__copyright__ = "Copyright 2014-2017 VirtualCable S.L.U." +__copyright__ = "Copyright 2014-2022 VirtualCable S.L.U." diff --git a/client-py3/full/src/uds/tunnel.py b/client-py3/full/src/uds/tunnel.py index 8716b744..75d60bd3 100644 --- a/client-py3/full/src/uds/tunnel.py +++ b/client-py3/full/src/uds/tunnel.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # -# Copyright (c) 2021 Virtual Cable S.L.U. +# Copyright (c) 2022 Virtual Cable S.L.U. # All rights reserved. # # Redistribution and use in source and binary forms, with or without modification, diff --git a/server/src/uds/core/mfas/mfa.py b/server/src/uds/core/mfas/mfa.py index 6fe3838f..6d1fd420 100644 --- a/server/src/uds/core/mfas/mfa.py +++ b/server/src/uds/core/mfas/mfa.py @@ -160,7 +160,7 @@ class MFA(Module): try: if data and validity: # if we have a stored code, check if it's still valid - if data[0] + datetime.timedelta(seconds=validity) < getSqlDatetime(): + if data[0] + datetime.timedelta(seconds=validity) > getSqlDatetime(): # if it's still valid, just return without sending a new one return MFA.RESULT.OK except Exception: @@ -189,8 +189,10 @@ class MFA(Module): data = self.storage.getPickle(storageKey) if data and len(data) == 2: validity = validity if validity is not None else self.validity() * 60 - if validity and data[0] + datetime.timedelta(seconds=validity) > getSqlDatetime(): + if validity > 0 and data[0] + datetime.timedelta(seconds=validity) < getSqlDatetime(): # if it is no more valid, raise an error + # Remove stored code and raise error + self.storage.remove(storageKey) raise exceptions.MFAError('MFA Code expired') # Check if the code is valid diff --git a/server/src/uds/mfas/Email/mfa.py b/server/src/uds/mfas/Email/mfa.py index 6b98dbbc..4ab15833 100644 --- a/server/src/uds/mfas/Email/mfa.py +++ b/server/src/uds/mfas/Email/mfa.py @@ -41,11 +41,11 @@ class EmailMFA(mfas.MFA): security = gui.ChoiceField( label=_('Security'), tooltip=_('Security protocol to use'), - values=[ - gui.choiceItem('tls', _('TLS')), - gui.choiceItem('ssl', _('SSL')), - gui.choiceItem('none', _('None')), - ], + values={ + 'tls': _('TLS'), + 'ssl': _('SSL'), + 'none': _('None'), + }, order=2, required=True, tab=_('SMTP Server'), diff --git a/server/src/uds/transports/HTML5RDP/html5rdp.py b/server/src/uds/transports/HTML5RDP/html5rdp.py index d719f393..30ff8f9e 100644 --- a/server/src/uds/transports/HTML5RDP/html5rdp.py +++ b/server/src/uds/transports/HTML5RDP/html5rdp.py @@ -455,7 +455,7 @@ class HTML5RDPTransport(transports.Transport): 'create-drive-path': 'true', 'ticket-info': { 'userService': userService.uuid, - 'user': userService.user.uuid, + 'user': userService.user.uuid if userService.user else '', }, } @@ -499,12 +499,11 @@ class HTML5RDPTransport(transports.Transport): ticket = models.TicketStore.create(params, validity=self.ticketValidity.num()) - onw = '' + onw = '&o_n_w={}'.format(transport.uuid) if self.forceNewWindow.value == gui.TRUE: - onw = '&o_n_w={}' + onw = '&o_n_w={}'.format(userService.deployed_service.uuid) elif self.forceNewWindow.value == 'overwrite': onw = '&o_s_w=yes' - onw = onw.format(hash(transport.name)) path = ( self.customGEPath.value if self.useGlyptodonTunnel.isTrue() diff --git a/server/src/uds/web/views/modern.py b/server/src/uds/web/views/modern.py index 6e538d40..10dc862e 100644 --- a/server/src/uds/web/views/modern.py +++ b/server/src/uds/web/views/modern.py @@ -191,7 +191,7 @@ def mfa(request: ExtendedHttpRequest) -> HttpResponse: mfaInstance = mfaProvider.getInstance() # Get validity duration - validity = min(mfaInstance.validity(), mfaProvider.validity * 60) + validity = min(mfaInstance.validity(), mfaProvider.validity) * 60 start_time = request.session.get('mfa_start_time', time.time()) # If mfa process timed out, we need to start login again