Skip to content
This repository has been archived by the owner on Nov 25, 2020. It is now read-only.

Commit

Permalink
Merge remote-tracking branch 'origin/develop' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
cdujeu committed Dec 11, 2017
2 parents 7fa17a6 + 090d42e commit 90a8e96
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 4 deletions.
3 changes: 3 additions & 0 deletions core/src/plugins/access.smb/SMBAccessDriver.php
Expand Up @@ -62,6 +62,9 @@ protected function loadExternalWrapper(){
if(!empty($this->pluginConf['SMB_PATH_TMP']) && !defined('SMB_PATH_TMP')){
define ('SMB4PHP_SMBTMP', $this->pluginConf["SMB_PATH_TMP"]);
}
if(!empty($this->pluginConf['SMB_DISABLE_BUFFER'])){
define ('SMB_DISABLE_BUFFER', true);
}
require_once($this->getBaseDir()."/smb.php");
}

Expand Down
1 change: 1 addition & 0 deletions core/src/plugins/access.smb/manifest.xml
Expand Up @@ -16,6 +16,7 @@
<global_param name="SMBCLIENT" type="string" label="CONF_MESSAGE[Smbclient]" description="CONF_MESSAGE[Path to smbclient executable, considered to be in the path by default.]" mandatory="true" default="smbclient"/>
<global_param name="SMB_PATH_TMP" type="string" label="CONF_MESSAGE[Path Tmp]" description="CONF_MESSAGE[OS Path Temporary if not the default one]" mandatory="true" default="/tmp"/>
<global_param name="SMB_ENABLE_ZIP" type="boolean" label="CONF_MESSAGE[Enable Zip]" description="CONF_MESSAGE[Enable zip creation for repositories using Samba access. Make sure that you are using a very fast network, otherwise it will be very long!]" mandatory="false" default="false"/>
<global_param name="SMB_DISABLE_BUFFER" type="boolean" label="CONF_MESSAGE[Disable smb buffer option]" description="CONF_MESSAGE[The setting socket options SO_RCVBUF=8192 sometimes can seriously degrade performance]" mandatory="false" default="false"/>
<global_param group="MIXIN_MESSAGE[Metadata and indexation]" name="DEFAULT_METASOURCES" type="string" label="MIXIN_MESSAGE[Default Metasources]" description="MIXIN_MESSAGE[Comma separated list of metastore and meta plugins, that will be automatically applied to all repositories created with this driver]" mandatory="false" default="metastore.serial,meta.filehasher,index.lucene"/>
</server_settings>
<registry_contributions>
Expand Down
8 changes: 6 additions & 2 deletions core/src/plugins/access.smb/smb.php
Expand Up @@ -37,8 +37,12 @@
if (!defined('SMB4PHP_SMBTMP')) {
define ('SMB4PHP_SMBTMP', '/tmp');
}

define ('SMB4PHP_SMBOPTIONS', 'TCP_NODELAY IPTOS_LOWDELAY SO_KEEPALIVE SO_RCVBUF=8192 SO_SNDBUF=8192');
if (defined('SMB_DISABLE_BUFFER')){
define ('SMB4PHP_SMBOPTIONS', 'TCP_NODELAY IPTOS_LOWDELAY SO_KEEPALIVE');
}
else {
define ('SMB4PHP_SMBOPTIONS', 'TCP_NODELAY IPTOS_LOWDELAY SO_KEEPALIVE SO_RCVBUF=8192 SO_SNDBUF=8192');
}
define ('SMB4PHP_AUTHMODE', 'arg'); # set to 'env' to use USER enviroment variable

###################################################################
Expand Down
4 changes: 2 additions & 2 deletions core/src/plugins/meta.mount/FilesystemMounter.php
Expand Up @@ -118,8 +118,8 @@ protected function getOption(ContextInterface $ctx, $name, $user="", $pass="", $
*/
protected function isAlreadyMounted(ContextInterface $contextInterface)
{
list($user, $password) = $this->getCredentials();
$MOUNT_POINT = $this->getOption($contextInterface, "MOUNT_POINT", $user, $password);
$user = $contextInterface->getUser()->getId();
$MOUNT_POINT = $this->getOption($contextInterface, "MOUNT_POINT", $user);
if( is_dir($MOUNT_POINT) ){
$statParent = stat(dirname($MOUNT_POINT));
$statMount = stat($MOUNT_POINT);
Expand Down

0 comments on commit 90a8e96

Please sign in to comment.