Compare commits

..

97 Commits

Author SHA1 Message Date
Michael Kaufmann (d00p)
9fe55cb729 set version to 0.9.34.1 for upcoming maintenaince release
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-01-18 08:07:16 +01:00
Michael Kaufmann (d00p)
ca9670e832 update copyright year in static standard-customer-index page
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-01-15 10:26:00 +01:00
Michael Kaufmann (d00p)
29494b71fa do not create vhost content for ssl-vhosts that do not have a ssl-certificate specified, fixes #1583
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-01-15 09:40:59 +01:00
Michael Kaufmann (d00p)
f2c3b3f165 ignore errors when deleting old statistics-index-page in case this is the first run and no index.html exists yet
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-01-11 09:14:09 +01:00
Michael Kaufmann (d00p)
4e402b6378 unset js and css variables of theme after using footer-template so they can be used there instead of the header-template only, fixes #1580
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2016-01-11 07:14:57 +01:00
Michael Kaufmann (d00p)
6a22fbbf78 fix wrong webserver-setting when chosing apache-2.4 in the installation process, thx to TByte
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-12-27 16:26:15 +01:00
Michael Kaufmann (d00p)
27f2217139 fix typo, refs #1578
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-12-21 14:23:17 +01:00
Michael Kaufmann (d00p)
038bb803db fixing more path-related warnings when editing an ftp-user, refs #1578 2015-12-21 14:12:30 +01:00
Michael Kaufmann (d00p)
67b85e5708 fix path displaying in some cases
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-12-21 08:32:04 +01:00
Michael Kaufmann (d00p)
a21b1f7df5 correct display of paths in domain- and ftp-overview
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-12-09 08:49:43 +01:00
Michael Kaufmann (d00p)
eb6e66cbf2 do not double mailbox-paths in postfix config, fixes #1575
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-12-09 08:49:15 +01:00
Michael Kaufmann
778fe718ed Merge pull request #261 from knox/master
added more php_value and php_flag for suhosin
2015-11-29 20:05:32 +01:00
Michael Kaufmann
ef080cd80e Merge pull request #262 from knox/feature/suexec-workaround
improvements of suexec-workaround
2015-11-29 20:05:10 +01:00
knox
22a4a1824a remove suexec-workaround when removing dir options 2015-11-29 18:21:30 +01:00
knox
56163f66d8 fixed ownership of cgi-bin symlink created by suexec-workaround
see http://manpages.debian.org/cgi-bin/man.cgi?apropos=0&format=html&query=chown&sektion=1&locale=en
2015-11-29 17:24:24 +01:00
knox
73a7e438ec added more php_value and php_flag for suhosin
see https://suhosin.org/stories/howtos.html and https://suhosin.org/stories/configuration.html
2015-11-29 16:08:22 +01:00
Michael Kaufmann
27f4e226f3 Merge pull request #260 from knox/master
added php_flag 'suhosin.session.encrypt' and 'mbstring.func_overload'
2015-11-23 09:38:27 +01:00
knox
7357029a28 added php_flag 'suhosin.session.encrypt' and 'mbstring.func_overload'
these are required for custom php configuration for roundcube webmail
2015-11-22 13:41:06 +01:00
Michael Kaufmann (d00p)
accfd6fa14 allow /dev/urandom to be used in open_basedir path, as some applications may require that (*cough* owncloud), thx to J-BBB
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-11-20 14:20:15 +01:00
Michael Kaufmann
77dcc37b33 Merge pull request #259 from stweil/master
Don't assign variable from void function
2015-11-15 10:26:39 +01:00
Stefan Weil
5df4b3e7df Don't assign variable from void function
Database::pexecute is based on execute which is a void function.
It does not return a value which can be assigned to a variable.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2015-11-15 10:16:33 +01:00
Roman Schmerold
997141efea Merge pull request #257 from stweil/master
templates: Code cleanup
2015-11-14 19:16:11 +01:00
Stefan Weil
6fe0f56e41 templates: Code cleanup
* Remove unneeded semicolon.
* Add missing semicolon.
* Add linefeed at end of file

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2015-11-14 19:09:39 +01:00
Michael Kaufmann
8c3b7b518f Merge pull request #256 from lobeck/master
fix ssl setttings for rewrite vhosts on nginx, fixes #1568
2015-11-14 14:14:57 +01:00
Christian Becker
6996f6516c fix ssl setttings for rewrite vhosts on nginx, fixes #1568
- previously the ssl settings were missing in rewrite vhosts
- this caused ssl errors for these hosts as the default certificate has been used instead of the vhost specific cert.
- this seem to only apply for nginx, not apache
2015-11-14 14:10:23 +01:00
Michael Kaufmann
60cc071031 Merge pull request #255 from stweil/typos
Fix typos found by codespell, thx to stweil
2015-11-13 08:05:27 +01:00
Stefan Weil
fe5ab0d8da Fix typos found by codespell
Fix also a grammar issue.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2015-11-13 07:56:12 +01:00
Michael Kaufmann (d00p)
0939d032a5 fix wrong vhost creation with nginx when customer is deactivated and no docroot for deactivated users was given, fixes #1565
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-11-12 08:42:32 +01:00
Michael Kaufmann (d00p)
d21391e8ba add apache-2.4 to the installer so apache-2.4 users get the 2.4 mods activated right away, NOTE: we cannot find out whether you're on 2.2 or 2.4 - so you should now what you got and select the correct one, fixes #1566
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-11-12 08:27:07 +01:00
Michael Kaufmann (d00p)
0651dc28c8 fix filename in ubuntu trusty
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-11-12 08:18:46 +01:00
Michael Kaufmann (d00p)
5b8fea9378 introduce warning-progress-bar-color when using -15% of the given web/traffic max-warn level (default 90%), fixes #1567
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-11-12 08:18:28 +01:00
Michael Kaufmann (d00p)
eda055acca Allow always_populate_raw_post_data to be set in php.ini for php-fpm, fixes #1562
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-11-04 11:35:05 +01:00
Michael Kaufmann
7fb3918773 Merge pull request #253 from github-ivan/master-fixes
Checking for possible duplicate froxlor-local user entries in ftp-group
2015-10-30 15:58:08 +01:00
Krisztian Ivancso
4e38f614f2 Checking froxlor-local user membership in ftp-group
It prevents possible duplication in list.
2015-10-25 11:48:21 +01:00
Robert Förster (Dessa)
c7d8cb6d33 switch postfix default to postfix 3 on gentoo since this is what is stable for a while already (2.x got dropped back to ~arch and will be removed from the template once removed from the tree) 2015-10-20 02:59:44 +02:00
Dessa
e211fb891b Merge pull request #252 from rpasing/master
Fix problems in Dovecot quota configuration:
2015-10-20 02:53:07 +02:00
Rene Pasing
05f3e8f433 Fix problems in Dovecot quota configuration:
1) Since Dovecot 2.x, quota rules are by default in bytes,
  and not in kilobytes (hence multiplicating with 1024 is
  not going to be megabytes). Fixed this by adding 'M' suffix.

2) Since Dovecot 2.x, the quota rule is always named `quota_rule`
  or (for userdb prefetch) `userdb_quota_rule` (there were some
  incorrect namings in the distribution configs).

Ref: http://wiki2.dovecot.org/Quota/Configuration#MySQL
2015-10-20 02:26:28 +02:00
Michael Kaufmann (d00p)
b6949e12b1 correct gentoo.xml config-templates
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-10-19 09:04:14 +02:00
Michael Kaufmann
0772952e71 Merge pull request #251 from Commifreak/master
Update froxlor.sql
2015-10-18 18:19:39 +02:00
Robin Kluth
dc4d5c6953 Update froxlor.sql
Did someone forget the M after 128 in the Default PHP-Config? ;)
2015-10-18 18:09:26 +02:00
Robert Förster (Dessa)
9d45f4d534 Revert "ease file-permissions, they sometimes cause issues"
This reverts commit 5ead5e9c90.

part of this commit is reverted as most files shouldn't be world readable
2015-10-08 00:32:13 +02:00
Michael Kaufmann (d00p)
2b8a9a74be move checkCrondConfigurationFile() from cron_init to cron_shutdown so a forced regeneration of the cron.d-file is being handled in the same cronrun
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-10-05 20:10:55 +02:00
Michael Kaufmann (d00p)
d226af5314 do not select cron.d-file-regeneration task in cron_task as it is not being handled there
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-10-04 17:30:33 +02:00
Michael Kaufmann (d00p)
be5a13fbb1 crypt() does not seem to like some special-characters in its salts, so we skip'em whenever we are generating a password as a salt-value, thx to Tobse101 for a nice debugging session ;)
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-10-02 17:09:41 +02:00
Michael Kaufmann (d00p)
94b43021ff sort libnss-result by length of name to always return the 'base'user instead of a ftp-user (because select does not have a default order), fixes #1556
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-09-21 10:26:18 +02:00
Michael Kaufmann (d00p)
0b901af0f0 define array for mod_php users, fixes #1555
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-09-14 22:23:40 +02:00
Michael Kaufmann (d00p)
5ead5e9c90 ease file-permissions, they sometimes cause issues
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-09-12 20:33:28 +02:00
Michael Kaufmann (d00p)
1cdaa1d727 revert wrong changes from pull-request
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-09-10 08:28:12 +02:00
Michael Kaufmann
2c38bca1b5 Merge pull request #250 from blueJack92/patch-3
Fixing (possible) permission problems of configuration files
2015-09-10 08:19:41 +02:00
blueJack92
7c45ca220b Fixing some (big) peanuts
Fixing permission problems with files, which have 0640 as file attributes.
Fixing problems in main.cf (Postfix). setgid_group must be set, otherwise running newaliases will fail.
Moreover I set the missing paths correctly in the main.cf (regard to Debian Jessie).
2015-09-09 23:33:27 +02:00
Michael Kaufmann (d00p)
bdb2115c16 allow one-character usernames (or mysql-prefix)
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-09-09 23:01:24 +02:00
Michael Kaufmann (d00p)
e23bf72006 remove syntax-error from pull-request #249...
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-09-09 09:32:35 +02:00
Michael Kaufmann
7c63b78bbb Merge pull request #249 from 5nafu/findDirs
Fix Regression from commit 687c5ce for Bug #611
2015-09-09 07:44:14 +02:00
5nafu
b611ebcccb Fix Regression from commit 687c5ce for Bug #611:
Ignore unreadable directiories instead of stoping after first unreadable
directory in function.findDirs.
This Fix comes from php.net user antennen @
http://php.net/manual/en/class.recursivedirectoryiterator.php#101654
2015-09-08 21:29:59 +02:00
Michael Kaufmann (d00p)
722d17b211 [configfiles] correct permissions for froxlor_bind.conf
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-09-08 08:21:33 +02:00
Michael Kaufmann (d00p)
afbfb810fd [configfiles] don't mv a file that is to be backed up but has mode=append, use cp instead
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-09-08 08:18:32 +02:00
Michael Kaufmann (d00p)
1d3ae4f2c8 merged current stable 0.9.34 release as master
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-09-07 15:24:40 +02:00
Roman Schmerold
320adad154 Merge pull request #248 from rzeka/master
Allow max_input_vars in PHP-FPM configuration
2015-08-24 17:06:23 +02:00
Piotr Rzeczkowski
c52df5b286 Allow max_input_vars in PHP-FPM configuration 2015-08-24 12:18:56 +02:00
Michael Kaufmann (d00p)
30a25c0e8c comment out unexisting group 'Debian-exim' when exim is not installed
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-08-20 20:50:35 +02:00
Michael Kaufmann
c9e4819f3f Merge pull request #247 from Tak0r/master
Fixed unknown variables in composeSslSettings
2015-08-16 20:08:14 +02:00
Frank Gehann
7cf321b24a Fixed composeSslSettings which used variables not available in the function scope. 2015-08-16 15:45:48 +02:00
Michael Kaufmann (d00p)
3b96efc04d forgot to use the new distro-editor variable
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-08-13 15:46:21 +02:00
Michael Kaufmann (d00p)
4da3a87772 instead of env-variable, show ditro editor which is defined in the xml
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-08-13 15:42:57 +02:00
Michael Kaufmann (d00p)
967bd45a63 fix subdir-value if homeDir == dirToCreate in mkDirWithCorrectOwnership(), fixes pr #246
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-08-03 17:46:29 +02:00
Michael Kaufmann (d00p)
7b5069f1b9 add umask form-field, fixes #1486 (master)
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-07-31 13:21:23 +02:00
Michael Kaufmann (d00p)
4429c5e8b2 allow customization of umask in php-fcgi-starter scripts, refs #1486
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-07-31 13:20:31 +02:00
Michael Kaufmann
918e9ed408 Merge pull request #244 from greybyte/vhost_config_variables
Variable substitution in vhost specialconfig
2015-07-31 11:45:30 +02:00
Michael Kaufmann (d00p)
d86fb7ed23 avoid empty value for makeCorrectDir as the assert-check runs before evaluating to / in certain places
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-07-31 10:44:33 +02:00
Michael Kaufmann (d00p)
089fb25da7 add mpm-itk to the list of dependents of libnss-mysql; fix proftpd-sql config for jessie; update powerdns-config for jessie
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-07-31 09:18:57 +02:00
Chris Vigelius
19d94471d9 Merge branch 'master' into vhost_config_variables, and replace IS_SSL with SCHEME
Conflicts (resolved):
	lng/english.lng.php
	lng/german.lng.php
