forked from shaba/openuds
Merge remote-tracking branch 'origin/v3.6'
This commit is contained in:
commit
b8e0dbf0c5
@ -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
|
||||
|
@ -2,7 +2,13 @@ udsactor (4.0.0) stable; urgency=medium
|
||||
|
||||
* Upgraded to 4.0.0 release
|
||||
|
||||
-- Adolfo Gómez García <agomez@virtualcable.es> Mon, 5 Oct 2021 12:54:18 +0200
|
||||
-- Adolfo Gómez García <agomez@virtualcable.es> 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 <agomez@virtualcable.es> Fri, 1 Jul 2022 14:00:00 +0200
|
||||
|
||||
udsactor (3.5.0) stable; urgency=medium
|
||||
|
||||
|
@ -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
|
||||
|
70
actor/linux/udsactor-unmanaged-template.spec
Normal file
70
actor/linux/udsactor-unmanaged-template.spec
Normal file
@ -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
|
@ -35,4 +35,4 @@ from . import platform
|
||||
__title__ = 'udsactor'
|
||||
__author__ = 'Adolfo Gómez <dkmaster@dkmon.com>'
|
||||
__license__ = "BSD 3-clause"
|
||||
__copyright__ = "Copyright 2014-2020 VirtualCable S.L.U."
|
||||
__copyright__ = "Copyright 2014-2022 VirtualCable S.L.U."
|
||||
|
@ -2,7 +2,13 @@ udsclient3 (4.0.0) stable; urgency=medium
|
||||
|
||||
* Upgraded to 4.0.0 release
|
||||
|
||||
-- Adolfo Gómez García <agomez@virtualcable.es> Mon, 5 Oct 2021 12:54:18 +0200
|
||||
-- Adolfo Gómez García <agomez@virtualcable.es> 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 <agomez@virtualcable.es> Fri, 1 Jul 2022 14:12:10 +0200
|
||||
|
||||
udsclient3 (3.5.0) stable; urgency=medium
|
||||
|
||||
|
@ -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 <dkmaster@dkmon.com>'
|
||||
__license__ = "BSD 3-clause"
|
||||
__copyright__ = "Copyright 2014-2017 VirtualCable S.L.U."
|
||||
__copyright__ = "Copyright 2014-2022 VirtualCable S.L.U."
|
||||
|
@ -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,
|
||||
|
@ -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
|
||||
|
@ -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'),
|
||||
|
@ -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()
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user