Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Register
Sign in
Toggle navigation
Menu
Open sidebar
isp
ISPConfig 3
Commits
1f44b67e
Commit
1f44b67e
authored
Jun 06, 2012
by
tbrehm
Browse files
Fixed: FS#2043 - SASL configuration mistake
Fixed: PHP notices in jailkit user plugin.
parent
9c513ce8
Changes
3
Hide whitespace changes
Inline
Side-by-side
install/lib/installer_base.lib.php
View file @
1f44b67e
...
...
@@ -750,9 +750,22 @@ class installer_base {
public
function
configure_saslauthd
()
{
global
$conf
;
//* Get saslsauthd version
exec
(
'saslauthd -v 2>&1'
,
$out
);
$parts
=
explode
(
' '
,
$out
[
0
]);
$saslversion
=
$parts
[
1
];
unset
(
$parts
);
unset
(
$out
);
$configfile
=
'sasl_smtpd.conf'
;
if
(
version_compare
(
$saslversion
,
'2.1.23'
)
>
0
)
{
//* Configfile for saslauthd versions 2.1.24 and newer
$configfile
=
'sasl_smtpd2.conf'
;
}
else
{
//* Configfile for saslauthd versions up to 2.1.23
$configfile
=
'sasl_smtpd.conf'
;
}
if
(
is_file
(
$conf
[
'postfix'
][
'config_dir'
]
.
'/sasl/smtpd.conf'
))
copy
(
$conf
[
'postfix'
][
'config_dir'
]
.
'/sasl/smtpd.conf'
,
$conf
[
'postfix'
][
'config_dir'
]
.
'/sasl/smtpd.conf~'
);
if
(
is_file
(
$conf
[
'postfix'
][
'config_dir'
]
.
'/sasl/smtpd.conf~'
))
chmod
(
$conf
[
'postfix'
][
'config_dir'
]
.
'/sasl/smtpd.conf~'
,
0400
);
$content
=
rf
(
'tpl/'
.
$configfile
.
'.master'
);
...
...
install/tpl/sasl_smtpd2.conf.master
0 → 100644
View file @
1f44b67e
pwcheck_method: saslauthd
mech_list: plain login
allow_plaintext: true
auxprop_plugin: sql
sql_engine: mysql
sql_hostnames: {mysql_server_ip}
sql_user: {mysql_server_ispconfig_user}
sql_passwd: {mysql_server_ispconfig_password}
sql_database: {mysql_server_database}
sql_select: select password from mail_user where login = '%u@%r' and postfix = 'y'
server/plugins-available/shelluser_jailkit_plugin.inc.php
View file @
1f44b67e
...
...
@@ -376,9 +376,9 @@ class shelluser_jailkit_plugin {
if
(
is_file
(
'/root/.ssh/authorized_keys'
))
file_put_contents
(
$sshkeys
,
file_get_contents
(
'/root/.ssh/authorized_keys'
));
// Remove duplicate keys
$existing_keys
=
file
(
$sshkeys
);
$existing_keys
=
@
file
(
$sshkeys
);
$new_keys
=
explode
(
"
\n
"
,
$userkey
);
$final_keys_arr
=
array_merge
(
$existing_keys
,
$new_keys
);
$final_keys_arr
=
@
array_merge
(
$existing_keys
,
$new_keys
);
$new_final_keys_arr
=
array
();
if
(
is_array
(
$final_keys_arr
)
&&
!
empty
(
$final_keys_arr
)){
foreach
(
$final_keys_arr
as
$key
=>
$val
){
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment