|
|
|
@ -293,21 +293,22 @@ class Client(commandServer, encrypt, Desktop):
|
|
|
|
|
nomapposix = ",nomapposix"
|
|
|
|
|
cache_method = self.clVars.Get('cl_cifs_cache')
|
|
|
|
|
domain = self.get_server_domainname(host)
|
|
|
|
|
cifs_mount_vers = self.clVars.Get('cl_cifs_mount_vers')
|
|
|
|
|
if not uid is None:
|
|
|
|
|
# mount by uid
|
|
|
|
|
p = process(mountCmd, "-t", "cifs", "-o",
|
|
|
|
|
"cache=%s,domain=%s,user=%s,uid=%d,gid=%d,noperm%s" % (
|
|
|
|
|
cache_method, domain,
|
|
|
|
|
userName, uid, gid, nomapposix),
|
|
|
|
|
"//%s/%s" % (host, res), rpath,
|
|
|
|
|
envdict={"PASSWD": userPwd}, stderr=STDOUT)
|
|
|
|
|
"cache=%s,domain=%s,vers=%s,user=%s,uid=%d,gid=%d,noperm%s" % (
|
|
|
|
|
cache_method, domain, cifs_mount_vers,
|
|
|
|
|
userName, uid, gid, nomapposix),
|
|
|
|
|
"//%s/%s" % (host, res), rpath,
|
|
|
|
|
envdict={"PASSWD": userPwd}, stderr=STDOUT)
|
|
|
|
|
return p.success()
|
|
|
|
|
else:
|
|
|
|
|
p = process(mountCmd, "-t", "cifs", "-o",
|
|
|
|
|
"cache=%s,domain=%s,user=%s%s" % (cache_method,
|
|
|
|
|
domain, userName, nomapposix),
|
|
|
|
|
"//%s/%s" % (host, res), rpath,
|
|
|
|
|
envdict={"PASSWD": userPwd}, stderr=STDOUT)
|
|
|
|
|
"cache=%s,domain=%s,vers=%s,user=%s%s" % (cache_method,
|
|
|
|
|
domain, cifs_mount_vers, userName, nomapposix),
|
|
|
|
|
"//%s/%s" % (host, res), rpath,
|
|
|
|
|
envdict={"PASSWD": userPwd}, stderr=STDOUT)
|
|
|
|
|
return p.success()
|
|
|
|
|
|
|
|
|
|
def get_server_domainname(self, host):
|
|
|
|
|