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

Commit

Permalink
include domain name to user name
Browse files Browse the repository at this point in the history
  • Loading branch information
c12simple committed Apr 10, 2015
1 parent 47a2c2a commit 6ad0370
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions core/src/plugins/auth.smb/class.smbAuthDriver.php
Expand Up @@ -56,7 +56,7 @@ public function logoutCallback($actionName, $httpVars, $fileVars)

public function checkPassword($login, $pass, $seed)
{
require_once(AJXP_INSTALL_PATH."/".AJXP_PLUGINS_FOLDER."/access.smb/smb.php");
require_once(AJXP_INSTALL_PATH."/".AJXP_PLUGINS_FOLDER."/access.smb/smb.php");

$_SESSION["AJXP_SESSION_REMOTE_PASS"] = $pass;
$repoId = $this->options["REPOSITORY_ID"];
Expand All @@ -66,7 +66,15 @@ public function checkPassword($login, $pass, $seed)
$basePath = $repoObject->getOption("PATH", true);
$basePath = str_replace("AJXP_USER", $login, $basePath);
$host = $repoObject->getOption("HOST");
$url = "smb://$login:$pass@".$host."/".$basePath."/";
$domain = $repoObject->getOption("DOMAIN", true);
$smbPath = $repoObject->getOption("PATH", true);

if(!empty($domain)){
$login = $domain.$login;
}
$strTmp = "$login:$pass@".$host."/".$basePath."/".$smbPath."/";
$strTmp = str_replace("//", "/",$strTmp);
$url = "smb://".$strTmp;
try {
if (!is_dir($url)) {
$this->logDebug("SMB Login failure");
Expand Down

0 comments on commit 6ad0370

Please sign in to comment.