Changeset 3601


Ignore:
Timestamp:
Jul 25, 2016, 4:35:21 PM (3 years ago)
Author:
bruno
Message:

Fix #804 by adding logging for /boot content

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3.2/mondo/src/mondorestore/mondo-rstr-tools.c

    r3600 r3601  
    588588void protect_against_braindead_sysadmins() {
    589589
    590 run_program_and_log_output("touch " MNT_RESTORING "/var/log/pacct", FALSE);
    591 run_program_and_log_output("touch " MNT_RESTORING "/var/account/pacct", FALSE);
    592 if (run_program_and_log_output("ls -al " MNT_RESTORING " /tmp", FALSE)) {
    593     run_program_and_log_output("chmod 1777 " MNT_RESTORING "/tmp", FALSE);
    594 }
    595 run_program_and_log_output("mkdir -p " MNT_RESTORING "/var/run/console", FALSE);
    596 run_program_and_log_output("chmod 777 " MNT_RESTORING "/dev/null", FALSE);
    597 run_program_and_log_output("cd " MNT_RESTORING "; for i in `ls home/`; do echo \"Moving $i's spurious files to $i/.disabled\"; mkdir \"$i\"/.disabled ; mv -f \"$i\"/.DCOP* \"$i\"/.MCOP* \"$i\"/.*authority \"$i\"/.kde/tmp* \"$i\"/.kde/socket* \"$i\"/.disabled/ ; done", TRUE);
    598 run_program_and_log_output("rm -f " MNT_RESTORING "/var/run/*.pid", TRUE);
    599 run_program_and_log_output("rm -f " MNT_RESTORING "/var/lock/subsys/*", TRUE);
     590run_program_and_log_output("touch " MNT_RESTORING "/var/log/pacct", 0);
     591run_program_and_log_output("touch " MNT_RESTORING "/var/account/pacct", 0);
     592
     593/* Log the status of the boot area */
     594run_program_and_log_output("ls -alR " MNT_RESTORING "/boot", 0);
     595
     596if (run_program_and_log_output("ls -al " MNT_RESTORING " /tmp", 0)) {
     597    run_program_and_log_output("chmod 1777 " MNT_RESTORING "/tmp", 0);
     598}
     599run_program_and_log_output("mkdir -p " MNT_RESTORING "/var/run/console", 0);
     600run_program_and_log_output("chmod 777 " MNT_RESTORING "/dev/null", 0);
     601run_program_and_log_output("cd " MNT_RESTORING "; for i in `ls home/`; do echo \"Moving $i's spurious files to $i/.disabled\"; mkdir \"$i\"/.disabled ; mv -f \"$i\"/.DCOP* \"$i\"/.MCOP* \"$i\"/.*authority \"$i\"/.kde/tmp* \"$i\"/.kde/socket* \"$i\"/.disabled/ ; done", 1);
     602run_program_and_log_output("rm -f " MNT_RESTORING "/var/run/*.pid", 1);
     603run_program_and_log_output("rm -f " MNT_RESTORING "/var/lock/subsys/*", 1);
    600604}
    601605
Note: See TracChangeset for help on using the changeset viewer.