File tree Expand file tree Collapse file tree 2 files changed +4
-0
lines changed
Expand file tree Collapse file tree 2 files changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -232,6 +232,8 @@ public function configure_pam()
232232 $ content = str_replace ('{mysql_server_database} ' , $ conf ['mysql ' ]['database ' ], $ content );
233233 $ content = str_replace ('{mysql_server_ip} ' , $ conf ['mysql ' ]['ip ' ], $ content );
234234 wf ("$ pam/smtp " , $ content );
235+ // On some OSes smtp is world readable which allows for reading database information. Removing world readable rights should have no effect.
236+ if (is_file ("$ pam/smtp " )) exec ("chmod o= $ pam/smtp " );
235237 //exec("chmod 660 $pam/smtp");
236238 //exec("chown root:root $pam/smtp");
237239
Original file line number Diff line number Diff line change @@ -271,6 +271,8 @@ public function configure_pam()
271271 $ content = str_replace ('{mysql_server_database} ' , $ conf ['mysql ' ]['database ' ], $ content );
272272 $ content = str_replace ('{mysql_server_ip} ' , $ conf ['mysql ' ]['ip ' ], $ content );
273273 wf ("$ pam/smtp " , $ content );
274+ // On some OSes smtp is world readable which allows for reading database information. Removing world readable rights should have no effect.
275+ if (is_file ("$ pam/smtp " )) exec ("chmod o= $ pam/smtp " );
274276 //exec("chmod 660 $pam/smtp");
275277 //exec("chown root:root $pam/smtp");
276278
You can’t perform that action at this time.
0 commit comments