Skip to content

Commit be3234e

Browse files
author
tekati
committed
Removed other group permissions o= from pam.d/smtp file in installer_base.lib.php file.
1 parent 0d27f8b commit be3234e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

install/lib/installer_base.lib.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -637,6 +637,8 @@ public function configure_pam() {
637637
//* configure pam for SMTP authentication agains the ispconfig database
638638
$configfile = 'pamd_smtp';
639639
if(is_file("$pam/smtp")) copy("$pam/smtp", "$pam/smtp~");
640+
// On some OSes smtp is world readable which allows for reading database information. Removing world readable rights should have no effect.
641+
if(is_file("$pam/smtp")) exec("chmod o= $pam/smtp");
640642
if(is_file("$pam/smtp~")) exec("chmod 400 $pam/smtp~");
641643

642644
$content = rf("tpl/$configfile.master");
@@ -1638,4 +1640,4 @@ protected function insert_db_credentials($tContents) {
16381640
}
16391641
}
16401642

1641-
?>
1643+
?>

0 commit comments

Comments
 (0)