From ea7788e11b6afda56cfbf49137542967a8fba410 Mon Sep 17 00:00:00 2001 From: Roland Gruber Date: Tue, 22 Jun 2004 13:36:38 +0000 Subject: [PATCH] use functions from account.inc for password hashes --- lam/lib/modules/sambaAccount.inc | 8 ++++---- lam/lib/modules/sambaSamAccount.inc | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/lam/lib/modules/sambaAccount.inc b/lam/lib/modules/sambaAccount.inc index bffb9dce..de857b51 100644 --- a/lam/lib/modules/sambaAccount.inc +++ b/lam/lib/modules/sambaAccount.inc @@ -251,13 +251,13 @@ class sambaAccount extends baseModule { if (isset($return[$_SESSION[$this->base]->dn]['modify']['ntPassword'])) unset($return[$_SESSION[$this->base]->dn]['modify']['ntPassword']); if (!isset($this->orig['lmPassword'][0])) { - $return[$_SESSION[$this->base]->dn]['modify']['lmPassword'][0] = exec(escapeshellarg($_SESSION['lampath'].'lib/createntlm.pl')." lm ".escapeshellarg($this->lmPassword())); - $return[$_SESSION[$this->base]->dn]['modify']['ntPassword'][0] = exec(escapeshellarg($_SESSION['lampath'].'lib/createntlm.pl')." nt ".escapeshellarg($this->lmPassword())); + $return[$_SESSION[$this->base]->dn]['modify']['lmPassword'][0] = lmPassword($this->lmPassword()); + $return[$_SESSION[$this->base]->dn]['modify']['ntPassword'][0] = ntPassword($this->lmPassword()); $return[$_SESSION[$this->base]->dn]['modify']['pwdLastSet'][0] = time(); } if ($this->lmPassword()!='') { - $return[$_SESSION[$this->base]->dn]['modify']['lmPassword'][0] = exec(escapeshellarg($_SESSION['lampath'].'lib/createntlm.pl')." lm ".escapeshellarg($this->lmPassword())); - $return[$_SESSION[$this->base]->dn]['modify']['ntPassword'][0] = exec(escapeshellarg($_SESSION['lampath'].'lib/createntlm.pl')." nt ".escapeshellarg($this->lmPassword())); + $return[$_SESSION[$this->base]->dn]['modify']['lmPassword'][0] = lmPassword($this->lmPassword()); + $return[$_SESSION[$this->base]->dn]['modify']['ntPassword'][0] = ntPassword($this->lmPassword()); $return[$_SESSION[$this->base]->dn]['modify']['pwdLastSet'][0] = time(); } return $return; diff --git a/lam/lib/modules/sambaSamAccount.inc b/lam/lib/modules/sambaSamAccount.inc index ff4892de..0fe61a26 100644 --- a/lam/lib/modules/sambaSamAccount.inc +++ b/lam/lib/modules/sambaSamAccount.inc @@ -258,13 +258,13 @@ class sambaSamAccount extends baseModule { if (isset($return[$_SESSION[$this->base]->dn]['modify']['sambaNTPassword'])) unset($return[$_SESSION[$this->base]->dn]['modify']['sambaNTPassword']); if (!isset($this->orig['sambaLMPassword'][0])) { - $return[$_SESSION[$this->base]->dn]['modify']['sambaLMPassword'][0] = exec(escapeshellarg($_SESSION['lampath'].'lib/createntlm.pl')." lm ".escapeshellarg($this->sambaLMPassword())); - $return[$_SESSION[$this->base]->dn]['modify']['sambaNTPassword'][0] = exec(escapeshellarg($_SESSION['lampath'].'lib/createntlm.pl')." nt ".escapeshellarg($this->sambaLMPassword())); + $return[$_SESSION[$this->base]->dn]['modify']['sambaLMPassword'][0] = lmPassword($this->sambaLMPassword()); + $return[$_SESSION[$this->base]->dn]['modify']['sambaNTPassword'][0] = ntPassword($this->sambaLMPassword()); $return[$_SESSION[$this->base]->dn]['modify']['sambaPwdLastSet'][0] = time(); } if ($this->sambaLMPassword()!='') { - $return[$_SESSION[$this->base]->dn]['modify']['sambaLMPassword'][0] = exec(escapeshellarg($_SESSION['lampath'].'lib/createntlm.pl')." lm ".escapeshellarg($this->sambaLMPassword())); - $return[$_SESSION[$this->base]->dn]['modify']['sambaNTPassword'][0] = exec(escapeshellarg($_SESSION['lampath'].'lib/createntlm.pl')." nt ".escapeshellarg($this->sambaLMPassword())); + $return[$_SESSION[$this->base]->dn]['modify']['sambaLMPassword'][0] = lmPassword($this->sambaLMPassword()); + $return[$_SESSION[$this->base]->dn]['modify']['sambaNTPassword'][0] = ntPassword($this->sambaLMPassword()); $return[$_SESSION[$this->base]->dn]['modify']['sambaPwdLastSet'][0] = time(); } return $return;