Добавлена поддержка нормальной работы с блокировками с samba 4.11

legacy27 3.6.8.1
parent e7f1b95d45
commit fa8006d207

@ -287,10 +287,11 @@ class Client(commandServer, encrypt, Desktop):
Подключить samba ресурс
"""
mountCmd = checkUtils('/bin/mount')
if cmpVersion(self.clVars.Get('cl_cifs_ver'), "2.05") < 0:
nomapposix = ""
else:
nomapposix = ",nomapposix"
addon = ""
if cmpVersion(self.clVars.Get('cl_cifs_ver'), "2.05") >= 0:
addon = ",nomapposix"
if cmpVersion(self.clVars.Get('cl_cifsutils_ver'), "6.9_rc73") >= 0:
addon += ",forcemandatorylock"
cache_method = self.clVars.Get('cl_cifs_cache')
domain = self.get_server_domainname(host)
cifs_mount_vers = self.clVars.Get('cl_cifs_mount_vers')
@ -299,14 +300,14 @@ class Client(commandServer, encrypt, Desktop):
p = process(mountCmd, "-t", "cifs", "-o",
"cache=%s,domain=%s,vers=%s,user=%s,uid=%d,gid=%d,noperm%s" % (
cache_method, domain, cifs_mount_vers,
userName, uid, gid, nomapposix),
userName, uid, gid, addon),
"//%s/%s" % (host, res), rpath,
envdict={"PASSWD": userPwd}, stderr=STDOUT)
return p.success()
else:
p = process(mountCmd, "-t", "cifs", "-o",
"cache=%s,domain=%s,vers=%s,user=%s%s" % (cache_method,
domain, cifs_mount_vers, userName, nomapposix),
domain, cifs_mount_vers, userName, addon),
"//%s/%s" % (host, res), rpath,
envdict={"PASSWD": userPwd}, stderr=STDOUT)
return p.success()

@ -768,6 +768,16 @@ class VariableClRsyncVer(ReadonlyVariable):
return data[0]['PVR']
return ""
class VariableClCifsutilsVer(ReadonlyVariable):
"""
Версия cifs-utils
"""
def get(self):
data = isPkgInstalled('net-fs/cifs-utils')
if data:
return data[0]['PV']
return ""
class VariableClSyncMovedSet(Variable):
"""

Loading…
Cancel
Save