2015-07-30 11:35:26 +02:00
Michael Kaufmann (d00p)
8d26f583e9 fix wrong tpl-variable-name
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-07-30 11:35:24 +02:00
Michael Kaufmann (d00p)
0455cb96ca add update compatibility for bugfix-release 0.9.33.2
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-07-29 18:09:42 +02:00
Michael Kaufmann (d00p)
744d85ec4c display description of integrity-check rather then just the function-name, makes things clearer
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-07-29 15:58:27 +02:00
Michael Kaufmann (d00p)
5096e2d68d add tentative jessie config xml file, testers are welcome
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-07-29 14:56:06 +02:00
Michael Kaufmann (d00p)
4ec376b296 log db errors to syslog and remove tmp-error-logs for reporting in cronrun
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-07-29 13:19:32 +02:00
Michael Kaufmann (d00p)
8558533a91 replace passwords even before logging, not just for display
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-07-29 13:11:38 +02:00
Michael Kaufmann (d00p)
26a41a0672 check for existence of ssl-related files for ip/port vhost in order to avoid the webserver to be unable to restart when the cronjob runs; fixes #1485
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-07-28 15:41:31 +02:00
Michael Kaufmann (d00p)
222841f09b solve sub-sub-domain-problem by dynamically assigning vhost-number in vhost-filename (the deeper the lower the number thus being included earlier), fixes #1535
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-07-28 15:11:55 +02:00
Michael Kaufmann (d00p)
8332b77fcc remove superfluous call to 'getDomainRedirectCode' as its been called before; allow changing of redirect-code when domain has 'ssl-redirect' = 1 2015-07-28 13:20:11 +02:00
Michael Kaufmann (d00p)
5d423c9e63 fix undefined-indeces when search-result contained only subdomains in customer-domains
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-07-28 08:23:10 +02:00
Michael Kaufmann (d00p)
895be02237 remove unused (old) php-configfile-files
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-07-28 08:22:00 +02:00
Michael Kaufmann (d00p)
c3da264cfe change default ssl-cipher-list; minor changes in config-xmls, fixes #1541
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-07-08 16:04:18 +02:00
Chris Vigelius
89c4b969d1 make sure we fill all context parameters in any case 2015-07-06 21:21:07 +02:00
Chris Vigelius
9dbc04678c correct path for nginx 2015-07-06 17:16:49 +02:00
Chris Vigelius
ed9e524e03 use absolute path and require_once, instead of relative include 2015-07-06 17:09:49 +02:00
Chris Vigelius
c2d75c7030 add description and normalize {IS_SSL} value 2015-07-06 15:09:13 +02:00
Chris Vigelius
de84419035 add nginx and lighttpd support, refactor into common base class 2015-07-06 14:15:01 +02:00
Chris Vigelius
d9e0854bb7 add docroot 2015-07-06 13:45:10 +02:00
Chris Vigelius
558b779944 allow variables in special config 2015-07-06 13:28:09 +02:00
Michael Kaufmann
628b45efeb Merge pull request #243 from greybyte/defuse_dangerous_delete
fix potentially dangerous programming
2015-06-25 14:21:50 +02:00
Chris Vigelius
92cf4c16e3 missing semicolon 2015-06-25 14:08:19 +02:00
Chris Vigelius
3cad16d2b7 fix dangerous code 2015-06-25 13:49:55 +02:00
Michael Kaufmann
e7503c3c7a Merge pull request #242 from andre-luiz-dos-santos/patch-1
Update english.lng.php
2015-06-23 21:33:16 +02:00
André Luiz dos Santos
db8e643c62 Update english.lng.php 2015-06-23 16:22:34 -03:00
Michael Kaufmann (d00p)
94f3b99ad0 do not show error-trace / sensitive data when db-server is down or login credentials are wrong
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-06-11 21:00:45 +02:00
Michael Kaufmann (d00p)
d0c4d5616a adjust fastcgi conf for php-fpm when using apache-2.4
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
2015-06-11 20:59:41 +02:00
43 changed files with 333 additions and 178 deletions

View File

@@ -855,7 +855,11 @@ if ($page == 'customers'
} else {
$local_user = Settings::Get('phpfpm.vhost_httpuser');
}
$ins_data['members'] .= ','.$local_user;
// check froxlor-local user membership in ftp-group
// without this check addition may duplicate user in list if httpuser == local_user
if (strpos($ins_data['members'], $local_user) !== false) {
$ins_data['members'] .= ','.$local_user;
}
}
Database::pexecute($ins_stmt, $ins_data);

View File

