|
|
|
@ -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()
|
|
|
|
|