|
|
|
@ -90,9 +90,9 @@ class Desktop:
|
|
|
|
|
if error:
|
|
|
|
|
# заархивировать текущий профиль и удалить его
|
|
|
|
|
if recreateOnError:
|
|
|
|
|
self.printSUCCESS(_("Recreating encrypted data"))
|
|
|
|
|
self.printSUCCESS(_("Recovering encrypted data"))
|
|
|
|
|
if self.getMountUserPaths(userDir):
|
|
|
|
|
raise DesktopError(_("Failed to use directory encryption"))
|
|
|
|
|
raise DesktopError(_("Failed to encrypt the directory"))
|
|
|
|
|
for source in (userDir,ecryptfsPath):
|
|
|
|
|
if path.exists(source):
|
|
|
|
|
if listDirectory(source):
|
|
|
|
@ -115,9 +115,9 @@ class Desktop:
|
|
|
|
|
if isBootstrapDataOnly(userDir):
|
|
|
|
|
if childMounts(userDir):
|
|
|
|
|
raise DesktopError(
|
|
|
|
|
_("Failed to create the encrypted user profile")+
|
|
|
|
|
_("Failed to create an encrypted user profile")+
|
|
|
|
|
_(": ")+
|
|
|
|
|
_("User home directory contains mount points"))
|
|
|
|
|
_("The home directory contains mount points"))
|
|
|
|
|
# поместить данные во временный tarfile
|
|
|
|
|
calculateName = ".calculate"
|
|
|
|
|
calculatePath = path.join(userDir,calculateName)
|
|
|
|
@ -147,7 +147,7 @@ class Desktop:
|
|
|
|
|
with open(bakArchName,'w') as f:
|
|
|
|
|
f.write(tf.read())
|
|
|
|
|
raise DesktopError(str(e)+
|
|
|
|
|
_("Failed to create the encrypted user profile"))
|
|
|
|
|
_("Failed to create an encrypted user profile"))
|
|
|
|
|
finally:
|
|
|
|
|
if tf:
|
|
|
|
|
tf.close()
|
|
|
|
@ -185,7 +185,7 @@ class Desktop:
|
|
|
|
|
userName = self.clVars.Get("ur_login")
|
|
|
|
|
homeDir = self.clVars.Get("ur_home_path")
|
|
|
|
|
if not homeDir:
|
|
|
|
|
raise DesktopError(_("Failed to determine home directory"))
|
|
|
|
|
raise DesktopError(_("Failed to determine the home directory"))
|
|
|
|
|
dirStart, dirEnd = path.split(homeDir)
|
|
|
|
|
mountProfileDir = path.join(dirStart, ".%s" %dirEnd)
|
|
|
|
|
mountRemoteProfileDir = path.join(dirStart, ".%s.remote" %dirEnd)
|
|
|
|
@ -264,7 +264,7 @@ class Desktop:
|
|
|
|
|
raise DesktopError(_("Unable to detect the X session"))
|
|
|
|
|
if process("su",urLogin,"-c",
|
|
|
|
|
("DISPLAY=:%s "%display)+logoutCommand).failed():
|
|
|
|
|
raise DesktopError(_("Unable send logout command"))
|
|
|
|
|
raise DesktopError(_("Unable to send the logout command"))
|
|
|
|
|
return True
|
|
|
|
|
|
|
|
|
|
def waitLogout(self,urLogin,waitTime,postWaitTime=5):
|
|
|
|
|