diff --git a/pym/client/client.py b/pym/client/client.py index 2833b94..4387e5b 100644 --- a/pym/client/client.py +++ b/pym/client/client.py @@ -40,7 +40,7 @@ from calculate.lib.utils.files import (getModeFile, removeDir, listDirectory,process,find,STDOUT, sambaPasswordCheck,checkUtils) from calculate.lib.utils.common import (getpathenv, appendProgramToEnvFile, - removeProgramToEnvFile) + removeProgramToEnvFile, cmpVersion) from calculate.desktop._cl_keys import getKey, clearKey from calculate.lib.convertenv import convertEnv from calculate.lib.encrypt import encrypt @@ -264,16 +264,20 @@ 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" if not uid is None: # mount by uid p = process(mountCmd,"-t","cifs","-o", - "cache=loose,user=%s,uid=%d,gid=%d,noperm"%(userName,uid,gid), + "cache=loose,user=%s,uid=%d,gid=%d,noperm%s"%(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=loose,user=%s"%userName, + "cache=loose,user=%s%s"%(userName,nomapposix), "//%s/%s"%(host,res),rpath, envdict={"PASSWD":userPwd},stderr=STDOUT) return p.success() diff --git a/pym/client/variables/client.py b/pym/client/variables/client.py index faa69d5..21227b6 100644 --- a/pym/client/variables/client.py +++ b/pym/client/variables/client.py @@ -660,3 +660,10 @@ class VariableClClientNscdCache(Variable): """ Частота обновления кэша nscd при работе в домене в часах """ + +class VariableClCifsVer(ReadonlyVariable): + """ + Версия модуля CIFS + """ + def get(self): + return readFile("/sys/module/cifs/version")