Исправлен вход в сеанс доменным пользователем с использованием шифрования

master-3.5 3.5.2.1
parent c4a7005677
commit a5a3eb6d7b

@ -110,6 +110,7 @@ class Desktop(MethodsInterface):
# если нет шифрованных данных
if not path.exists(ecryptfsPath):
tf = None
remove_files = None
try:
# если профиль содержит только данные от бутстрапа core
if isBootstrapDataOnly(userDir):
@ -142,7 +143,7 @@ class Desktop(MethodsInterface):
if e.failed():
raise DesktopError(e.read())
# если были данные от бутстрапа, то распаковать их
if tf:
if tf and remove_files:
with tarfile.open(fileobj=tf, mode='r:') as tarf:
tarf.extractall(userDir)
except Exception as e:
@ -153,9 +154,10 @@ class Desktop(MethodsInterface):
bakArchName = path.join(userDir, ".calculate.tar.bz2")
with open(bakArchName, 'w') as f:
f.write(tf.read())
raise DesktopError(str(e) +
_(
"Failed to create an encrypted user profile"))
raise DesktopError(
"%s\n%s" %
(str(e),
_("Failed to create an encrypted user profile")))
finally:
if tf:
tf.close()

Loading…
Cancel
Save