@@ -190,7 +190,7 @@ if ($page == 'domains'
SELECT `id` FROM `" . TABLE_PANEL_DOMAINS . "`
WHERE (`id` = :id OR `parentdomainid` = :id ".$rsd_sql.") AND `isemaildomain` = '1'"
);
$subResult = Database::pexecute($subresult_stmt, array('id' => $id));
Database::pexecute($subresult_stmt, array('id' => $id));
$idString = array();
$paramString = array();
while ($subRow = $subresult_stmt->fetch(PDO::FETCH_ASSOC)) {

View File

@@ -141,7 +141,7 @@ if ($page == 'overview') {
foreach ($domain_array as $row) {
if (strpos($row['documentroot'], $userinfo['documentroot']) === 0) {
$row['documentroot'] = makeCorrectDir(substr($row['documentroot'], strlen($userinfo['documentroot']) - 1));
$row['documentroot'] = makeCorrectDir(str_replace($userinfo['documentroot'], "/", $row['documentroot']));
}
// get ssl-ips if activated

View File

@@ -297,6 +297,22 @@ if ($page == 'overview') {
if (isset($result['customerid']) && $result['customerid'] != '' && $result['customerid'] == $userinfo['customerid']) {
if (isset($_POST['send']) && $_POST['send'] == 'send') {
// do we have to remove the symlink and folder in suexecpath?
if ((int)Settings::Get('perl.suexecworkaround') == 1) {
$loginname = getCustomerDetail($result['customerid'], 'loginname');
$suexecpath = makeCorrectDir(Settings::Get('perl.suexecpath').'/'.$loginname.'/'.md5($result['path']).'/');
$perlsymlink = makeCorrectFile($result['path'].'/cgi-bin');
// remove symlink
if (file_exists($perlsymlink)) {
safe_exec('rm -f '.escapeshellarg($perlsymlink));
$log->logAction(USR_ACTION, LOG_DEBUG, "deleted suexecworkaround symlink '" . $perlsymlink . "'");
}
// remove folder in suexec-path
if (file_exists($suexecpath)) {
safe_exec('rm -rf '.escapeshellarg($suexecpath));
$log->logAction(USR_ACTION, LOG_DEBUG, "deleted suexecworkaround path '" . $suexecpath . "'");
}
}
$stmt = Database::prepare("DELETE FROM `" . TABLE_PANEL_HTACCESS . "`
WHERE `customerid`= :customerid
AND `id`= :id"

View File

@@ -57,7 +57,7 @@ if ($page == 'overview') {
while ($row = $result_stmt->fetch(PDO::FETCH_ASSOC)) {
if ($paging->checkDisplay($i)) {
if (strpos($row['homedir'], $userinfo['documentroot']) === 0) {
$row['documentroot'] = substr($row['homedir'], strlen($userinfo['documentroot']) - 1);
$row['documentroot'] = str_replace($userinfo['documentroot'], "/", $row['homedir']);
} else {
$row['documentroot'] = $row['homedir'];
}
@@ -254,7 +254,7 @@ if ($page == 'overview') {
'CUST_NAME' => getCorrectUserSalutation($userinfo), // < keep this for compatibility
'USR_NAME' => $username,
'USR_PASS' => $password,
'USR_PATH' => makeCorrectDir(substr($path, strlen($userinfo['documentroot'])))
'USR_PATH' => makeCorrectDir(str_replace($userinfo['documentroot'], "/", $path))
);
$def_language = $userinfo['def_language'];
@@ -417,7 +417,7 @@ if ($page == 'overview') {
redirectTo($filename, array('page' => $page, 's' => $s));
} else {
if (strpos($result['homedir'], $userinfo['documentroot']) === 0) {
$homedir = substr($result['homedir'], strlen($userinfo['documentroot']));
$homedir = str_replace($userinfo['documentroot'], "/", $result['homedir']);
} else {
$homedir = $result['homedir'];
}

View File

@@ -119,7 +119,7 @@ if ($action == 'login') {
redirectTo('index.php', array('showmessage' => '3'));
exit;
} elseif (validatePasswordLogin($userinfo, $password, $table, $uid)) {
// only show "you're banned" if the login was successfull
// only show "you're banned" if the login was successful
// because we don't want to publish that the user does exist
if ($userinfo['deactivated']) {
unset($userinfo);

View File

@@ -539,7 +539,7 @@ INSERT INTO `panel_settings` (`settinggroup`, `varname`, `value`) VALUES
('panel', 'password_numeric', '0'),
('panel', 'password_special_char_required', '0'),
('panel', 'password_special_char', '!?<>§$%+#=@'),
('panel', 'version', '0.9.34');
('panel', 'version', '0.9.34.1');
DROP TABLE IF EXISTS `panel_tasks`;
@@ -724,7 +724,7 @@ CREATE TABLE `panel_phpconfigs` (
INSERT INTO `panel_phpconfigs` (`id`, `description`, `binary`, `file_extensions`, `mod_fcgid_starter`, `mod_fcgid_maxrequests`, `phpsettings`) VALUES
(1, 'Default Config', '/usr/bin/php-cgi', 'php', '-1', '-1', 'allow_call_time_pass_reference = Off\r\nallow_url_fopen = Off\r\nasp_tags = Off\r\ndisable_classes =\r\ndisable_functions = curl_exec,curl_multi_exec,exec,parse_ini_file,passthru,popen,proc_close,proc_get_status,proc_nice,proc_open,proc_terminate,shell_exec,show_source,system\r\ndisplay_errors = Off\r\ndisplay_startup_errors = Off\r\nenable_dl = Off\r\nerror_reporting = E_ALL & ~E_NOTICE\r\nexpose_php = Off\r\nfile_uploads = On\r\ncgi.force_redirect = 1\r\ngpc_order = "GPC"\r\nhtml_errors = Off\r\nignore_repeated_errors = Off\r\nignore_repeated_source = Off\r\ninclude_path = ".:{PEAR_DIR}"\r\nlog_errors = On\r\nlog_errors_max_len = 1024\r\nmagic_quotes_gpc = Off\r\nmagic_quotes_runtime = Off\r\nmagic_quotes_sybase = Off\r\nmax_execution_time = 30\r\nmax_input_time = 60\r\nmemory_limit = 128\r\n{OPEN_BASEDIR_C}open_basedir = "{OPEN_BASEDIR}"\r\noutput_buffering = 4096\r\npost_max_size = 16M\r\nprecision = 14\r\nregister_argc_argv = Off\r\nregister_globals = Off\r\nreport_memleaks = On\r\nsendmail_path = "/usr/sbin/sendmail -t -i -f {CUSTOMER_EMAIL}"\r\nsession.auto_start = 0\r\nsession.bug_compat_42 = 0\r\nsession.bug_compat_warn = 1\r\nsession.cache_expire = 180\r\nsession.cache_limiter = nocache\r\nsession.cookie_domain =\r\nsession.cookie_lifetime = 0\r\nsession.cookie_path = /\r\nsession.entropy_file = /dev/urandom\r\nsession.entropy_length = 16\r\nsession.gc_divisor = 1000\r\nsession.gc_maxlifetime = 1440\r\nsession.gc_probability = 1\r\nsession.name = PHPSESSID\r\nsession.referer_check =\r\nsession.save_handler = files\r\nsession.save_path = "{TMP_DIR}"\r\nsession.serialize_handler = php\r\nsession.use_cookies = 1\r\nsession.use_trans_sid = 0\r\nshort_open_tag = On\r\nsuhosin.mail.protect = 1\r\nsuhosin.simulation = Off\r\ntrack_errors = Off\r\nupload_max_filesize = 32M\r\nupload_tmp_dir = "{TMP_DIR}"\r\nvariables_order = "GPCS"\r\n;mail.add_x_header = On\r\n;mail.log = "/var/log/phpmail.log"\r\n'),
(1, 'Default Config', '/usr/bin/php-cgi', 'php', '-1', '-1', 'allow_call_time_pass_reference = Off\r\nallow_url_fopen = Off\r\nasp_tags = Off\r\ndisable_classes =\r\ndisable_functions = curl_exec,curl_multi_exec,exec,parse_ini_file,passthru,popen,proc_close,proc_get_status,proc_nice,proc_open,proc_terminate,shell_exec,show_source,system\r\ndisplay_errors = Off\r\ndisplay_startup_errors = Off\r\nenable_dl = Off\r\nerror_reporting = E_ALL & ~E_NOTICE\r\nexpose_php = Off\r\nfile_uploads = On\r\ncgi.force_redirect = 1\r\ngpc_order = "GPC"\r\nhtml_errors = Off\r\nignore_repeated_errors = Off\r\nignore_repeated_source = Off\r\ninclude_path = ".:{PEAR_DIR}"\r\nlog_errors = On\r\nlog_errors_max_len = 1024\r\nmagic_quotes_gpc = Off\r\nmagic_quotes_runtime = Off\r\nmagic_quotes_sybase = Off\r\nmax_execution_time = 30\r\nmax_input_time = 60\r\nmemory_limit = 128M\r\n{OPEN_BASEDIR_C}open_basedir = "{OPEN_BASEDIR}"\r\noutput_buffering = 4096\r\npost_max_size = 16M\r\nprecision = 14\r\nregister_argc_argv = Off\r\nregister_globals = Off\r\nreport_memleaks = On\r\nsendmail_path = "/usr/sbin/sendmail -t -i -f {CUSTOMER_EMAIL}"\r\nsession.auto_start = 0\r\nsession.bug_compat_42 = 0\r\nsession.bug_compat_warn = 1\r\nsession.cache_expire = 180\r\nsession.cache_limiter = nocache\r\nsession.cookie_domain =\r\nsession.cookie_lifetime = 0\r\nsession.cookie_path = /\r\nsession.entropy_file = /dev/urandom\r\nsession.entropy_length = 16\r\nsession.gc_divisor = 1000\r\nsession.gc_maxlifetime = 1440\r\nsession.gc_probability = 1\r\nsession.name = PHPSESSID\r\nsession.referer_check =\r\nsession.save_handler = files\r\nsession.save_path = "{TMP_DIR}"\r\nsession.serialize_handler = php\r\nsession.use_cookies = 1\r\nsession.use_trans_sid = 0\r\nshort_open_tag = On\r\nsuhosin.mail.protect = 1\r\nsuhosin.simulation = Off\r\ntrack_errors = Off\r\nupload_max_filesize = 32M\r\nupload_tmp_dir = "{TMP_DIR}"\r\nvariables_order = "GPCS"\r\n;mail.add_x_header = On\r\n;mail.log = "/var/log/phpmail.log"\r\n'),
(2, 'Froxlor Vhost Config', '/usr/bin/php-cgi', 'php', '-1', '-1', 'allow_call_time_pass_reference = Off\r\nallow_url_fopen = On\r\nasp_tags = Off\r\ndisable_classes =\r\ndisable_functions = curl_multi_exec,exec,parse_ini_file,passthru,popen,proc_close,proc_get_status,proc_nice,proc_open,proc_terminate,shell_exec,show_source,system\r\ndisplay_errors = Off\r\ndisplay_startup_errors = Off\r\nenable_dl = Off\r\nerror_reporting = E_ALL & ~E_NOTICE\r\nexpose_php = Off\r\nfile_uploads = On\r\ncgi.force_redirect = 1\r\ngpc_order = "GPC"\r\nhtml_errors = Off\r\nignore_repeated_errors = Off\r\nignore_repeated_source = Off\r\ninclude_path = ".:{PEAR_DIR}"\r\nlog_errors = On\r\nlog_errors_max_len = 1024\r\nmagic_quotes_gpc = Off\r\nmagic_quotes_runtime = Off\r\nmagic_quotes_sybase = Off\r\nmax_execution_time = 60\r\nmax_input_time = 60\r\nmemory_limit = 128M\r\nnoutput_buffering = 4096\r\npost_max_size = 16M\r\nprecision = 14\r\nregister_argc_argv = Off\r\nregister_globals = Off\r\nreport_memleaks = On\r\nsendmail_path = "/usr/sbin/sendmail -t -i -f {CUSTOMER_EMAIL}"\r\nsession.auto_start = 0\r\nsession.bug_compat_42 = 0\r\nsession.bug_compat_warn = 1\r\nsession.cache_expire = 180\r\nsession.cache_limiter = nocache\r\nsession.cookie_domain =\r\nsession.cookie_lifetime = 0\r\nsession.cookie_path = /\r\nsession.entropy_file = /dev/urandom\r\nsession.entropy_length = 16\r\nsession.gc_divisor = 1000\r\nsession.gc_maxlifetime = 1440\r\nsession.gc_probability = 1\r\nsession.name = PHPSESSID\r\nsession.referer_check =\r\nsession.save_handler = files\r\nsession.save_path = "{TMP_DIR}"\r\nsession.serialize_handler = php\r\nsession.use_cookies = 1\r\nsession.use_trans_sid = 0\r\nshort_open_tag = On\r\nsuhosin.mail.protect = 1\r\nsuhosin.simulation = Off\r\ntrack_errors = Off\r\nupload_max_filesize = 32M\r\nupload_tmp_dir = "{TMP_DIR}"\r\nvariables_order = "GPCS"\r\n;mail.add_x_header = On\r\n;mail.log = "/var/log/phpmail.log"\r\n');

View File

@@ -454,7 +454,10 @@ class FroxlorInstall {
$this->_updateSetting($upd_stmt, $this->_data['httpgroup'], 'system', 'httpgroup');
// necessary changes for webservers != apache2
if ($this->_data['webserver'] == "lighttpd") {
if ($this->_data['webserver'] == "apache24") {
$this->_updateSetting($upd_stmt, 'apache2', 'system', 'webserver');
$this->_updateSetting($upd_stmt, '1', 'system', 'apache24');
} elseif ($this->_data['webserver'] == "lighttpd") {
$this->_updateSetting($upd_stmt, '/etc/lighttpd/conf-enabled/', 'system', 'apacheconf_vhost');
$this->_updateSetting($upd_stmt, '/etc/lighttpd/froxlor-diroptions/', 'system', 'apacheconf_diroptions');
$this->_updateSetting($upd_stmt, '/etc/lighttpd/froxlor-htpasswd/', 'system', 'apacheconf_htpasswddir');
@@ -766,6 +769,7 @@ class FroxlorInstall {
}
// apache
$formdata .= $this->_getSectionItemCheckbox('apache2', ($this->_data['webserver'] == 'apache2'), $websrvstyle);
$formdata .= $this->_getSectionItemCheckbox('apache24', ($this->_data['webserver'] == 'apache24'), $websrvstyle);
// lighttpd
$formdata .= $this->_getSectionItemCheckbox('lighttpd', ($this->_data['webserver'] == 'lighttpd'), $websrvstyle);
// nginx
@@ -1235,7 +1239,7 @@ class FroxlorInstall {
// this is faster than calling count($tokens) every time through the loop.
$token_count = count($tokens);
for ($i = 0; $i < $token_count; $i++) {
// Don't wanna add an empty string as the last thing in the array.
// Don't want to add an empty string as the last thing in the array.
if (($i != ($token_count - 1))
|| (strlen($tokens[$i] > 0))
) {

View File

@@ -61,6 +61,7 @@ $lng['install']['servername'] = 'Server name (FQDN, no ip-address)';
$lng['install']['serverip'] = 'Server IP';
$lng['install']['webserver'] = 'Webserver';
$lng['install']['apache2'] = 'Apache 2';
$lng['install']['apache24'] = 'Apache 2.4';
$lng['install']['lighttpd'] = 'LigHTTPd';
$lng['install']['nginx'] = 'NGINX';
$lng['install']['httpuser'] = 'HTTP username';

View File

@@ -61,6 +61,7 @@ $lng['install']['servername'] = 'Nom du serveur (FQDN, pas d\'adresse IP)';
$lng['install']['serverip'] = 'Adresse IP du serveur';
$lng['install']['webserver'] = 'Serveur Web';
$lng['install']['apache2'] = 'Apache 2';
$lng['install']['apache24'] = 'Apache 2.4';
$lng['install']['lighttpd'] = 'LigHTTPd';
$lng['install']['nginx'] = 'NGINX';
$lng['install']['httpuser'] = 'Nom d\'utilisateur HTTP';

View File

@@ -61,6 +61,7 @@ $lng['install']['servername'] = 'Servername (FQDN, keine IP-Adresse)';
$lng['install']['serverip'] = 'Server-IP';
$lng['install']['webserver'] = 'Webserver';
$lng['install']['apache2'] = 'Apache 2';
$lng['install']['apache24'] = 'Apache 2.4';
$lng['install']['lighttpd'] = 'LigHTTPd';
$lng['install']['nginx'] = 'NGINX';
$lng['install']['httpuser'] = 'HTTP Username';

View File

@@ -3004,3 +3004,11 @@ if (isFroxlorVersion('0.9.34-dev4')) {
updateToVersion('0.9.34');
}
if (isFroxlorVersion('0.9.34')) {
showUpdateStep("Updating from 0.9.34 to 0.9.34.1");
lastStepStatus(0);
updateToVersion('0.9.34.1');
}

View File

@@ -301,7 +301,7 @@ class DomainBulkAction
), '', $domain_data['aliasdomain']));
// validate alias-domain
if (! validateDomain($domain_data['aliasdomain'])) {
// invalid-domain lol - skip to be sure we dont add anything weird
// invalid-domain lol - skip to be sure we don't add anything weird
return false;
}
// does the domain we want to be an alias of exists?
@@ -409,12 +409,12 @@ class DomainBulkAction
// write back iplist
$iplist = implode(",", $result_iplist);
// dont need that for the domain-insert-statement
// don't need that for the domain-insert-statement
unset($domain_data['ips']);
// remember use_ssl value
$use_ssl = (bool)$domain_data['use_ssl'];
// dont need that for the domain-insert-statement
// don't need that for the domain-insert-statement
unset($domain_data['use_ssl']);
// finally ADD the domain to panel_domains
@@ -480,7 +480,7 @@ class DomainBulkAction
$tmp_arr = explode($separator, $line);
$data_arr = array();
foreach ($tmp_arr as $idx => $data) {
// dont include more fields that the ones we use
// don't include more fields than the ones we use
if ($idx > (count($this->_required_fields) - 4)) // off-by-one + 3 auto-values
break;
$data_arr[$this->_required_fields[$idx]] = $data;

View File

@@ -297,7 +297,12 @@ class ConfigDaemon {
// @TODO: Maybe have a backup - location somewhere central?
// @TODO: Use IO - class
if (array_key_exists('backup', $attributes)) {
$return[] = array('type' => 'command', 'content' => 'mv "' . $this->_parseContent($attributes['name']) . '" "' . $this->_parseContent($attributes['name']) . '.frx.bak"', 'execute' => "pre");
if (array_key_exists('mode', $attributes) && $attributes['mode'] == 'append') {
$cmd = 'cp';
} else {
$cmd = 'mv';
}
$return[] = array('type' => 'command', 'content' => $cmd.' "' . $this->_parseContent($attributes['name']) . '" "' . $this->_parseContent($attributes['name']) . '.frx.bak"', 'execute' => "pre");
}
// Now the content of the file can be written

View File

@@ -43,7 +43,7 @@
*
* Unicode input might be given as either UTF-8 string, UCS-4 string or UCS-4 array.
* Unicode output is available in the same formats.
* You can select your preferred format via {@link set_paramter()}.
* You can select your preferred format via {@link set_parameter()}.
*
* ACE input and output is always expected to be ASCII.
*
@@ -79,7 +79,7 @@ class idna_convert {
protected $_scount = 11172; // _lcount * _tcount * _vcount
protected $_error = false;
protected static $_mb_string_overload = null;
// See {@link set_paramter()} for details of how to change the following
// See {@link set_parameter()} for details of how to change the following
// settings from within your script / application
protected $_api_encoding = 'utf8'; // Default input charset is UTF-8
protected $_allow_overlong = false; // Overlong UTF-8 encodings are forbidden
@@ -393,9 +393,9 @@ class idna_convert {
}
/**
* Use this method to get the last error ocurred
* Use this method to get the last error occurred
* @param void
* @return string The last error, that occured
* @return string The last error, that occurred
*/
public function get_last_error()
{
@@ -421,7 +421,7 @@ class idna_convert {
$this->_error('The given encoded string was empty');
return false;
}
// Find last occurence of the delimiter
// Find last occurrence of the delimiter
$delim_pos = strrpos($encoded, '-');
if ($delim_pos > self::byteLength($this->_punycode_prefix)) {
for ($k = self::byteLength($this->_punycode_prefix); $k < $delim_pos; ++$k) {
@@ -622,7 +622,7 @@ class idna_convert {
// Mapping
// Walking through the input array, performing the required steps on each of
// the input chars and putting the result into the output array
// While mapping required chars we apply the cannonical ordering
// While mapping required chars we apply the canonical ordering
foreach ($input as $v) {
// Map to nothing == skip that code point
if (in_array($v, self::$NP['map_nothing'])) {
@@ -646,11 +646,11 @@ class idna_convert {
$output[] = (int) $out;
}
} elseif (($this->_idn_version == '2003') && isset(self::$NP['replacemaps_2003'][$v])) {
foreach ($this->_apply_cannonical_ordering(self::$NP['replacemaps_2003'][$v]) as $out) {
foreach ($this->_apply_canonical_ordering(self::$NP['replacemaps_2003'][$v]) as $out) {
$output[] = (int) $out;
}
} elseif (($this->_idn_version == '2008') && isset(self::$NP['replacemaps'][$v])) {
foreach ($this->_apply_cannonical_ordering(self::$NP['replacemaps'][$v]) as $out) {
foreach ($this->_apply_canonical_ordering(self::$NP['replacemaps'][$v]) as $out) {
$output[] = (int) $out;
}
} else {
@@ -773,11 +773,11 @@ class idna_convert {
}
/**
* Applies the cannonical ordering of a decomposed UCS4 sequence
* Applies the canonical ordering of a decomposed UCS4 sequence
* @param array Decomposed UCS4 sequence
* @return array Ordered USC4 sequence
*/
protected function _apply_cannonical_ordering($input)
protected function _apply_canonical_ordering($input)
{
$swap = true;
$size = count($input);

View File

@@ -58,6 +58,16 @@ class phpinterface_fpm {
'upload_max_filesize',
'xmlrpc_error_number',
'session.auto_start',
'always_populate_raw_post_data',
'suhosin.session.cryptkey',
'suhosin.session.cryptraddr',
'suhosin.session.checkraddr',
'suhosin.cookie.cryptkey',
'suhosin.cookie.plainlist',
'suhosin.cookie.cryptraddr',
'suhosin.cookie.checkraddr',
'suhosin.executor.func.blacklist',
'suhosin.executor.eval.whitelist'
),
'php_flag' => array(
'asp_tags',
@@ -73,7 +83,16 @@ class phpinterface_fpm {
'session.use_cookies',
'short_open_tag',
'track_errors',
'xmlrpc_errors'
'xmlrpc_errors',
'suhosin.simulation',
'suhosin.session.encrypt',
'suhosin.session.cryptua',
'suhosin.session.cryptdocroot',
'suhosin.cookie.encrypt',
'suhosin.cookie.cryptua',
'suhosin.cookie.cryptdocroot',
'suhosin.executor.disable_eval',
'mbstring.func_overload'
),
'php_admin_value' => array(
'cgi.redirect_status_env',

View File

@@ -104,8 +104,13 @@ class ConfigIO {
// get directories
$configdirs = array();
$configdirs[] = makeCorrectDir($this->_getFile('system', 'apacheconf_vhost'));
$configdirs[] = makeCorrectDir($this->_getFile('system', 'apacheconf_diroptions'));
$dir = $this->_getFile('system', 'apacheconf_vhost');
if ($dir !== false)
$configdirs[] = makeCorrectDir($dir);
$dir = $this->_getFile('system', 'apacheconf_diroptions');
if ($dir !== false)
$configdirs[] = makeCorrectDir($dir);
// file pattern
$pattern = "/^([0-9]){2}_(froxlor|syscp)_(.+)\.conf$/";
@@ -173,7 +178,7 @@ class ConfigIO {
$awstatsclean['path'] = $this->_getFile('system', 'awstats_conf');
/**
* dont do anyting if the directory not exists
* don't do anything if the directory does not exist
* (e.g. awstats not installed yet or whatever)
* fixes #45
*/
@@ -182,7 +187,7 @@ class ConfigIO {
while ($awstatsclean['entry'] = $awstatsclean['dir']->read()) {
$awstatsclean['fullentry'] = makeCorrectFile($awstatsclean['path'].'/'.$awstatsclean['entry']);
/**
* dont do anything if the file does not exist
* don't do anything if the file does not exist
*/
if (@file_exists($awstatsclean['fullentry'])) {
$awstatsclean['fh'] = fopen($awstatsclean['fullentry'], 'r');

View File

@@ -38,7 +38,7 @@
<command>
<visibility mode="notempty">{{settings.system.deactivateddocroot}}
</visibility>
<content><![CDATA['mkdir -p {{settings.system.deactivateddocroot}}]]></content>
<content><![CDATA[mkdir -p {{settings.system.deactivateddocroot}}]]></content>
</command>
</commands>
</general>
@@ -345,7 +345,7 @@ mail IN A <SERVERIP>
<command><![CDATA[echo "include \"{{settings.system.bindconf_directory}}froxlor_bind.conf\";" >> /etc/bind/named.conf]]></command>
<command><![CDATA[touch {{settings.system.bindconf_directory}}froxlor_bind.conf]]></command>
<command><![CDATA[chown named:0 {{settings.system.bindconf_directory}}froxlor_bind.conf]]></command>
<command><![CDATA[chmod 0600 {{settings.system.bindconf_directory}}froxlor_bind.conf]]></command>
<command><![CDATA[chmod 0644 {{settings.system.bindconf_directory}}froxlor_bind.conf]]></command>
<command><![CDATA[rc-update add named default]]></command>
<command><![CDATA[/etc/init.d/named restart]]></command>
</daemon>
@@ -1010,7 +1010,7 @@ root: root@<SERVERNAME>
</general>
<!-- postfix with dovecot -->
<daemon name="postfix_dovecot" version="2.x"
title="Postfix 2 with dovecot" default="true">
title="Postfix 2 with dovecot">
<include>//service[@type='smtp']/general/commands[@index=1]
</include>
<command><![CDATA[echo "mail-mta/postfix dovecot-sasl -sasl" >> /etc/portage/package.use]]></command>
@@ -1158,7 +1158,7 @@ dovecot unix - n n - - pipe
</daemon>
<!-- postfix with dovecot -->
<daemon name="postfix_dovecot" version="3.x"
title="Postfix 3 with dovecot">
title="Postfix 3 with dovecot" default="true">
<include>//service[@type='smtp']/general/commands[@index=1]
</include>
<command><![CDATA[echo "mail-mta/postfix dovecot-sasl -sasl" >> /etc/portage/package.use]]></command>
@@ -1561,7 +1561,7 @@ iterate_query = "SELECT username AS user FROM mail_users WHERE (imap = 1 OR pop3
</content>
</file>
<file name="/etc/dovecot/conf.d/20-managesieve.conf" chown="root:root"
chmod="0600" backup="true">
chmod="0644" backup="true">
<content><![CDATA[
##
## ManageSieve specific settings
@@ -1643,7 +1643,7 @@ protocol sieve {
</content>
</file>
<file name="/etc/dovecot/conf.d/90-sieve.conf" chown="root:root"
chmod="0600" backup="true">
chmod="0644" backup="true">
<content><![CDATA[
##
## Settings for the Sieve interpreter
@@ -3116,16 +3116,19 @@ getpwnam SELECT username,'x',uid,gid,'Froxlor Customer',homedir,shell \
FROM ftp_users \
WHERE username='%1$s' \
AND login_enabled = 'Y' \
ORDER BY LENGTH(username) \
LIMIT 1
getpwuid SELECT username,'x',uid,gid,'Froxlor Customer',homedir,shell \
FROM ftp_users \
WHERE uid='%1$u' \
AND login_enabled = 'Y' \
ORDER BY LENGTH(username) \
LIMIT 1
getspnam SELECT username,password,FLOOR(UNIX_TIMESTAMP()/86400-1),'1','99999','7','-1','-1','0' \
FROM ftp_users \
WHERE username='%1$s' \
AND login_enabled = 'Y' \
ORDER BY LENGTH(username) \
LIMIT 1
getpwent SELECT username,'x',uid,gid,'Froxlor Customer',homedir,shell \
FROM ftp_users
@@ -3253,7 +3256,7 @@ aliases: files
<command>
<visibility mode="equals" value="apache2">{{settings.system.webserver}}
</visibility>
<content><![CDATA[a2dismod php5]]></content>
<content><![CDATA[# remove "-D PHP5" from /etc/conf.d/apache2]]></content>
</command>
</commands>
<!-- instead of just restarting apache, we let the cronjob do all the
@@ -3277,7 +3280,7 @@ aliases: files
<commands index="2">
<visibility mode="equals" value="apache2">{{settings.system.webserver}}
</visibility>
<command><![CDATA[a2enmod suexec fastcgi]]></command>
<command><![CDATA[# add "-D FASTCGI -D SUEXEC" to /etc/conf.d/apache2]]></command>
</commands>
<commands index="3">
<visibility mode="true">{{settings.phpfpm.enabled_ownvhost}}
@@ -3292,7 +3295,7 @@ aliases: files
</visibility>
<visibility mode="true">{{settings.phpfpm.enabled_ownvhost}}
</visibility>
<command><![CDATA[a2dismod php5]]></command>
<command><![CDATA[# remove "-D PHP5" from /etc/conf.d/apache2]]></command>
</commands>
<!-- instead of just restarting apache, we let the cronjob do all the
dirty work -->

View File

@@ -343,7 +343,7 @@ exit "$RETVAL"
<command><![CDATA[echo "include \"{{settings.system.bindconf_directory}}froxlor_bind.conf\";" >> /etc/bind/named.conf.local]]></command>
<command><![CDATA[touch {{settings.system.bindconf_directory}}froxlor_bind.conf]]></command>
<command><![CDATA[chown bind:0 {{settings.system.bindconf_directory}}froxlor_bind.conf]]></command>
<command><![CDATA[chmod 0600 {{settings.system.bindconf_directory}}froxlor_bind.conf]]></command>
<command><![CDATA[chmod 0644 {{settings.system.bindconf_directory}}froxlor_bind.conf]]></command>
<command><![CDATA[/etc/init.d/bind9 restart]]></command>
</daemon>
<daemon name="powerdns" title="PowerDNS via bind-backend">
@@ -1655,40 +1655,40 @@ debugger_command =
# sendmail_path: The full pathname of the Postfix sendmail command.
# This is the Sendmail-compatible mail posting interface.
#
sendmail_path =
sendmail_path = /usr/sbin/sendmail
# newaliases_path: The full pathname of the Postfix newaliases command.
# This is the Sendmail-compatible command to build alias databases.
#
newaliases_path =
newaliases_path = /usr/bin/newaliases
# mailq_path: The full pathname of the Postfix mailq command. This
# is the Sendmail-compatible mail queue listing command.
#
mailq_path =
mailq_path = /usr/bin/mailq
# setgid_group: The group for mail submission and queue management
# commands. This must be a group name with a numerical group ID that
# is not shared with other accounts, not even with the Postfix account.
#
setgid_group =
setgid_group = postdrop
# html_directory: The location of the Postfix HTML documentation.
#
html_directory =
html_directory = no
# manpage_directory: The location of the Postfix on-line manual pages.
#
manpage_directory =
manpage_directory = /usr/share/man
# sample_directory: The location of the Postfix sample configuration files.
# This parameter is obsolete as of Postfix 2.1.
#
sample_directory =
sample_directory = /usr/share/doc/postfix
# readme_directory: The location of the Postfix README files.
#
readme_directory =
readme_directory = /usr/share/doc/postfix
inet_protocols = ipv4
append_dot_mydomain = no
@@ -1727,7 +1727,7 @@ dovecot_destination_recipient_limit = 1
smtpd_sasl_path = private/auth
# Virtual delivery settings
virtual_mailbox_base = <VIRTUAL_MAILBOX_BASE>
virtual_mailbox_base = /
virtual_mailbox_maps = mysql:/etc/postfix/mysql-virtual_mailbox_maps.cf
virtual_mailbox_domains = mysql:/etc/postfix/mysql-virtual_mailbox_domains.cf
virtual_alias_maps = mysql:/etc/postfix/mysql-virtual_alias_maps.cf
@@ -1904,7 +1904,7 @@ dovecot unix - n n - - pipe
</installs>
<files index="1">
<file name="/etc/dovecot/dovecot.conf" chown="root:root"
chmod="0640" backup="true">
chmod="0644" backup="true">
<content><![CDATA[
## Dovecot configuration file
@@ -2143,7 +2143,7 @@ default_pass_scheme = CRYPT
#user_query = \
# SELECT home, uid, gid \
# FROM users WHERE username = '%n' AND domain = '%d'
user_query = SELECT CONCAT(homedir, maildir) AS home, CONCAT('maildir:', homedir, maildir) AS mail, uid, gid, CONCAT('*:storage=', (quota*1024)) as quota_rule FROM mail_users WHERE (username = '%u' OR email = '%u')
user_query = SELECT CONCAT(homedir, maildir) AS home, CONCAT('maildir:', homedir, maildir) AS mail, uid, gid, CONCAT('*:storage=', quota, 'M') as quota_rule FROM mail_users WHERE (username = '%u' OR email = '%u')
# If you wish to avoid two SQL lookups (passdb + userdb), you can use
# userdb prefetch instead of userdb sql in dovecot.conf. In that case you'll
@@ -2153,7 +2153,7 @@ user_query = SELECT CONCAT(homedir, maildir) AS home, CONCAT('maildir:', homedir
# SELECT userid AS user, password, \
# home AS userdb_home, uid AS userdb_uid, gid AS userdb_gid \
# FROM users WHERE userid = '%u'
password_query = SELECT username AS user, password_enc AS password, CONCAT(homedir, maildir) AS userdb_home, uid AS userdb_uid, gid AS userdb_gid, CONCAT('maildir:', homedir, maildir) AS userdb_mail, CONCAT('maildir:storage=', (quota*1024)) as userdb_quota FROM mail_users WHERE (username = '%u' OR email = '%u') AND ((imap = 1 AND '%Ls' = 'imap') OR (pop3 = 1 AND '%Ls' = 'pop3') OR '%Ls' = 'smtp' OR '%Ls' = 'sieve')
password_query = SELECT username AS user, password_enc AS password, CONCAT(homedir, maildir) AS userdb_home, uid AS userdb_uid, gid AS userdb_gid, CONCAT('maildir:', homedir, maildir) AS userdb_mail, CONCAT('*:storage=', quota, 'M') as userdb_quota_rule FROM mail_users WHERE (username = '%u' OR email = '%u') AND ((imap = 1 AND '%Ls' = 'imap') OR (pop3 = 1 AND '%Ls' = 'pop3') OR '%Ls' = 'smtp' OR '%Ls' = 'sieve')
# Query to get a list of all usernames.
#iterate_query = SELECT username AS user FROM users
@@ -2161,7 +2161,7 @@ password_query = SELECT username AS user, password_enc AS password, CONCAT(homed
</content>
</file>
<file name="/etc/dovecot/conf.d/10-auth.conf" chown="root:0"
chmod="0640" backup="true">
chmod="0644" backup="true">
<content><![CDATA[
##
## Authentication processes
@@ -2295,7 +2295,7 @@ auth_mechanisms = plain login
</content>
</file>
<file name="/etc/dovecot/conf.d/10-mail.conf" chown="root:0"
chmod="0640" backup="true">
chmod="0644" backup="true">
<content><![CDATA[
##
## Mailbox locations and namespaces
@@ -2672,7 +2672,7 @@ mail_access_groups = vmail
</content>
</file>
<file name="/etc/dovecot/conf.d/10-master.conf" chown="root:0"
chmod="0640" backup="true">
chmod="0644" backup="true">
<content><![CDATA[
#default_process_limit = 100
#default_client_limit = 1000
@@ -2806,7 +2806,7 @@ service dict {
</content>
</file>
<file name="/etc/dovecot/conf.d/15-lda.conf" chown="root:0"
chmod="0640" backup="true">
chmod="0644" backup="true">
<content><![CDATA[
##
## LDA specific settings (also used by LMTP)
@@ -2860,7 +2860,7 @@ protocol lda {
</content>
</file>
<file name="/etc/dovecot/conf.d/20-imap.conf" chown="root:0"
chmod="0640" backup="true">
chmod="0644" backup="true">
<content><![CDATA[
##
## IMAP specific settings
@@ -2927,7 +2927,7 @@ protocol imap {
</content>
</file>
<file name="/etc/dovecot/conf.d/20-managesieve.conf" chown="root:0"
chmod="0640" backup="true">
chmod="0644" backup="true">
<content><![CDATA[
##
## ManageSieve specific settings
@@ -3009,7 +3009,7 @@ protocol sieve {
</content>
</file>
<file name="/etc/dovecot/conf.d/20-pop3.conf" chown="root:0"
chmod="0640" backup="true">
chmod="0644" backup="true">
<content><![CDATA[
##
## POP3 specific settings
@@ -3113,7 +3113,7 @@ protocol pop3 {
</content>
</file>
<file name="/etc/dovecot/conf.d/90-sieve.conf" chown="root:0"
chmod="0640" backup="true">
chmod="0644" backup="true">
<content><![CDATA[
##
## Settings for the Sieve interpreter
@@ -3663,7 +3663,7 @@ no
</content>
</file>
<file name="/etc/pure-ftpd/db/mysql.conf" chown="root:0"
chmod="0640" backup="true">
chmod="0644" backup="true">
<content><![CDATA[
##############################################
# #
@@ -3789,7 +3789,7 @@ MySQLGetQTASZ SELECT panel_customers.diskspace/1024 AS QuotaSize FROM panel_cus
# If you're using a transactionnal storage engine, you can enable SQL
# transactions to avoid races. Leave this commented if you are using the
# traditionnal MyIsam engine.
# traditional MyIsam engine.
# MySQLTransactions On
]]>
@@ -3887,16 +3887,19 @@ getpwnam SELECT username,'x',uid,gid,'Froxlor Customer',homedir,shell \
FROM ftp_users \
WHERE username='%1$s' \
AND login_enabled = 'Y' \
ORDER BY LENGTH(username) \
LIMIT 1
getpwuid SELECT username,'x',uid,gid,'Froxlor Customer',homedir,shell \
FROM ftp_users \
WHERE uid='%1$u' \
AND login_enabled = 'Y' \
ORDER BY LENGTH(username) \
LIMIT 1
getspnam SELECT username,password,FLOOR(UNIX_TIMESTAMP()/86400-1),'1','99999','7','-1','-1','0' \
FROM ftp_users \
WHERE username='%1$s' \
AND login_enabled = 'Y' \
ORDER BY LENGTH(username) \
LIMIT 1
getpwent SELECT username,'x',uid,gid,'Froxlor Customer',homedir,shell \
FROM ftp_users
@@ -4019,7 +4022,7 @@ aliases: files
<commands index="1">
<visibility mode="equals" value="apache2">{{settings.system.webserver}}
</visibility>
<command><![CDATA[# add "non-free" after all occurances of "main" in /etc/apt/sources.list]]></command>
<command><![CDATA[# add "non-free" after all occurrences of "main" in /etc/apt/sources.list]]></command>
<command><![CDATA[# this is needed for libapache2-mod-fastcgi to install]]></command>
</commands>
<install>

View File

@@ -311,7 +311,7 @@ exit "$RETVAL"
<command><![CDATA[echo "include \"{{settings.system.bindconf_directory}}froxlor_bind.conf\";" >> /etc/bind/named.conf]]></command>
<command><![CDATA[touch {{settings.system.bindconf_directory}}froxlor_bind.conf]]></command>
<command><![CDATA[chown root:bind {{settings.system.bindconf_directory}}froxlor_bind.conf]]></command>
<command><![CDATA[chmod 0600 {{settings.system.bindconf_directory}}froxlor_bind.conf]]></command>
<command><![CDATA[chmod 0644 {{settings.system.bindconf_directory}}froxlor_bind.conf]]></command>
<command><![CDATA[/etc/init.d/bind9 restart]]></command>
</daemon>
<daemon name="powerdns" title="PowerDNS via bind-backend">
@@ -544,7 +544,7 @@ dovecot_destination_recipient_limit = 1
smtpd_sasl_path = private/dovecot-auth
# Virtual delivery settings
virtual_mailbox_base = <VIRTUAL_MAILBOX_BASE>
virtual_mailbox_base = /
virtual_mailbox_maps = mysql:/etc/postfix/mysql-virtual_mailbox_maps.cf
virtual_mailbox_domains = mysql:/etc/postfix/mysql-virtual_mailbox_domains.cf
virtual_alias_maps = mysql:/etc/postfix/mysql-virtual_alias_maps.cf
@@ -720,7 +720,7 @@ sql_select: SELECT password FROM mail_users WHERE username='%u@%r' OR email='%u@
<daemon name="dovecot" version="2" title="Dovecot" default="true">
<install><![CDATA[apt-get install dovecot-imapd dovecot-pop3d dovecot-postfix dovecot-mysql dovecot-managesieved dovecot-sieve mail-stack-delivery]]></install>
<file name="/etc/dovecot/conf.d/01-mail-stack-delivery.conf"
chown="root:root" chmod="0640" backup="true">
chown="root:root" chmod="0644" backup="true">
<content><![CDATA[
# Some general options
protocols = imap pop3 sieve
@@ -809,7 +809,7 @@ service auth {
</content>
</file>
<file name="/etc/dovecot/conf.d/10-auth.conf" chown="root:root"
chmod="0600" backup="true">
chmod="0640" backup="true">
<content><![CDATA[
##
## Authentication processes
@@ -1447,16 +1447,19 @@ getpwnam SELECT username,'x',uid,gid,'Froxlor Customer',homedir,shell \
FROM ftp_users \
WHERE username='%1$s' \
AND login_enabled = 'Y' \
ORDER BY LENGTH(username) \
LIMIT 1
getpwuid SELECT username,'x',uid,gid,'Froxlor Customer',homedir,shell \
FROM ftp_users \
WHERE uid='%1$u' \
AND login_enabled = 'Y' \
ORDER BY LENGTH(username) \
LIMIT 1
getspnam SELECT username,password,FLOOR(UNIX_TIMESTAMP()/86400-1),'1','99999','7','-1','-1','0' \
FROM ftp_users \
WHERE username='%1$s' \
AND login_enabled = 'Y' \
ORDER BY LENGTH(username) \
LIMIT 1
getpwent SELECT username,'x',uid,gid,'Froxlor Customer',homedir,shell \
FROM ftp_users
@@ -1576,7 +1579,7 @@ aliases: files
<commands index="1">
<visibility mode="equals" value="apache2">{{settings.system.webserver}}
</visibility>
<command><![CDATA[# add "non-free" after all occurances of "main" in /etc/apt/sources.list]]></command>
<command><![CDATA[# add "non-free" after all occurrences of "main" in /etc/apt/sources.list]]></command>
<command><![CDATA[# this is needed for libapache2-mod-fastcgi to install]]></command>
</commands>
<install>

View File

@@ -270,7 +270,7 @@ dovecot unix - n n - - pipe flags=DRhu user=vmail:vmail argv=/usr/libexec/dove
<daemon name="dovecot" version="2.2" title="Dovecot" default="true">
<install><![CDATA[yum install dovecot dovecot-mysql dovecot-pigeonhole]]></install>
<file name="/etc/dovecot/dovecot.conf" chown="root:root"
chmod="0640" backup="true">
chmod="0644" backup="true">
<content><![CDATA[
## Dovecot configuration file
@@ -360,7 +360,7 @@ dict {
</content>
</file>
<file name="/etc/dovecot/conf.d/10-auth.conf" chown="root:0"
chmod="0640" backup="true">
chmod="0644" backup="true">
<content><![CDATA[
##
## Authentication processes
@@ -495,7 +495,7 @@ auth_mechanisms = plain
</content>
</file>
<file name="/etc/dovecot/conf.d/10-logging.conf" chown="root:0"
chmod="0640" backup="true">
chmod="0644" backup="true">
<content><![CDATA[
##
## Log destination.
@@ -585,7 +585,7 @@ plugin {
</content>
</file>
<file name="/etc/dovecot/conf.d/10-mail.conf" chown="root:0"
chmod="0640" backup="true">
chmod="0644" backup="true">
<content><![CDATA[
##
## Mailbox locations and namespaces
@@ -961,7 +961,7 @@ mbox_write_locks = fcntl
</content>
</file>
<file name="/etc/dovecot/conf.d/10-master.conf" chown="root:0"
chmod="0640" backup="true">
chmod="0644" backup="true">
<content><![CDATA[
#default_process_limit = 100
#default_client_limit = 1000
@@ -1086,7 +1086,7 @@ service dict {
</content>
</file>
<file name="/etc/dovecot/conf.d/10-ssl.conf" chown="root:0"
chmod="0640" backup="true">
chmod="0644" backup="true">
<content><![CDATA[
##
## SSL settings
@@ -1152,7 +1152,7 @@ ssl = no
</content>
</file>
<file name="/etc/dovecot/conf.d/15-lda.conf" chown="root:0"
chmod="0640" backup="true">
chmod="0644" backup="true">
<content><![CDATA[
##
## LDA specific settings (also used by LMTP)
@@ -1206,7 +1206,7 @@ protocol lda {
</content>
</file>
<file name="/etc/dovecot/conf.d/15-mailboxes.conf" chown="root:0"
chmod="0640" backup="true">
chmod="0644" backup="true">
<content><![CDATA[
##
## Mailbox definitions
@@ -1263,7 +1263,7 @@ namespace inbox {
</content>
</file>
<file name="/etc/dovecot/conf.d/20-imap.conf" chown="root:0"
chmod="0640" backup="true">
chmod="0644" backup="true">
<content><![CDATA[
##
## IMAP specific settings
@@ -1330,7 +1330,7 @@ protocol imap {
</content>
</file>
<file name="/etc/dovecot/conf.d/20-lmtp.conf" chown="root:0"
chmod="0640" backup="true">
chmod="0644" backup="true">
<content><![CDATA[
##
## LMTP specific settings
@@ -1355,7 +1355,7 @@ protocol lmtp {
</content>
</file>
<file name="/etc/dovecot/conf.d/20-managesieve.conf" chown="root:0"
chmod="0640" backup="true">
chmod="0644" backup="true">
<content><![CDATA[
##
## ManageSieve specific settings
@@ -1437,7 +1437,7 @@ protocol sieve {
</content>
</file>
<file name="/etc/dovecot/conf.d/20-pop3.conf" chown="root:0"
chmod="0640" backup="true">
chmod="0644" backup="true">
<content><![CDATA[
##
## POP3 specific settings
@@ -1541,7 +1541,7 @@ protocol pop3 {
</content>
</file>
<file name="/etc/dovecot/conf.d/90-sieve.conf" chown="root:0"
chmod="0640" backup="true">
chmod="0644" backup="true">
<content><![CDATA[
##
## Settings for the Sieve interpreter
@@ -1764,7 +1764,7 @@ default_pass_scheme = CRYPT
#password_query = \
# SELECT username, domain, password \
# FROM users WHERE username = '%n' AND domain = '%d'
password_query = SELECT username AS user, password_enc AS password, CONCAT(homedir, maildir) AS userdb_home, uid AS userdb_uid, gid AS userdb_gid, CONCAT('maildir:', homedir, maildir) AS userdb_mail, CONCAT('*:storage=', (quota*1024)) as userdb_quota_rule FROM mail_users WHERE (username = '%u' OR email = '%u') AND ((imap = 1 AND '%Ls' = 'imap') OR (pop3 = 1 AND '%Ls' = 'pop3') OR '%Ls' = 'smtp' OR '%Ls' = 'sieve')
password_query = SELECT username AS user, password_enc AS password, CONCAT(homedir, maildir) AS userdb_home, uid AS userdb_uid, gid AS userdb_gid, CONCAT('maildir:', homedir, maildir) AS userdb_mail, CONCAT('*:storage=', quota, 'M') as userdb_quota_rule FROM mail_users WHERE (username = '%u' OR email = '%u') AND ((imap = 1 AND '%Ls' = 'imap') OR (pop3 = 1 AND '%Ls' = 'pop3') OR '%Ls' = 'smtp' OR '%Ls' = 'sieve')
#password_query = SELECT username as user, password, '/var/vmail/%d/%n' as userdb_home, 'maildir:/var/vmail/%d/%n' as userdb_mail, 150 as userdb_uid, 12 as userdb_gid FROM mailbox WHERE username = '%u' AND active = '1'
# userdb query to retrieve the user information. It can return fields:
@@ -1786,7 +1786,7 @@ password_query = SELECT username AS user, password_enc AS password, CONCAT(homed
#user_query = \
# SELECT home, uid, gid \
# FROM users WHERE username = '%n' AND domain = '%d'
user_query = SELECT CONCAT(homedir, maildir) AS home, CONCAT('maildir:', homedir, maildir) AS mail, uid, gid, CONCAT('*:storage=', (quota*1024)) as quota_rule FROM mail_users WHERE (username = '%u' OR email = '%u')
user_query = SELECT CONCAT(homedir, maildir) AS home, CONCAT('maildir:', homedir, maildir) AS mail, uid, gid, CONCAT('*:storage=', quota, 'M') as quota_rule FROM mail_users WHERE (username = '%u' OR email = '%u')
#user_query = SELECT '/var/vmail/%d/%n' as home, 'maildir:/var/vmail/%d/%n' as mail, 150 AS uid, 12 AS gid FROM mailbox WHERE username = '%u' AND active = '1'
# If you wish to avoid two SQL lookups (passdb + userdb), you can use
@@ -2309,16 +2309,19 @@ getpwnam SELECT username,'x',uid,gid,'Froxlor Customer',homedir,shell \
FROM ftp_users \
WHERE username='%1$s' \
AND login_enabled = 'Y' \
ORDER BY LENGTH(username) \
LIMIT 1
getpwuid SELECT username,'x',uid,gid,'Froxlor Customer',homedir,shell \
FROM ftp_users \
WHERE uid='%1$u' \
AND login_enabled = 'Y' \
ORDER BY LENGTH(username) \
LIMIT 1
getspnam SELECT username,password,FLOOR(UNIX_TIMESTAMP()/86400-1),'1','99999','7','-1','-1','0' \
FROM ftp_users \
WHERE username='%1$s' \
AND login_enabled = 'Y' \
ORDER BY LENGTH(username) \
LIMIT 1
getpwent SELECT username,'x',uid,gid,'Froxlor Customer',homedir,shell \
FROM ftp_users

View File

@@ -331,7 +331,7 @@ exit "$RETVAL"
<command><![CDATA[echo "include \"{{settings.system.bindconf_directory}}froxlor_bind.conf\";" >> /etc/bind/named.conf]]></command>
<command><![CDATA[touch {{settings.system.bindconf_directory}}froxlor_bind.conf]]></command>
<command><![CDATA[chown root:bind {{settings.system.bindconf_directory}}froxlor_bind.conf]]></command>
<command><![CDATA[chmod 0600 {{settings.system.bindconf_directory}}froxlor_bind.conf]]></command>
<command><![CDATA[chmod 0644 {{settings.system.bindconf_directory}}froxlor_bind.conf]]></command>
<command><![CDATA[service bind9 restart]]></command>
</daemon>
<daemon name="powerdns" title="PowerDNS via bind-backend">
@@ -564,7 +564,7 @@ dovecot_destination_recipient_limit = 1
smtpd_sasl_path = private/dovecot-auth
# Virtual delivery settings
virtual_mailbox_base = <VIRTUAL_MAILBOX_BASE>
virtual_mailbox_base = /
virtual_mailbox_maps = mysql:/etc/postfix/mysql-virtual_mailbox_maps.cf
virtual_mailbox_domains = mysql:/etc/postfix/mysql-virtual_mailbox_domains.cf
virtual_alias_maps = mysql:/etc/postfix/mysql-virtual_alias_maps.cf
@@ -739,8 +739,8 @@ sql_select: SELECT password FROM mail_users WHERE username='%u@%r' OR email='%u@
<!-- Dovecot -->
<daemon name="dovecot" version="2" title="Dovecot" default="true">
<install><![CDATA[apt-get install dovecot-imapd dovecot-pop3d dovecot-mysql mail-stack-delivery]]></install>
<file name="/etc/dovecot/conf.d/01-mail-stack-delivery.conf"
chown="root:root" chmod="0640" backup="true">
<file name="/etc/dovecot/conf.d/99-mail-stack-delivery.conf"
chown="root:root" chmod="0644" backup="true">
<content><![CDATA[
# Some general options
protocols = imap pop3 sieve
@@ -816,7 +816,7 @@ service auth {
</content>
</file>
<file name="/etc/dovecot/conf.d/10-auth.conf" chown="root:root"
chmod="0600" backup="true">
chmod="0644" backup="true">
<content><![CDATA[
##
## Authentication processes
@@ -954,8 +954,8 @@ auth_mechanisms = plain login
driver = mysql
connect = host=<SQL_HOST> dbname=<SQL_DB> user=<SQL_UNPRIVILEGED_USER> password=<SQL_UNPRIVILEGED_PASSWORD>
default_pass_scheme = CRYPT
password_query = SELECT username AS user, password_enc AS password, CONCAT(homedir, maildir) AS userdb_home, uid AS userdb_uid, gid AS userdb_gid, CONCAT('maildir:', homedir, maildir) AS userdb_mail, CONCAT('maildir:storage=', (quota*1024)) as userdb_quota FROM mail_users WHERE (username = '%u' OR email = '%u') AND ((imap = 1 AND '%Ls' = 'imap') OR (pop3 = 1 AND '%Ls' = 'pop3') OR '%Ls' = 'smtp' OR '%Ls' = 'sieve')
user_query = SELECT CONCAT(homedir, maildir) AS home, CONCAT('maildir:', homedir, maildir) AS mail, uid, gid, CONCAT('maildir:storage=', (quota*1024)) as quota FROM mail_users WHERE (username = '%u' OR email = '%u')
password_query = SELECT username AS user, password_enc AS password, CONCAT(homedir, maildir) AS userdb_home, uid AS userdb_uid, gid AS userdb_gid, CONCAT('maildir:', homedir, maildir) AS userdb_mail, CONCAT('*:storage=', quota, 'M') as userdb_quota_rule FROM mail_users WHERE (username = '%u' OR email = '%u') AND ((imap = 1 AND '%Ls' = 'imap') OR (pop3 = 1 AND '%Ls' = 'pop3') OR '%Ls' = 'smtp' OR '%Ls' = 'sieve')
user_query = SELECT CONCAT(homedir, maildir) AS home, CONCAT('maildir:', homedir, maildir) AS mail, uid, gid, CONCAT('*:storage=', quota, 'M') as quota_rule FROM mail_users WHERE (username = '%u' OR email = '%u')
iterate_query = SELECT username AS user FROM mail_users WHERE (imap = 1 OR pop3 = 1)
]]>
</content>
@@ -1441,16 +1441,19 @@ getpwnam SELECT username,'x',uid,gid,'Froxlor Customer',homedir,shell \
FROM ftp_users \
WHERE username='%1$s' \
AND login_enabled = 'Y' \
ORDER BY LENGTH(username) \
LIMIT 1
getpwuid SELECT username,'x',uid,gid,'Froxlor Customer',homedir,shell \
FROM ftp_users \
WHERE uid='%1$u' \
AND login_enabled = 'Y' \
ORDER BY LENGTH(username) \
LIMIT 1
getspnam SELECT username,password,FLOOR(UNIX_TIMESTAMP()/86400-1),'1','99999','7','-1','-1','0' \
FROM ftp_users \
WHERE username='%1$s' \
AND login_enabled = 'Y' \
ORDER BY LENGTH(username) \
LIMIT 1
getpwent SELECT username,'x',uid,gid,'Froxlor Customer',homedir,shell \
FROM ftp_users
@@ -1570,7 +1573,7 @@ aliases: files
<commands index="1">
<visibility mode="equals" value="apache2">{{settings.system.webserver}}
</visibility>
<command><![CDATA[# add "non-free" after all occurances of "main" in /etc/apt/sources.list]]></command>
<command><![CDATA[# add "non-free" after all occurrences of "main" in /etc/apt/sources.list]]></command>
<command><![CDATA[# this is needed for libapache2-mod-fastcgi to install]]></command>
</commands>
<install>

View File

@@ -371,7 +371,7 @@ exit "$RETVAL"
<command><![CDATA[echo "include \"{{settings.system.bindconf_directory}}froxlor_bind.conf\";" >> /etc/bind/named.conf.local]]></command>
<command><![CDATA[touch {{settings.system.bindconf_directory}}froxlor_bind.conf]]></command>
<command><![CDATA[chown bind:0 {{settings.system.bindconf_directory}}froxlor_bind.conf]]></command>
<command><![CDATA[chmod 0600 {{settings.system.bindconf_directory}}froxlor_bind.conf]]></command>
<command><![CDATA[chmod 0644 {{settings.system.bindconf_directory}}froxlor_bind.conf]]></command>
<command><![CDATA[/etc/init.d/bind9 restart]]></command>
</daemon>
<daemon name="powerdns" title="PowerDNS via bind-backend">
@@ -1558,7 +1558,7 @@ dovecot_destination_recipient_limit = 1
smtpd_sasl_path = private/auth
# Virtual delivery settings
virtual_mailbox_base = <VIRTUAL_MAILBOX_BASE>
virtual_mailbox_base = /
virtual_mailbox_maps = mysql:/etc/postfix/mysql-virtual_mailbox_maps.cf
virtual_mailbox_domains = mysql:/etc/postfix/mysql-virtual_mailbox_domains.cf
virtual_alias_maps = mysql:/etc/postfix/mysql-virtual_alias_maps.cf
@@ -2430,7 +2430,7 @@ smtpd_sasl_local_domain = $myhostname
broken_sasl_auth_clients = yes
# Virtual delivery settings
virtual_mailbox_base = <VIRTUAL_MAILBOX_BASE>
virtual_mailbox_base = /
virtual_mailbox_maps = mysql:/etc/postfix/mysql-virtual_mailbox_maps.cf
virtual_mailbox_domains = mysql:/etc/postfix/mysql-virtual_mailbox_domains.cf
virtual_alias_maps = mysql:/etc/postfix/mysql-virtual_alias_maps.cf
@@ -2722,7 +2722,7 @@ default_pass_scheme = CRYPT
#user_query = \
# SELECT home, uid, gid \
# FROM users WHERE username = '%n' AND domain = '%d'
user_query = SELECT CONCAT(homedir, maildir) AS home, CONCAT('maildir:', homedir, maildir) AS mail, uid, gid, CONCAT('*:storage=', (quota*1024)) as quota_rule FROM mail_users WHERE (username = '%u' OR email = '%u')
user_query = SELECT CONCAT(homedir, maildir) AS home, CONCAT('maildir:', homedir, maildir) AS mail, uid, gid, CONCAT('*:storage=', quota, 'M') as quota_rule FROM mail_users WHERE (username = '%u' OR email = '%u')
# If you wish to avoid two SQL lookups (passdb + userdb), you can use
# userdb prefetch instead of userdb sql in dovecot.conf. In that case you'll
@@ -2732,7 +2732,7 @@ user_query = SELECT CONCAT(homedir, maildir) AS home, CONCAT('maildir:', homedir
# SELECT userid AS user, password, \
# home AS userdb_home, uid AS userdb_uid, gid AS userdb_gid \
# FROM users WHERE userid = '%u'
password_query = SELECT username AS user, password_enc AS password, CONCAT(homedir, maildir) AS userdb_home, uid AS userdb_uid, gid AS userdb_gid, CONCAT('maildir:', homedir, maildir) AS userdb_mail, CONCAT('maildir:storage=', (quota*1024)) as userdb_quota FROM mail_users WHERE (username = '%u' OR email = '%u') AND ((imap = 1 AND '%Ls' = 'imap') OR (pop3 = 1 AND '%Ls' = 'pop3') OR '%Ls' = 'smtp' OR '%Ls' = 'sieve')
password_query = SELECT username AS user, password_enc AS password, CONCAT(homedir, maildir) AS userdb_home, uid AS userdb_uid, gid AS userdb_gid, CONCAT('maildir:', homedir, maildir) AS userdb_mail, CONCAT('*:storage=', quota, 'M') as userdb_quota_rule FROM mail_users WHERE (username = '%u' OR email = '%u') AND ((imap = 1 AND '%Ls' = 'imap') OR (pop3 = 1 AND '%Ls' = 'pop3') OR '%Ls' = 'smtp' OR '%Ls' = 'sieve')
# Query to get a list of all usernames.
#iterate_query = SELECT username AS user FROM users
@@ -2740,7 +2740,7 @@ password_query = SELECT username AS user, password_enc AS password, CONCAT(homed
</content>
</file>
<file name="/etc/dovecot/conf.d/10-auth.conf" chown="root:0"
chmod="0640" backup="true">
chmod="0644" backup="true">
<content><![CDATA[
##
## Authentication processes
@@ -2873,7 +2873,7 @@ auth_mechanisms = plain login
</content>
</file>
<file name="/etc/dovecot/conf.d/10-mail.conf" chown="root:0"
chmod="0640" backup="true">
chmod="0644" backup="true">
<content><![CDATA[
##
## Mailbox locations and namespaces
@@ -3241,7 +3241,7 @@ mail_access_groups = vmail
</content>
</file>
<file name="/etc/dovecot/conf.d/15-lda.conf" chown="root:0"
chmod="0640" backup="true">
chmod="0644" backup="true">
<content><![CDATA[
##
## LDA specific settings (also used by LMTP)
@@ -3295,7 +3295,7 @@ protocol lda {
</content>
</file>
<file name="/etc/dovecot/conf.d/20-imap.conf" chown="root:0"
chmod="0640" backup="true">
chmod="0644" backup="true">
<content><![CDATA[
##
## IMAP specific settings
@@ -3359,7 +3359,7 @@ protocol imap {
</content>
</file>
<file name="/etc/dovecot/conf.d/20-managesieve.conf" chown="root:0"
chmod="0640" backup="true">
chmod="0644" backup="true">
<content><![CDATA[
##
## ManageSieve specific settings
@@ -3438,7 +3438,7 @@ protocol sieve {
</content>
</file>
<file name="/etc/dovecot/conf.d/20-pop3.conf" chown="root:0"
chmod="0640" backup="true">
chmod="0644" backup="true">
<content><![CDATA[
##
## POP3 specific settings
@@ -3535,7 +3535,7 @@ protocol pop3 {
</content>
</file>
<file name="/etc/dovecot/conf.d/90-sieve.conf" chown="root:0"
chmod="0640" backup="true">
chmod="0644" backup="true">
<content><![CDATA[
##
## Settings for the Sieve interpreter
@@ -3657,7 +3657,7 @@ plugin {
<include>//service[@type='mail']/general/files[@index=1]
</include>
<file name="/etc/dovecot/conf.d/10-master.conf" chown="root:0"
chmod="0640" backup="true">
chmod="0644" backup="true">
<content><![CDATA[
#default_process_limit = 100
#default_client_limit = 1000
@@ -3798,7 +3798,7 @@ service dict {
<include>//service[@type='mail']/general/files[@index=1]
</include>
<file name="/etc/dovecot/conf.d/10-master.conf" chown="root:0"
chmod="0640" backup="true">
chmod="0644" backup="true">
<content><![CDATA[
#default_process_limit = 100
#default_client_limit = 1000
@@ -4860,7 +4860,7 @@ MySQLGetQTASZ SELECT panel_customers.diskspace/1024 AS QuotaSize FROM panel_cus
# If you're using a transactionnal storage engine, you can enable SQL
# transactions to avoid races. Leave this commented if you are using the
# traditionnal MyIsam engine.
# traditional MyIsam engine.
# MySQLTransactions On
]]>
@@ -4954,16 +4954,19 @@ getpwnam SELECT username,'x',uid,gid,'Froxlor Customer',homedir,shell \
FROM ftp_users \
WHERE username='%1$s' \
AND login_enabled = 'Y' \
ORDER BY LENGTH(username) \
LIMIT 1
getpwuid SELECT username,'x',uid,gid,'Froxlor Customer',homedir,shell \
FROM ftp_users \
WHERE uid='%1$u' \
AND login_enabled = 'Y' \
ORDER BY LENGTH(username) \
LIMIT 1
getspnam SELECT username,password,FLOOR(UNIX_TIMESTAMP()/86400-1),'1','99999','7','-1','-1','0' \
FROM ftp_users \
WHERE username='%1$s' \
AND login_enabled = 'Y' \
ORDER BY LENGTH(username) \
LIMIT 1
getpwent SELECT username,'x',uid,gid,'Froxlor Customer',homedir,shell \
FROM ftp_users
@@ -5086,7 +5089,7 @@ aliases: files
<commands index="1">
<visibility mode="equals" value="apache2">{{settings.system.webserver}}
</visibility>
<command><![CDATA[# add "non-free" after all occurances of "main" in /etc/apt/sources.list]]></command>
<command><![CDATA[# add "non-free" after all occurrences of "main" in /etc/apt/sources.list]]></command>
<command><![CDATA[# this is needed for libapache2-mod-fastcgi to install]]></command>
</commands>
<install>

View File

@@ -201,10 +201,10 @@ if (Settings::Get('panel.version') == null
*/
$cronlog->logAction(CRON_ACTION, LOG_WARNING, 'Automatic update is activated and we are going to proceed without any notices');
$cronlog->logAction(CRON_ACTION, LOG_WARNING, 'all new settings etc. will be stored with the default value, that might not always be right for your system!');
$cronlog->logAction(CRON_ACTION, LOG_WARNING, 'If you dont want this to happen in the future consider removing the --allow-autoupdate flag from the cronjob');
$cronlog->logAction(CRON_ACTION, LOG_WARNING, "If you don't want this to happen in the future consider removing the --allow-autoupdate flag from the cronjob");
fwrite($debugHandler, '*** WARNING *** - Automatic update is activated and we are going to proceed without any notices' . "\n");
fwrite($debugHandler, '*** WARNING *** - all new settings etc. will be stored with the default value, that might not always be right for your system!' . "\n");
fwrite($debugHandler, '*** WARNING *** - If you dont want this to happen in the future consider removing the --allow-autoupdate flag from the cronjob' . "\n");
fwrite($debugHandler, "*** WARNING *** - If you don't want this to happen in the future consider removing the --allow-autoupdate flag from the cronjob\n");
// including update procedures
include_once FROXLOR_INSTALL_DIR.'/install/updatesql.php';
// pew - everything went better than expected
@@ -219,6 +219,3 @@ $cronscriptDebug = (Settings::Get('system.debug_cron') == '1') ? true : false;
// Create a new idna converter
$idna_convert = new idna_convert_wrapper();
// check for cron.d-generation task and create it if necessary
checkCrondConfigurationFile();

View File

@@ -17,6 +17,9 @@
*
*/
// check for cron.d-generation task and create it if necessary
checkCrondConfigurationFile();
if (Settings::Get('logger.log_cron') == '1') {
$cronlog->setCronLog(0);
fwrite($debugHandler, 'Logging for cron has been shutdown' . "\n");

View File

@@ -36,27 +36,38 @@ function findDirs($path, $uid, $gid) {
// valid directory?
if (is_dir($path)) {
try {
// create RecursiveIteratorIterator
$its = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($path));
// we can limit the recursion-depth, but will it be helpful or
// will people start asking "why do I only see 2 subdirectories, i want to use /a/b/c"
// let's keep this in mind and see whether it will be useful
// @TODO
// $its->setMaxDepth(2);
// create RecursiveIteratorIterator
$its = new RecursiveIteratorIterator(new IgnorantRecursiveDirectoryIterator($path));
// we can limit the recursion-depth, but will it be helpful or
// will people start asking "why do I only see 2 subdirectories, i want to use /a/b/c"
// let's keep this in mind and see whether it will be useful
// @TODO
// $its->setMaxDepth(2);
// check every file
foreach ($its as $fullFileName => $it) {
if ($it->isDir() && (fileowner($fullFileName) == $uid || filegroup($fullFileName) == $gid)) {
$_fileList[] = makeCorrectDir(dirname($fullFileName));
}
// check every file
foreach ($its as $fullFileName => $it) {
if ($it->isDir() && (fileowner($fullFileName) == $uid || filegroup($fullFileName) == $gid)) {
$_fileList[] = makeCorrectDir(dirname($fullFileName));
}
} catch (UnexpectedValueException $e) {
// this is thrown if the directory is not found or not readble etc.
// just ignore and keep going
}
}
return array_unique($_fileList);
}
/**
* If you use RecursiveDirectoryIterator with RecursiveIteratorIterator and run
* into UnexpectedValueException you may use this little hack to ignore those
* directories, such as lost+found on linux.
* (User "antennen" @ http://php.net/manual/en/class.recursivedirectoryiterator.php#101654)
**/
class IgnorantRecursiveDirectoryIterator extends RecursiveDirectoryIterator {
function getChildren() {
try {
return new IgnorantRecursiveDirectoryIterator($this->getPathname());
} catch(UnexpectedValueException $e) {
return new RecursiveArrayIterator(array());
}
}
}

View File

@@ -26,6 +26,8 @@
*/
function makeCorrectDir($dir) {
assert('is_string($dir) && strlen($dir) > 0 /* $dir does not look like an actual folder name */');
$dir = trim($dir);
if (substr($dir, -1, 1) != '/') {

View File

@@ -17,39 +17,42 @@
/**
* Generates a random password
*
* @param boolean $isSalt
* optional, create a hash for a salt used in makeCryptPassword because crypt() does not like some special characters in its salts, default is false
*/
function generatePassword()
function generatePassword($isSalt = false)
{
$alpha_lower = 'abcdefghijklmnopqrstuvwxyz';
$alpha_upper = strtoupper($alpha_lower);
$numeric = '0123456789';
$special = Settings::Get('panel.password_special_char');
$length = Settings::Get('panel.password_min_length') > 3 ? Settings::Get('panel.password_min_length') : 10;
$pw = special_shuffle($alpha_lower);
$n = floor(($length) / 4);
if (Settings::Get('panel.password_alpha_upper')) {
$pw .= mb_substr(special_shuffle($alpha_upper), 0, $n);
}
if (Settings::Get('panel.password_numeric')) {
$pw .= mb_substr(special_shuffle($numeric), 0, $n);
}
if (Settings::Get('panel.password_special_char_required')) {
if (Settings::Get('panel.password_special_char_required') && !$isSalt) {
$pw .= mb_substr(special_shuffle($special), 0, $n);
}
$pw = mb_substr($pw, - $length);
return special_shuffle($pw);
}
/**
* multibyte-character safe shuffle function
*
* @param string $str
* @param string $str
*
* @return string
*/

View File

@@ -43,25 +43,25 @@ function makeCryptPassword ($password) {
$cryptPassword = crypt($password);
break;
case 1:
$cryptPassword = crypt($password, '$1$' . generatePassword(). generatePassword());
$cryptPassword = crypt($password, '$1$' . generatePassword(true). generatePassword(true));
break;
case 2:
if (version_compare(phpversion(), '5.3.7', '<')) {
$cryptPassword = crypt($password, '$2a$' . generatePassword(). generatePassword());
$cryptPassword = crypt($password, '$2a$' . generatePassword(true). generatePassword(true));
} else {
// Blowfish hashing with a salt as follows: "$2a$", "$2x$" or "$2y$",
// a two digit cost parameter, "$", and 22 characters from the alphabet "./0-9A-Za-z"
$cryptPassword = crypt(
$password,
'$2y$07$' . substr(generatePassword().generatePassword().generatePassword(), 0, 22)
'$2y$07$' . substr(generatePassword(true).generatePassword(true).generatePassword(true), 0, 22)
);
}
break;
case 3:
$cryptPassword = crypt($password, '$5$' . generatePassword(). generatePassword());
$cryptPassword = crypt($password, '$5$' . generatePassword(true). generatePassword(true));
break;
case 4:
$cryptPassword = crypt($password, '$6$' . generatePassword(). generatePassword());
$cryptPassword = crypt($password, '$6$' . generatePassword(true). generatePassword(true));
break;
default:
$cryptPassword = crypt($password);

View File

@@ -44,9 +44,9 @@ function appendOpenBasedirPath($path = '', $first = false) {
if($path != ''
&& $path != '/'
&& !preg_match("#^/dev#i", $path)
&& !preg_match("#^/proc#i", $path)
&& !preg_match("#^/etc#i", $path)
&& (!preg_match("#^/dev#i", $path) || preg_match("#^/dev/urandom#i", $path))
&& !preg_match("#^/proc#i", $path)
&& !preg_match("#^/etc#i", $path)
&& !preg_match("#^/sys#i", $path)
&& !preg_match("#:#", $path)
) {

View File

@@ -30,11 +30,11 @@ function validateUsername($username, $unix_names = 1, $mysql_max = '') {
if ($unix_names == 0) {
if (strpos($username, '--') === false) {
return (preg_match('/^[a-z][a-z0-9\-_]{1,' . (int)($mysql_max - 1) . '}[a-z0-9]{1}$/Di', $username) != false);
return (preg_match('/^[a-z][a-z0-9\-_]{0,' . (int)($mysql_max - 1) . '}[a-z0-9]{1}$/Di', $username) != false);
} else {
return false;
}
} else {
return (preg_match('/^[a-z][a-z0-9]{1,' . $mysql_max . '}$/Di', $username) != false);
return (preg_match('/^[a-z][a-z0-9]{0,' . $mysql_max . '}$/Di', $username) != false);
}
}

View File

@@ -505,12 +505,13 @@ if (array_key_exists('css', $_themeoptions['variants'][$themevariant]) && is_arr
}
}
eval("\$header = \"" . getTemplate('header', '1') . "\";");
unset($js);
unset($css);
$current_year = date('Y', time());
eval("\$footer = \"" . getTemplate('footer', '1') . "\";");
unset($js);
unset($css);
if (isset($_POST['action'])) {
$action = $_POST['action'];
} elseif(isset($_GET['action'])) {

View File

@@ -16,7 +16,7 @@
*/
// Main version variable
$version = '0.9.34';
$version = '0.9.34.1';
// Database version (unused, old stuff from SysCP)
$dbversion = '2';

View File

@@ -1834,7 +1834,7 @@ $lng['usersettings']['custom_notes']['title'] = 'Custom notes';
$lng['usersettings']['custom_notes']['description'] = 'Feel free to put any notes you want/need in here. They will show up in the admin/customer overview for the corresponding user.';
$lng['usersettings']['custom_notes']['show'] = 'Show your notes on the dashboard of the user';
$lng['serversettings']['system_send_cron_errors']['title'] = 'Send cron-errors to froxlor-admin via e-mail';
$lng['serversettings']['system_send_cron_errors']['description'] = 'Chose whether you want to receive an e-mail on cronjob errors. Keep in mind that this can lead to an e-mail being sent every 5 minutes depending on the error and your cronjob settings.';
$lng['serversettings']['system_send_cron_errors']['description'] = 'Choose whether you want to receive an e-mail on cronjob errors. Keep in mind that this can lead to an e-mail being sent every 5 minutes depending on the error and your cronjob settings.';
$lng['error']['fcgidandphpfpmnogoodtogether'] = 'FCGID and PHP-FPM cannot be activated at the same time';
// Added in Froxlor 0.9.34

View File

@@ -299,6 +299,20 @@ class apache extends HttpConfigBase {
$this->virtualhosts_data[$vhosts_filename] .= ' Alias /fastcgiphp ' . $php->getInterface()->getAliasConfigDir() . $srvName . "\n";
}
}
else
{
// mod_php
$domain = array(
'id' => 'none',
'domain' => Settings::Get('system.hostname'),
'adminid' => 1, /* first admin-user (superadmin) */
'guid' => Settings::Get('system.httpuser'),
'openbasedir' => 0,
'email' => Settings::Get('panel.adminmail'),
'loginname' => 'froxlor.panel',
'documentroot' => $mypath
);
}
/**
* dirprotection, see #72
@@ -804,6 +818,13 @@ class apache extends HttpConfigBase {
$vhost_content .= ' SSLCertificateChainFile ' . makeCorrectFile($domain['ssl_cert_chainfile']) . "\n";
}
}
else
{
// if there is no cert-file specified but we are generating a ssl-vhost,
// we should return an empty string because this vhost would suck dick, ref #1583
$this->logger->logAction(CRON_ACTION, LOG_ERROR, $domain['domain'] . ' :: empty certificate file! Cannot create ssl-directives');
return '# no ssl-certificate was specified for this domain, therefore no explicit vhost is being generated';
}
}
if (preg_match('/^https?\:\/\//', $domain['documentroot'])) {
@@ -1046,7 +1067,7 @@ class apache extends HttpConfigBase {
if (!file_exists($perlsymlink)) {
safe_exec('ln -s '.escapeshellarg($suexecpath).' '.escapeshellarg($perlsymlink));
}
safe_exec('chown '.escapeshellarg($row_diroptions['guid']).':'.escapeshellarg($row_diroptions['guid']).' '.escapeshellarg($perlsymlink));
safe_exec('chown -h '.escapeshellarg($row_diroptions['guid']).':'.escapeshellarg($row_diroptions['guid']).' '.escapeshellarg($perlsymlink));
}
} else {
// if no perl-execution is enabled but the workaround is,

View File

@@ -328,6 +328,11 @@ class nginx extends HttpConfigBase {
return '';
}
// check whether the customer is deactivated an NO docroot for deactivated users has been set
if ($domain['deactivated'] == '1' && empty(Settings::Get('system.deactivateddocroot'))) {
return '# Customer deactivated and a docroot for deactivated users hasn\'t been set.' . "\n";
}
$vhost_content = '';
$_vhost_content = '';
@@ -414,6 +419,14 @@ class nginx extends HttpConfigBase {
$domain['documentroot'] = 'https://' . $domain['domain'] . $_sslport . '/';
}
// create ssl settings first since they are required for normal and redirect vhosts
if ($ssl_vhost === true
&& $domain['ssl'] == '1'
&& Settings::Get('system.use_ssl') == '1'
) {
$vhost_content.= "\n" . $this->composeSslSettings($domain) . "\n";
}
// if the documentroot is an URL we just redirect
if (preg_match('/^https?\:\/\//', $domain['documentroot'])) {
$uri = $this->idnaConvert->encode($domain['documentroot']);
@@ -429,12 +442,6 @@ class nginx extends HttpConfigBase {
if ($this->_deactivated == false) {
if ($ssl_vhost === true
&& $domain['ssl'] == '1'
&& Settings::Get('system.use_ssl') == '1'
) {
$vhost_content.= $this->composeSslSettings($domain);
}
$vhost_content = $this->mergeVhostCustom($vhost_content, $this->create_pathOptions($domain)) . "\n";
$vhost_content.= $this->composePhpOptions($domain, $ssl_vhost);

View File

@@ -32,7 +32,7 @@ require_once makeCorrectFile(dirname(__FILE__) . '/cron_tasks.inc.http.35.nginx_
fwrite($debugHandler, ' cron_tasks: Searching for tasks to do' . "\n");
$cronlog->logAction(CRON_ACTION, LOG_INFO, "Searching for tasks to do");
$result_tasks_stmt = Database::query("
SELECT `id`, `type`, `data` FROM `" . TABLE_PANEL_TASKS . "` ORDER BY `id` ASC
SELECT `id`, `type`, `data` FROM `" . TABLE_PANEL_TASKS . "` WHERE `type` <> '99' ORDER BY `id` ASC
");
$num_results = Database::num_rows();
$resultIDs = array();

View File

@@ -131,8 +131,8 @@ function awstatsGenerateIndex($domain, $outputdir) {
// Write the index file
{
// 'index.html' used to be a symlink
unlink(makeCorrectFile($outputdir . '/' . 'index.html'));
// 'index.html' used to be a symlink (ignore errors in case this is the first run and no index.html exists yet)
@unlink(makeCorrectFile($outputdir . '/' . 'index.html'));
$awstats_index_file = fopen(makeCorrectFile($outputdir . '/' . 'index.html'), 'w');
$awstats_index_tpl = fopen($index_file, 'r');

View File

@@ -23,9 +23,15 @@
<div class="bar" aria-valuenow="{$disk_percent}" aria-valuemin="0" aria-valuemax="100"></div>
</div>
<else>
<div class="progress tipper" title="{$row['diskspace_used']} MiB {$lng['panel']['used']}, {$row['diskspace']} MiB {$lng['panel']['assigned']}">
<div class="bar" aria-valuenow="{$disk_percent}" aria-valuemin="0" aria-valuemax="100"></div>
</div>
<if (($row['diskspace']/100)*((int)Settings::Get('system.report_webmax') - 15)) < $row['diskspace_used']>
<div class="progress progress-warn tipper" title="{$row['diskspace_used']} MiB {$lng['panel']['used']}, {$row['diskspace']} MiB {$lng['panel']['assigned']}">
<div class="bar" aria-valuenow="{$disk_percent}" aria-valuemin="0" aria-valuemax="100"></div>
</div>
<else>
<div class="progress tipper" title="{$row['diskspace_used']} MiB {$lng['panel']['used']}, {$row['diskspace']} MiB {$lng['panel']['assigned']}">
<div class="bar" aria-valuenow="{$disk_percent}" aria-valuemin="0" aria-valuemax="100"></div>
</div>
</if>
</if>
<else>
<div class="progress">∞
@@ -41,9 +47,15 @@
<div class="bar" aria-valuenow="{$traffic_percent}" aria-valuemin="0" aria-valuemax="100"></div>
</div>
<else>
<div class="progress tipper" title="{$row['traffic_used']} GiB {$lng['panel']['used']}, {$row['traffic']} GiB {$lng['panel']['assigned']}">
<div class="bar" aria-valuenow="{$traffic_percent}" aria-valuemin="0" aria-valuemax="100"></div>
</div>
<if (($row['traffic']/100)*((int)Settings::Get('system.report_trafficmax') - 15)) < $row['traffic_used']>
<div class="progress progress-warn tipper" title="{$row['traffic_used']} GiB {$lng['panel']['used']}, {$row['traffic']} GiB {$lng['panel']['assigned']}">
<div class="bar" aria-valuenow="{$traffic_percent}" aria-valuemin="0" aria-valuemax="100"></div>
</div>
<else>
<div class="progress tipper" title="{$row['traffic_used']} GiB {$lng['panel']['used']}, {$row['traffic']} GiB {$lng['panel']['assigned']}">
<div class="bar" aria-valuenow="{$traffic_percent}" aria-valuemin="0" aria-valuemax="100"></div>
</div>
</if>
</if>
<else>
<div class="progress">∞

View File

@@ -30,9 +30,15 @@
<div class="bar" aria-valuenow="{$disk_percent}" aria-valuemin="0" aria-valuemax="100"></div>
</div>
<else>
<div class="progress tipper" title="{$row['diskspace_used']} MiB {$lng['panel']['used']}, {$row['diskspace']} MiB {$lng['panel']['assigned']}">
<div class="bar" aria-valuenow="{$disk_percent}" aria-valuemin="0" aria-valuemax="100"></div>
</div>
<if (($row['diskspace']/100)*((int)Settings::Get('system.report_webmax') - 15)) < $row['diskspace_used']>
<div class="progress progress-warn tipper" title="{$row['diskspace_used']} MiB {$lng['panel']['used']}, {$row['diskspace']} MiB {$lng['panel']['assigned']}">
<div class="bar" aria-valuenow="{$disk_percent}" aria-valuemin="0" aria-valuemax="100"></div>
</div>
<else>
<div class="progress tipper" title="{$row['diskspace_used']} MiB {$lng['panel']['used']}, {$row['diskspace']} MiB {$lng['panel']['assigned']}">
<div class="bar" aria-valuenow="{$disk_percent}" aria-valuemin="0" aria-valuemax="100"></div>
</div>
</if>
</if>
<else>
<div class="progress">∞
@@ -48,9 +54,15 @@
<div class="bar" aria-valuenow="{$traffic_percent}" aria-valuemin="0" aria-valuemax="100"></div>
</div>
<else>
<div class="progress tipper" title="{$row['traffic_used']} GiB {$lng['panel']['used']}, {$row['traffic']} GiB {$lng['panel']['assigned']}">
<div class="bar" aria-valuenow="{$traffic_percent}" aria-valuemin="0" aria-valuemax="100"></div>
</div>
<if (($row['traffic']/100)*((int)Settings::Get('system.report_trafficmax') - 15)) < $row['traffic_used']>
<div class="progress progress-warn tipper" title="{$row['traffic_used']} GiB {$lng['panel']['used']}, {$row['traffic']} GiB {$lng['panel']['assigned']}">
<div class="bar" aria-valuenow="{$traffic_percent}" aria-valuemin="0" aria-valuemax="100"></div>
</div>
<else>
<div class="progress tipper" title="{$row['traffic_used']} GiB {$lng['panel']['used']}, {$row['traffic']} GiB {$lng['panel']['assigned']}">
<div class="bar" aria-valuenow="{$traffic_percent}" aria-valuemin="0" aria-valuemax="100"></div>
</div>
</if>
</if>
<else>
<div class="progress">∞

View File

@@ -785,6 +785,10 @@ select[multiple="multiple"] {
background-color:#dd514c;
}
.progress-warn .bar {
background-color:#e6b64e;
}
.maintable {
width:90%;
}

View File

@@ -8,7 +8,7 @@
if (!execAsap)
func.apply(obj, args);
timeout = null;
};
}
if (timeout)
clearTimeout(timeout);
@@ -17,7 +17,7 @@
timeout = setTimeout(delayed, threshold || 100);
};
}
};
// smartresize
jQuery.fn[sr] = function(fn){ return fn ? this.bind('resize', debounce(fn)) : this.trigger(sr); };
@@ -140,4 +140,4 @@ function circularText(canvas, x, y, size, text, color) {
fontFamily: "Lucida Grande, Verdana, sans-serif",
text: text
});
}
}

View File

@@ -57,7 +57,7 @@
<footer>
<span>
<img src="data:image/png;base64,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" style="height: 13px; margin: 0 2px 3px 0; vertical-align:middle;"/>
&copy; 2009-2015 by <a href="http://www.froxlor.org">the Froxlor Team</a>
&copy; 2009-2016 by <a href="http://www.froxlor.org">the Froxlor Team</a>
</span>
</footer>
</body>