Author: ralfbecker
New Revision: 35177
URL: http://www.egroupware.org/viewvc/egroupware?rev=35177&view=rev
Log:
update to 1.9.010 and enabling password migration to sha512_crypt, if available
Modified:
trunk/phpgwapi/setup/setup.inc.php
trunk/phpgwapi/setup/tables_current.inc.php
trunk/phpgwapi/setup/tables_update.inc.php
Modified: trunk/phpgwapi/setup/setup.inc.php
URL: http://www.egroupware.org/viewvc/egroupware/trunk/phpgwapi/setup/setup.inc.php?rev=35177&r1=35176&r2=35177&view=diff
— trunk/phpgwapi/setup/setup.inc.php (original)
+++ trunk/phpgwapi/setup/setup.inc.php Mon Jun 6 08:52:45 2011
@@ -12,7 +12,7 @@
/* Basic information about this app */
$setup_info[‘phpgwapi’][‘name’] = ‘phpgwapi’;
$setup_info[‘phpgwapi’][‘title’] = ‘EGroupware API’;
-$setup_info[‘phpgwapi’][‘version’] = ‘1.9.009’;
+$setup_info[‘phpgwapi’][‘version’] = ‘1.9.010’;
$setup_info[‘phpgwapi’][‘versions’][‘current_header’] = ‘1.29’;
$setup_info[‘phpgwapi’][‘enable’] = 3;
$setup_info[‘phpgwapi’][‘app_order’] = 1;
@@ -74,3 +74,4 @@
$setup_info[‘groupdav’][‘license’] = ‘GPL’;
$setup_info[‘groupdav’][‘hooks’][‘preferences’] = ‘groupdav_hooks::menus’;
$setup_info[‘groupdav’][‘hooks’][‘settings’] = ‘groupdav_hooks::settings’;
+
Modified: trunk/phpgwapi/setup/tables_current.inc.php
URL: http://www.egroupware.org/viewvc/egroupware/trunk/phpgwapi/setup/tables_current.inc.php?rev=35177&r1=35176&r2=35177&view=diff
— trunk/phpgwapi/setup/tables_current.inc.php (original)
+++ trunk/phpgwapi/setup/tables_current.inc.php Mon Jun 6 08:52:45 2011
@@ -56,7 +56,7 @@
‘fd’ => array(
‘account_id’ => array(‘type’ => ‘auto’,‘nullable’ => False),
‘account_lid’ => array(‘type’ => ‘varchar’,‘precision’ => ‘64’,‘nullable’ => False),
-
'account_pwd' => array('type' => 'varchar','precision' => '100','nullable' => False),
-
'account_pwd' => array('type' => 'varchar','precision' => '128','nullable' => False), 'account_lastlogin' => array('type' => 'int','precision' => '4'), 'account_lastloginfrom' => array('type' => 'varchar','precision' => '255'), 'account_lastpwd_change' => array('type' => 'int','precision' => '4'),
Modified: trunk/phpgwapi/setup/tables_update.inc.php
URL: http://www.egroupware.org/viewvc/egroupware/trunk/phpgwapi/setup/tables_update.inc.php?rev=35177&r1=35176&r2=35177&view=diff
— trunk/phpgwapi/setup/tables_update.inc.php (original)
+++ trunk/phpgwapi/setup/tables_update.inc.php Mon Jun 6 08:52:45 2011
@@ -205,8 +205,6 @@
/**
- Alter column cat_owner to varchar(255) to support multiple owners/groups per cat
-
-
- Enable password migration to new default ssha, if current hash is the default (sql: md5, ldap:des)
*/
function phpgwapi_upgrade1_9_008()
{
@@ -215,6 +213,23 @@
‘precision’ => ‘255’,
‘nullable’ => False,
‘default’ => ‘0’
- Enable password migration to new default ssha, if current hash is the default (sql: md5, ldap:des)
- ));
- return $GLOBALS[‘setup_info’][‘phpgwapi’][‘currentver’] = ‘1.9.009’;
+}
+/**
-
- Alter column account_pwd to varchar(128) to allow to store sha256_crypt hashes
-
-
- Enable password migration to new default “securest available”, if current hash is the default (sql: md5, ldap: des)
-
- or the 1.9.009 migration to ssha is running
-
*/
+function phpgwapi_upgrade1_9_009()
+{ -
$GLOBALS[‘egw_setup’]->oProc->AlterColumn(‘egw_accounts’,‘account_pwd’,array(
-
'type' => 'varchar', -
'precision' => '128', -
'nullable' => False));
// query password hashing from database
@@ -224,6 +239,7 @@
‘sql_encryption_type’ => ‘md5’,
‘ldap_encryption_type’ => ‘des’,
‘pwd_migration_allowed’ => null, // default off -
'pwd_mirgation_types' => null,);
foreach($GLOBALS[‘egw_setup’]->db->select(‘egw_config’,‘config_name,config_value’,array(
‘config_app’ => ‘phpgwapi’,
@@ -235,14 +251,22 @@
if (!isset($config[‘account_repository’])) $config[‘account_repository’] = $config[‘auth_type’];// changing pw hashing only, if we auth agains our own account repository and no migration already active
- if ($config[‘auth_type’] == $config[‘account_repository’] && !$config[‘pwd_migration_allowed’])
- if ($config[‘auth_type’] == $config[‘account_repository’] &&
-
{(!$config['pwd_migration_allowed'] || $config['pwd_migration_types'] = 'md5,crypt')) // 1.9.009 migration to ssha
-
if ($config['auth_type'] == 'sql' && $config['sql_encryption_type'] == 'md5' || -
$config['auth_type'] == 'ldap'&& $config['ldap_encryption_type'] == 'des')
-
require_once EGW_SERVER_ROOT.'/setup/inc/hook_config.inc.php'; // for sql_passwdhashes to get securest available password hash -
sql_passwdhashes(array(), true, $securest); -
// OpenLDAP has no own support for extended crypt like sha512_crypt, but relys the OS crypt implementation, -
// do NOT automatically migrate to anything above SSHA for OS other then Linux (Darwin can not auth anymore!) -
if ($config['auth_type'] == 'sql' && in_array($config['sql_encryption_type'], array('md5','ssha')) || -
$config['auth_type'] == 'ldap'&& in_array($config['ldap_encryption_type'], array('des','ssha')) && -
(PHP_OS == 'Linux' || $securest == 'ssha')) {
-
$config['sql_encryption_type'] = $config['ldap_encryption_type'] = 'ssha';
-
$config['pwd_migration_types'] = 'md5,crypt'; // des is called crypt in hash -
if ($config['pwd_migration_allowed'] && $securest != 'ssha') $config['pwd_migration_types'] .= ',ssha'; -
$config['sql_encryption_type'] = $config['ldap_encryption_type'] = $securest; $config['pwd_migration_allowed'] = 'True';
-
$config['pwd_migration_types'] = 'md5,crypt'; // des is called crypt in hash
-
echo "<p>Enabling password migration to $securest</p>\n"; } foreach($config as $name => $value) {
@@ -254,5 +278,7 @@
),LINE,FILE);
}
}
- return $GLOBALS[‘setup_info’][‘phpgwapi’][‘currentver’] = ‘1.9.009’;
-}
- return $GLOBALS[‘setup_info’][‘phpgwapi’][‘currentver’] = ‘1.9.010’;
+}
Simplify data backup and recovery for your virtual environment with vRanger.
Installation’s a snap, and flexible recovery options mean your data is safe,
secure and there when you need it. Discover what all the cheering’s about.
Get your free trial download today.
http://p.sf.net/sfu/quest-dev2dev2
eGroupWare-cvs mailing list
eGroupWare-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/egroupware-cvs