From: cajus Date: Thu, 19 Apr 2007 13:26:51 +0000 (+0000) Subject: Updated style and moved smbhash to samba X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=2edbd0839247b835617cdf7fb7519876eefa4d52;p=gosa.git Updated style and moved smbhash to samba git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@6135 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/setup/class_setupStep_Config2.inc b/setup/class_setupStep_Config2.inc index 8f3e499a7..8eab8885f 100644 --- a/setup/class_setupStep_Config2.inc +++ b/setup/class_setupStep_Config2.inc @@ -44,6 +44,7 @@ class Step_Config2 extends setup_step var $samba_settings = array( "samba_sid" => "0-815-4711", "samba_sid_active" => FALSE, "samba_rid" => 1000, + "smbhash" => 'SMBHASH', "samba_rid_active" => FALSE); var $attributes = array("governmentmode","sambaidmapping","cyrusunixstyle","mail"); @@ -55,6 +56,17 @@ class Step_Config2 extends setup_step foreach($tmp['name'] as $name){ $this->mail_methods[$name] = $name; } + + /* Look for samba password generation method */ + if(file_exists("/usr/bin/mkntpasswd")){ + $pwdhash = "/usr/bin/mkntpasswd"; + } elseif (preg_match("/^Usage: mkntpwd /", shell_exec ("mkntpwd 2>&1"))){ + $pwdhash= "mkntpwd"; + } else { + $pwdhash= 'perl -MCrypt::SmbHash -e "print join(q[:], ntlmgen \$ARGV[0]), $/;"'; + } + + $this->samba_settings['smbhash'] = $pwdhash; } @@ -160,6 +172,9 @@ class Step_Config2 extends setup_step }else{ $this->samba_settings['samba_rid_active'] = FALSE; } + if(isset($_POST['smbhash'])){ + $this->samba_settings['smbhash'] = $_POST['smbhash']; + } } diff --git a/setup/class_setupStep_Config3.inc b/setup/class_setupStep_Config3.inc index 680fdebd7..365a66ffe 100644 --- a/setup/class_setupStep_Config3.inc +++ b/setup/class_setupStep_Config3.inc @@ -48,24 +48,12 @@ class Step_Config3 extends setup_step "kioskpath" => "/var/spool/kiosk", "kioskpath_active" => FALSE, - "noprimarygroup" => FALSE, - "smbhash" => 'SMBHASH'); + "noprimarygroup" => FALSE); function Step_Config3() { $this->update_strings(); - - /* Look for samba password generation method */ - if(file_exists("/usr/bin/mkntpasswd")){ - $pwdhash = "/usr/bin/mkntpasswd"; - } elseif (preg_match("/^Usage: mkntpwd /", shell_exec ("mkntpwd 2>&1"))){ - $pwdhash= "mkntpwd"; - } else { - $pwdhash= 'perl -MCrypt::SmbHash -e "print join(q[:], ntlmgen \$ARGV[0]), $/;"'; - } - - $this->optional['smbhash'] = $pwdhash; } @@ -100,7 +88,7 @@ class Step_Config3 extends setup_step } } - foreach(array("strict_units","noprimarygroup","forceglobals","forcessl","warnssl","compile","debuglevel","session_lifetime","smbhash") as $name){ + foreach(array("strict_units","noprimarygroup","forceglobals","forcessl","warnssl","compile","debuglevel","session_lifetime") as $name){ if(isset($_POST[$name])){ $this->optional[$name] = stripslashes($_POST[$name]); } diff --git a/setup/setup_config2.tpl b/setup/setup_config2.tpl index 433ace1ad..679fee9a2 100644 --- a/setup/setup_config2.tpl +++ b/setup/setup_config2.tpl @@ -1,5 +1,15 @@

{t}Samba settings{/t}

+ +
+
+ {t}Samba hash generator{/t} +
+
+ +
+
+
{t}Samba SID{/t} diff --git a/setup/setup_config3.tpl b/setup/setup_config3.tpl index f3155981b..89b7f9999 100644 --- a/setup/setup_config3.tpl +++ b/setup/setup_config3.tpl @@ -160,23 +160,6 @@
-
-
- {t}SMB hash{/t} -
-
-   - /usr/bin/mkntpasswd
-   - mkntpwd
-   - perl -MCrypt::SmbHash ... -
-
-
{t}Session lifetime{/t}