Исправлен доступ к ресурсам доменного пользователя во время синхронизации профиля

master-3.5 3.5.5.3
parent bd82db684f
commit 19b495cf6b

@ -656,6 +656,9 @@ class Client(commandServer, encrypt, Desktop):
"""
if not os.path.exists(userdir):
try:
pdir = os.path.dirname(userdir)
if not os.path.exists(pdir):
self.createUserDirectory(pdir, uid, gid)
os.mkdir(userdir)
os.chown(userdir, uid, gid)
os.chmod(userdir, 0700)
@ -962,6 +965,11 @@ class Client(commandServer, encrypt, Desktop):
if (result and removeEmpty and path.exists(resourcePath) and
not listDirectory(resourcePath)):
os.rmdir(resourcePath)
resourcePath = os.path.dirname(resourcePath)
if (resourceName in ("unix", "remote_profile") and
path.exists(resourcePath) and
not listDirectory(resourcePath)):
os.rmdir(resourcePath)
return retRes
def umountUserRes(self, umountPaths):
@ -975,13 +983,6 @@ class Client(commandServer, encrypt, Desktop):
*self.clVars.Get('cl_client_user_mount_name'))
return True
def umountPath(self, upath):
if upath and not self.umountSleepPath(upath):
return False
if os.path.exists(upath):
os.rmdir(upath)
return True
def getDefaultRunlevelDaemons(self):
"""
Получить все службы из default уровня загрузки

@ -242,7 +242,7 @@ class ClClientSyncLoginAction(Action):
},
# отключить удалённый профиль
{'name': 'domain_sync:umount_unix',
'method': 'Client.umountPath(cl_client_user_mount_unix_path)',
'method': 'Client.umountRemoteUser(True,"unix","remote_profile")',
'depend': Tasks.hasnot('failed')
},
# отключить ресурсы в случае ошибки

@ -468,7 +468,8 @@ class VariableClClientUserMountData(ReadonlyTableVariable):
"share", "share", path.join(self.Get('ur_home_path'), "Share"),
samba_host)
yield (
"unix", "unix", path.join(home, ".%s" % self.Get('ur_login')),
"unix", "unix", path.join(home, ".%s" % self.Get('ur_login'),
"profile"),
samba_host)
yield (
"homes", "homes", path.join(self.Get('ur_home_path'), "Home"),
@ -480,7 +481,8 @@ class VariableClClientUserMountData(ReadonlyTableVariable):
yield ("ftp", '', '', '')
if self.Get('cl_replication_host'):
yield ("remote_profile", "unix",
path.join(home, ".%s.remote" % self.Get('ur_login')),
path.join(home, ".%s" % self.Get('ur_login'),
"remote_profile"),
self.Get('cl_replication_host'))
else:
yield ("remote_profile", 'unix', '', '')

Loading…
Cancel
Save