View Single Post
Old 2nd May 2007, 14:30
Hawker Hawker is offline
Senior Member
Join Date: Feb 2007
Posts: 100
Thanks: 0
Thanked 9 Times in 9 Posts

Have you ever been doing something totally unrelated to ISPC and suddenly had something come to mind that could be a problem for ISPC? Well I just did...

If you use my solution above, this should be place in a variable...
date("m_d_Y__H_i_s", $current_date)
Such as...
$backup_date == date("m_d_Y__H_i_s", $current_date);
Changing the code sections to...
$backup_date == date("m_d_Y__H_i_s", $current_date);
if(is_dir("/etc/Bastille")) caselog("mv -f /etc/Bastille /etc/Bastille.backup_".$backup_date, $FILE, __LINE__);
  @mkdir("/etc/Bastille", octdec($directory_mode));
if(is_dir("/etc/Bastille.backup_".$backup_date."/firewall.d") {
  @mkdir("/etc/Bastille/firewall.d", octdec($directory_mode));
  caselog("cp -f /etc/Bastille.backup_".$backup_date."/firewall.d/ /etc/Bastille/firewall.d/", $FILE, __LINE__);
  caselog("chmod 644 /etc/Bastille/firewall.d/", $FILE, __LINE__);
Otherwise if a user begins this part of the code at 23:59:59:XX it is possible that the current date will change and the part of the code to copy the directory will fail.
Reply With Quote