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

master-3.5 3.5.2.1
parent c4a7005677
commit a5a3eb6d7b

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

Loading…
Cancel
Save