diff options
author | Aleksander Machniak <alec@alec.pl> | 2013-08-20 19:23:59 +0200 |
---|---|---|
committer | Aleksander Machniak <alec@alec.pl> | 2013-08-20 19:23:59 +0200 |
commit | bcedf05d19ba1b2f63bdbfe42ff2c726fc50b6b6 (patch) | |
tree | ba3ed5cc3b6062483a1f30f8ab0d1d8511a67a65 /plugins/password | |
parent | 85ef036bbd7d77d6fc7deef4890af8671f689d41 (diff) |
s/$rcmail_config/$config/ also for plugins configuration
Diffstat (limited to 'plugins/password')
-rw-r--r-- | plugins/password/README | 6 | ||||
-rw-r--r-- | plugins/password/config.inc.php.dist | 130 | ||||
-rw-r--r-- | plugins/password/drivers/hmail.php | 4 | ||||
-rw-r--r-- | plugins/password/drivers/xmail.php | 8 |
4 files changed, 73 insertions, 75 deletions
diff --git a/plugins/password/README b/plugins/password/README index bd462592e..262ebfd86 100644 --- a/plugins/password/README +++ b/plugins/password/README @@ -247,7 +247,7 @@ This driver is fully compatible with the ldap driver, but does not require (or uses) the - $rcmail_config['password_ldap_force_replace'] variable. + $config['password_ldap_force_replace'] variable. Other advantages: * Connects only once with the LDAP server when using the search user. * Does not read the DN, but only replaces the password within (that is @@ -306,9 +306,9 @@ Driver for the daemon of vpopmail. Vpopmail is used with qmail to enable virtual users that are saved in a database and not in /etc/passwd. - Set $rcmail_config['password_vpopmaild_host'] to the host where vpopmaild runs. + Set $config['password_vpopmaild_host'] to the host where vpopmaild runs. - Set $rcmail_config['password_vpopmaild_port'] to the port of vpopmaild. + Set $config['password_vpopmaild_port'] to the port of vpopmaild. 3. Driver API diff --git a/plugins/password/config.inc.php.dist b/plugins/password/config.inc.php.dist index 9256829aa..82f6617e5 100644 --- a/plugins/password/config.inc.php.dist +++ b/plugins/password/config.inc.php.dist @@ -4,43 +4,43 @@ // ----------------------- // A driver to use for password change. Default: "sql". // See README file for list of supported driver names. -$rcmail_config['password_driver'] = 'sql'; +$config['password_driver'] = 'sql'; // Determine whether current password is required to change password. // Default: false. -$rcmail_config['password_confirm_current'] = true; +$config['password_confirm_current'] = true; // Require the new password to be a certain length. // set to blank to allow passwords of any length -$rcmail_config['password_minimum_length'] = 0; +$config['password_minimum_length'] = 0; // Require the new password to contain a letter and punctuation character // Change to false to remove this check. -$rcmail_config['password_require_nonalpha'] = false; +$config['password_require_nonalpha'] = false; // Enables logging of password changes into logs/password -$rcmail_config['password_log'] = false; +$config['password_log'] = false; // Comma-separated list of login exceptions for which password change // will be not available (no Password tab in Settings) -$rcmail_config['password_login_exceptions'] = null; +$config['password_login_exceptions'] = null; // Array of hosts that support password changing. Default is NULL. // Listed hosts will feature a Password option in Settings; others will not. // Example: -//$rcmail_config['password_hosts'] = array('mail.example.com', 'mail2.example.org'); -$rcmail_config['password_hosts'] = null; +//$config['password_hosts'] = array('mail.example.com', 'mail2.example.org'); +$config['password_hosts'] = null; // Enables saving the new password even if it matches the old password. Useful // for upgrading the stored passwords after the encryption scheme has changed. -$rcmail_config['password_force_save'] = false; +$config['password_force_save'] = false; // SQL Driver options // ------------------ // PEAR database DSN for performing the query. By default // Roundcube DB settings are used. -$rcmail_config['password_db_dsn'] = ''; +$config['password_db_dsn'] = ''; // The SQL query used to change the password. // The query can contain the following macros that will be expanded as follows: @@ -60,52 +60,52 @@ $rcmail_config['password_db_dsn'] = ''; // (in case the username is an email address) // Escaping of macros is handled by this module. // Default: "SELECT update_passwd(%c, %u)" -$rcmail_config['password_query'] = 'SELECT update_passwd(%c, %u)'; +$config['password_query'] = 'SELECT update_passwd(%c, %u)'; // By default the crypt() function which is used to create the '%c' // parameter uses the md5 algorithm. To use different algorithms // you can choose between: des, md5, blowfish, sha256, sha512. // Before using other hash functions than des or md5 please make sure // your operating system supports the other hash functions. -$rcmail_config['password_crypt_hash'] = 'md5'; +$config['password_crypt_hash'] = 'md5'; // By default domains in variables are using unicode. // Enable this option to use punycoded names -$rcmail_config['password_idn_ascii'] = false; +$config['password_idn_ascii'] = false; // Path for dovecotpw (if not in $PATH) -// $rcmail_config['password_dovecotpw'] = '/usr/local/sbin/dovecotpw'; +// $config['password_dovecotpw'] = '/usr/local/sbin/dovecotpw'; // Dovecot method (dovecotpw -s 'method') -$rcmail_config['password_dovecotpw_method'] = 'CRAM-MD5'; +$config['password_dovecotpw_method'] = 'CRAM-MD5'; // Enables use of password with crypt method prefix in %D, e.g. {MD5}$1$LUiMYWqx$fEkg/ggr/L6Mb2X7be4i1/ -$rcmail_config['password_dovecotpw_with_method'] = false; +$config['password_dovecotpw_with_method'] = false; // Using a password hash for %n and %q variables. // Determine which hashing algorithm should be used to generate // the hashed new and current password for using them within the // SQL query. Requires PHP's 'hash' extension. -$rcmail_config['password_hash_algorithm'] = 'sha1'; +$config['password_hash_algorithm'] = 'sha1'; // You can also decide whether the hash should be provided // as hex string or in base64 encoded format. -$rcmail_config['password_hash_base64'] = false; +$config['password_hash_base64'] = false; // Poppassd Driver options // ----------------------- // The host which changes the password -$rcmail_config['password_pop_host'] = 'localhost'; +$config['password_pop_host'] = 'localhost'; // TCP port used for poppassd connections -$rcmail_config['password_pop_port'] = 106; +$config['password_pop_port'] = 106; // SASL Driver options // ------------------- // Additional arguments for the saslpasswd2 call -$rcmail_config['password_saslpasswd_args'] = ''; +$config['password_saslpasswd_args'] = ''; // LDAP and LDAP_SIMPLE Driver options @@ -114,41 +114,41 @@ $rcmail_config['password_saslpasswd_args'] = ''; // You can provide one or several hosts in an array in which case the hosts are tried from left to right. // Exemple: array('ldap1.exemple.com', 'ldap2.exemple.com'); // Default: 'localhost' -$rcmail_config['password_ldap_host'] = 'localhost'; +$config['password_ldap_host'] = 'localhost'; // LDAP server port to connect to // Default: '389' -$rcmail_config['password_ldap_port'] = '389'; +$config['password_ldap_port'] = '389'; // TLS is started after connecting // Using TLS for password modification is recommanded. // Default: false -$rcmail_config['password_ldap_starttls'] = false; +$config['password_ldap_starttls'] = false; // LDAP version // Default: '3' -$rcmail_config['password_ldap_version'] = '3'; +$config['password_ldap_version'] = '3'; // LDAP base name (root directory) // Exemple: 'dc=exemple,dc=com' -$rcmail_config['password_ldap_basedn'] = 'dc=exemple,dc=com'; +$config['password_ldap_basedn'] = 'dc=exemple,dc=com'; // LDAP connection method // There is two connection method for changing a user's LDAP password. // 'user': use user credential (recommanded, require password_confirm_current=true) // 'admin': use admin credential (this mode require password_ldap_adminDN and password_ldap_adminPW) // Default: 'user' -$rcmail_config['password_ldap_method'] = 'user'; +$config['password_ldap_method'] = 'user'; // LDAP Admin DN // Used only in admin connection mode // Default: null -$rcmail_config['password_ldap_adminDN'] = null; +$config['password_ldap_adminDN'] = null; // LDAP Admin Password // Used only in admin connection mode // Default: null -$rcmail_config['password_ldap_adminPW'] = null; +$config['password_ldap_adminPW'] = null; // LDAP user DN mask // The user's DN is mandatory and as we only have his login, @@ -158,7 +158,7 @@ $rcmail_config['password_ldap_adminPW'] = null; // '%domain' will be replaced by the current roundcube user's domain part // '%dc' will be replaced by domain name hierarchal string e.g. "dc=test,dc=domain,dc=com" // Exemple: 'uid=%login,ou=people,dc=exemple,dc=com' -$rcmail_config['password_ldap_userDN_mask'] = 'uid=%login,ou=people,dc=exemple,dc=com'; +$config['password_ldap_userDN_mask'] = 'uid=%login,ou=people,dc=exemple,dc=com'; // LDAP search DN // The DN roundcube should bind with to find out user's DN @@ -169,7 +169,7 @@ $rcmail_config['password_ldap_userDN_mask'] = 'uid=%login,ou=people,dc=exemple,d // users login to find his DN instead. A common reason might be that // your users are placed under different ou's like engineering or // sales which cannot be derived from their login only. -$rcmail_config['password_ldap_searchDN'] = 'cn=roundcube,ou=services,dc=example,dc=com'; +$config['password_ldap_searchDN'] = 'cn=roundcube,ou=services,dc=example,dc=com'; // LDAP search password // If password_ldap_searchDN is set, the password to use for @@ -179,13 +179,13 @@ $rcmail_config['password_ldap_searchDN'] = 'cn=roundcube,ou=services,dc=example, // is only accesible to roundcube and don't forget to restrict roundcube's access to // your directory as much as possible using ACLs. Should this password be compromised // you want to minimize the damage. -$rcmail_config['password_ldap_searchPW'] = 'secret'; +$config['password_ldap_searchPW'] = 'secret'; // LDAP search base // If password_ldap_searchDN is set, the base to search in using the filter below. // Note that you should comment out the default password_ldap_userDN_mask setting // for this to take effect. -$rcmail_config['password_ldap_search_base'] = 'ou=people,dc=example,dc=com'; +$config['password_ldap_search_base'] = 'ou=people,dc=example,dc=com'; // LDAP search filter // If password_ldap_searchDN is set, the filter to use when @@ -197,7 +197,7 @@ $rcmail_config['password_ldap_search_base'] = 'ou=people,dc=example,dc=com'; // '%dc' will be replaced by domain name hierarchal string e.g. "dc=test,dc=domain,dc=com" // Example: '(uid=%login)' // Example: '(&(objectClass=posixAccount)(uid=%login))' -$rcmail_config['password_ldap_search_filter'] = '(uid=%login)'; +$config['password_ldap_search_filter'] = '(uid=%login)'; // LDAP password hash type // Standard LDAP encryption type which must be one of: crypt, @@ -205,34 +205,34 @@ $rcmail_config['password_ldap_search_filter'] = '(uid=%login)'; // Please note that most encodage types require external libraries // to be included in your PHP installation, see function hashPassword in drivers/ldap.php for more info. // Default: 'crypt' -$rcmail_config['password_ldap_encodage'] = 'crypt'; +$config['password_ldap_encodage'] = 'crypt'; // LDAP password attribute // Name of the ldap's attribute used for storing user password // Default: 'userPassword' -$rcmail_config['password_ldap_pwattr'] = 'userPassword'; +$config['password_ldap_pwattr'] = 'userPassword'; // LDAP password force replace // Force LDAP replace in cases where ACL allows only replace not read // See http://pear.php.net/package/Net_LDAP2/docs/latest/Net_LDAP2/Net_LDAP2_Entry.html#methodreplace // Default: true -$rcmail_config['password_ldap_force_replace'] = true; +$config['password_ldap_force_replace'] = true; // LDAP Password Last Change Date // Some places use an attribute to store the date of the last password change // The date is meassured in "days since epoch" (an integer value) // Whenever the password is changed, the attribute will be updated if set (e.g. shadowLastChange) -$rcmail_config['password_ldap_lchattr'] = ''; +$config['password_ldap_lchattr'] = ''; // LDAP Samba password attribute, e.g. sambaNTPassword // Name of the LDAP's Samba attribute used for storing user password -$rcmail_config['password_ldap_samba_pwattr'] = ''; +$config['password_ldap_samba_pwattr'] = ''; // LDAP Samba Password Last Change Date attribute, e.g. sambaPwdLastSet // Some places use an attribute to store the date of the last password change // The date is meassured in "seconds since epoch" (an integer value) // Whenever the password is changed, the attribute will be updated if set -$rcmail_config['password_ldap_samba_lchattr'] = ''; +$config['password_ldap_samba_lchattr'] = ''; // DirectAdmin Driver options @@ -242,57 +242,57 @@ $rcmail_config['password_ldap_samba_lchattr'] = ''; // The host can contain the following macros that will be expanded as follows: // %h is replaced with the imap host (from the session info) // %d is replaced with the domain part of the username (if the username is an email) -$rcmail_config['password_directadmin_host'] = 'tcp://localhost'; +$config['password_directadmin_host'] = 'tcp://localhost'; // TCP port used for DirectAdmin connections -$rcmail_config['password_directadmin_port'] = 2222; +$config['password_directadmin_port'] = 2222; // vpopmaild Driver options // ----------------------- // The host which changes the password -$rcmail_config['password_vpopmaild_host'] = 'localhost'; +$config['password_vpopmaild_host'] = 'localhost'; // TCP port used for vpopmaild connections -$rcmail_config['password_vpopmaild_port'] = 89; +$config['password_vpopmaild_port'] = 89; // cPanel Driver options // -------------------------- // The cPanel Host name -$rcmail_config['password_cpanel_host'] = 'host.domain.com'; +$config['password_cpanel_host'] = 'host.domain.com'; // The cPanel admin username -$rcmail_config['password_cpanel_username'] = 'username'; +$config['password_cpanel_username'] = 'username'; // The cPanel admin password -$rcmail_config['password_cpanel_password'] = 'password'; +$config['password_cpanel_password'] = 'password'; // The cPanel port to use -$rcmail_config['password_cpanel_port'] = 2087; +$config['password_cpanel_port'] = 2087; // XIMSS (Communigate server) Driver options // ----------------------------------------- // Host name of the Communigate server -$rcmail_config['password_ximss_host'] = 'mail.example.com'; +$config['password_ximss_host'] = 'mail.example.com'; // XIMSS port on Communigate server -$rcmail_config['password_ximss_port'] = 11024; +$config['password_ximss_port'] = 11024; // chpasswd Driver options // --------------------- // Command to use -$rcmail_config['password_chpasswd_cmd'] = 'sudo /usr/sbin/chpasswd 2> /dev/null'; +$config['password_chpasswd_cmd'] = 'sudo /usr/sbin/chpasswd 2> /dev/null'; // XMail Driver options // --------------------- -$rcmail_config['xmail_host'] = 'localhost'; -$rcmail_config['xmail_user'] = 'YourXmailControlUser'; -$rcmail_config['xmail_pass'] = 'YourXmailControlPass'; -$rcmail_config['xmail_port'] = 6017; +$config['xmail_host'] = 'localhost'; +$config['xmail_user'] = 'YourXmailControlUser'; +$config['xmail_pass'] = 'YourXmailControlPass'; +$config['xmail_port'] = 6017; // hMail Driver options @@ -300,9 +300,9 @@ $rcmail_config['xmail_port'] = 6017; // Remote hMailServer configuration // true: HMailserver is on a remote box (php.ini: com.allow_dcom = true) // false: Hmailserver is on same box as PHP -$rcmail_config['hmailserver_remote_dcom'] = false; +$config['hmailserver_remote_dcom'] = false; // Windows credentials -$rcmail_config['hmailserver_server'] = array( +$config['hmailserver_server'] = array( 'Server' => 'localhost', // hostname or ip address 'Username' => 'administrator', // windows username 'Password' => 'password' // windows user password @@ -321,7 +321,7 @@ $rcmail_config['hmailserver_server'] = array( // 6: username_domain // 7: domain_username // 8: username@domain; mbox.username -$rcmail_config['password_virtualmin_format'] = 8; +$config['password_virtualmin_format'] = 8; // pw_usermod Driver options @@ -329,27 +329,27 @@ $rcmail_config['password_virtualmin_format'] = 8; // Use comma delimited exlist to disable password change for users // Add the following line to visudo to tighten security: // www ALL=NOPASSWORD: /usr/sbin/pw -$rcmail_config['password_pw_usermod_cmd'] = 'sudo /usr/sbin/pw usermod -h 0 -n'; +$config['password_pw_usermod_cmd'] = 'sudo /usr/sbin/pw usermod -h 0 -n'; // DBMail Driver options // ------------------- // Additional arguments for the dbmail-users call -$rcmail_config['password_dbmail_args'] = '-p sha512'; +$config['password_dbmail_args'] = '-p sha512'; // Expect Driver options // --------------------- // Location of expect binary -$rcmail_config['password_expect_bin'] = '/usr/bin/expect'; +$config['password_expect_bin'] = '/usr/bin/expect'; // Location of expect script (see helpers/passwd-expect) -$rcmail_config['password_expect_script'] = ''; +$config['password_expect_script'] = ''; // Arguments for the expect script. See the helpers/passwd-expect file for details. // This is probably a good starting default: // -telent -host localhost -output /tmp/passwd.log -log /tmp/passwd.log -$rcmail_config['password_expect_params'] = ''; +$config['password_expect_params'] = ''; // smb Driver options @@ -359,6 +359,6 @@ $rcmail_config['password_expect_params'] = ''; // %n - hostname ($_SERVER['SERVER_NAME']) // %t - hostname without the first part // %d - domain (http hostname $_SERVER['HTTP_HOST'] without the first part) -$rcmail_config['password_smb_host'] = 'localhost'; +$config['password_smb_host'] = 'localhost'; // Location of smbpasswd binary -$rcmail_config['password_smb_cmd'] = '/usr/bin/smbpasswd'; +$config['password_smb_cmd'] = '/usr/bin/smbpasswd'; diff --git a/plugins/password/drivers/hmail.php b/plugins/password/drivers/hmail.php index a8f07a23b..650434617 100644 --- a/plugins/password/drivers/hmail.php +++ b/plugins/password/drivers/hmail.php @@ -5,7 +5,6 @@ * * @version 2.0 * @author Roland 'rosali' Liebl <myroundcube@mail4us.net> - * */ class rcube_hmail_password @@ -39,8 +38,7 @@ class rcube_hmail_password else { $domain = $rcmail->config->get('username_domain',false); if (!$domain) { - rcube::write_log('errors','Plugin password (hmail driver): $rcmail_config[\'username_domain\'] is not defined.'); - rcube::write_log('errors','Plugin password (hmail driver): Hint: Use hmail_login plugin (http://myroundcube.googlecode.com'); + rcube::write_log('errors','Plugin password (hmail driver): $config[\'username_domain\'] is not defined.'); return PASSWORD_ERROR; } $username = $username . "@" . $domain; diff --git a/plugins/password/drivers/xmail.php b/plugins/password/drivers/xmail.php index 59e467c5b..47beb2178 100644 --- a/plugins/password/drivers/xmail.php +++ b/plugins/password/drivers/xmail.php @@ -10,10 +10,10 @@ * Setup xmail_host, xmail_user, xmail_pass and xmail_port into * config.inc.php of password plugin as follows: * - * $rcmail_config['xmail_host'] = 'localhost'; - * $rcmail_config['xmail_user'] = 'YourXmailControlUser'; - * $rcmail_config['xmail_pass'] = 'YourXmailControlPass'; - * $rcmail_config['xmail_port'] = 6017; + * $config['xmail_host'] = 'localhost'; + * $config['xmail_user'] = 'YourXmailControlUser'; + * $config['xmail_pass'] = 'YourXmailControlPass'; + * $config['xmail_port'] = 6017; * */ |