1. 26 Jan, 2010 1 commit
  2. 23 Jan, 2010 1 commit
  3. 21 Jan, 2010 1 commit
  4. 20 Jan, 2010 1 commit
    • anarcat's avatar
      do not follow symlinks · 2a1c3e8c
      anarcat authored
      this is to avoid the possibility of Denial of Service attacks from the drupal admins: if someone were to create a symlink in files/ that would point to the parent sites/ directory, the recursive chmod that happen on verify would loop inifinitely (i saw one running for 1h)
      2a1c3e8c
  5. 18 Jan, 2010 2 commits
    • anarcat's avatar
      #683800 - fix removal of symlink on site removal · 1ee65ab6
      anarcat authored
      this was failing because provision_path_unlink was checking the file existence (file_exists) before removing the symlink. in this case, the file really *didn't* exist because the link target was already removed.
      
      instead of checking, we just try to delete the file, if it fails, it will return false anyways.
      
      we do the same with rmdir while we're here.
      
      also make sure we work on the trimmed file path
      1ee65ab6
    • anarcat's avatar
      #683800 - fix removal of symlink on site removal · dc08388c
      anarcat authored
      this was failing because provision_path_unlink was checking the file existence (file_exists) before removing the symlink. in this case, the file really *didn't* exist because the link target was already removed.
      
      instead of checking, we just try to delete the file, if it fails, it will return false anyways.
      
      we do the same with rmdir while we're here.
      
      also make sure we work on the trimmed file path
      dc08388c
  6. 01 Oct, 2009 1 commit
  7. 26 Aug, 2009 1 commit
  8. 27 Jul, 2009 1 commit
  9. 01 Jul, 2009 1 commit
  10. 30 Jun, 2009 1 commit
  11. 08 Jun, 2009 1 commit
  12. 20 Mar, 2009 1 commit
  13. 22 Feb, 2009 2 commits
  14. 11 Feb, 2009 1 commit
  15. 03 Feb, 2009 2 commits
  16. 28 Nov, 2008 1 commit
  17. 13 Nov, 2008 1 commit
  18. 28 Oct, 2008 2 commits
  19. 16 Oct, 2008 2 commits
  20. 14 Oct, 2008 1 commit
  21. 22 Aug, 2008 1 commit
  22. 27 Jun, 2008 5 commits
  23. 19 Jun, 2008 2 commits
  24. 12 Jun, 2008 2 commits
    • Adrian Rossouw's avatar
      More work towards restore functionality. Moved the mysql utility functions to... · 11d12e65
      Adrian Rossouw authored
      More work towards restore functionality. Moved the mysql utility functions to provision_mysql.inc, and the help stuff to it's own include too.
      
      Made more constants to replace the various helper functions, still need to document them.
      
      Replaced all references to db_username with db_user, which is consistent with everywhere else in the system.
      11d12e65
    • Adrian Rossouw's avatar
      Practically completely rewrote the provision_check_path function. · 76e90b74
      Adrian Rossouw authored
      It is now called provision_path, and instead of the nasty switch statement it has a small set of pluggable  functions, which work similarly to theme() etc. For that reason I also ended up changing the order of the parameters to be provision_path('mkdir', 'somepath').
      
      The functionality grew to over 200 lines of code (mostly comments), so i split it off into it's own file.
      
      I also added checks that the user is in the correct group, and it will specify it to the user if it comes to it, but I should really hook it up into the user interface and write some better documentation about it before i can close #245664. Although it seems chgrp now fails silently for me, even from the command line. Please check it out.
      
      I moved _provision_drupal_recursive_delete to provision.inc and removed the drupal from the module prefix. I also made it use the provision_path module for logging purposes, cleaning it up a bit.
      
      #262008 is now completely fixed. I've re-added the permission checking in provision_drupal.module, since it now works. It was missing a clearstatcache(), so i added these pretty liberally.
      
      Part of the fallout from this, is that each of the provision_path_ functions have an optional third parameter, which is a reference. This reference can be used to provide a reason for the operation failing. Also, mostly due to the chown function, i run the messages through t() before they get sent to logs. Meaning developers can just use @path and @confirm in their error messages, and they get the centrally prettied up variables. It's made the verify code a lot easier on the eyes. just check out provision_verify.
      
      Added redirection to a new site maintenance page, for while the site is being restored.
      
      Added a switch paths function, which flips around site directories. I'm building restore to be non-destructive, until after the site has been completely restored and verfied. #237555
      
      I'm making a move to using more defines for various site infrastructure things. I just tackled the paths, will do the current user and current group stuff soon, bringing it back in line with hosting. It cleared up a fair amount of code just doing the paths.
      76e90b74