passenger 3.0.1 → 3.0.2

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of passenger might be problematic. Click here for more details.

@@ -0,0 +1,36 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2
+ <html xmlns="http://www.w3.org/1999/xhtml">
3
+ <head>
4
+ <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
5
+ <title>Passenger: Member List</title>
6
+ <link href="tabs.css" rel="stylesheet" type="text/css"/>
7
+ <link href="doxygen.css" rel="stylesheet" type="text/css"/>
8
+ </head>
9
+ <body>
10
+ <!-- Generated by Doxygen 1.6.2 -->
11
+ <div class="navigation" id="top">
12
+ <div class="tabs">
13
+ <ul>
14
+ <li><a href="main.html"><span>Main&nbsp;Page</span></a></li>
15
+ <li><a href="modules.html"><span>Modules</span></a></li>
16
+ <li><a href="namespaces.html"><span>Namespaces</span></a></li>
17
+ <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
18
+ <li><a href="files.html"><span>Files</span></a></li>
19
+ </ul>
20
+ </div>
21
+ <div class="tabs">
22
+ <ul>
23
+ <li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
24
+ <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
25
+ <li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
26
+ </ul>
27
+ </div>
28
+ </div>
29
+ <div class="contents">
30
+ <h1>Passenger::ResourceLocator Member List</h1>This is the complete list of members for <a class="el" href="classPassenger_1_1ResourceLocator.html">Passenger::ResourceLocator</a>, including all inherited members.<table>
31
+ </table></div>
32
+ <hr size="1"/><address style="text-align: right;"><small>Generated by&nbsp;
33
+ <a href="http://www.doxygen.org/index.html">
34
+ <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.2 </small></address>
35
+ </body>
36
+ </html>
@@ -0,0 +1,51 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2
+ <html xmlns="http://www.w3.org/1999/xhtml">
3
+ <head>
4
+ <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
5
+ <title>Passenger: Passenger::ResourceLocator Class Reference</title>
6
+ <link href="tabs.css" rel="stylesheet" type="text/css"/>
7
+ <link href="doxygen.css" rel="stylesheet" type="text/css"/>
8
+ </head>
9
+ <body>
10
+ <!-- Generated by Doxygen 1.6.2 -->
11
+ <div class="navigation" id="top">
12
+ <div class="tabs">
13
+ <ul>
14
+ <li><a href="main.html"><span>Main&nbsp;Page</span></a></li>
15
+ <li><a href="modules.html"><span>Modules</span></a></li>
16
+ <li><a href="namespaces.html"><span>Namespaces</span></a></li>
17
+ <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
18
+ <li><a href="files.html"><span>Files</span></a></li>
19
+ </ul>
20
+ </div>
21
+ <div class="tabs">
22
+ <ul>
23
+ <li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
24
+ <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
25
+ <li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
26
+ </ul>
27
+ </div>
28
+ <div class="navpath"><a class="el" href="namespacePassenger.html">Passenger</a>::<a class="el" href="classPassenger_1_1ResourceLocator.html">ResourceLocator</a>
29
+ </div>
30
+ </div>
31
+ <div class="contents">
32
+ <h1>Passenger::ResourceLocator Class Reference</h1><!-- doxytag: class="Passenger::ResourceLocator" -->
33
+ <p>Locates various Phusion <a class="el" href="namespacePassenger.html" title="Common code for all agents.">Passenger</a> resources on the filesystem.
34
+ <a href="#_details">More...</a></p>
35
+
36
+ <p><code>#include &lt;<a class="el" href="ResourceLocator_8h_source.html">ResourceLocator.h</a>&gt;</code></p>
37
+
38
+ <p><a href="classPassenger_1_1ResourceLocator-members.html">List of all members.</a></p>
39
+ <table border="0" cellpadding="0" cellspacing="0">
40
+ </table>
41
+ <hr/><a name="_details"></a><h2>Detailed Description</h2>
42
+ <p>Locates various Phusion <a class="el" href="namespacePassenger.html" title="Common code for all agents.">Passenger</a> resources on the filesystem. </p>
43
+ <hr/>The documentation for this class was generated from the following file:<ul>
44
+ <li><a class="el" href="ResourceLocator_8h_source.html">ResourceLocator.h</a></li>
45
+ </ul>
46
+ </div>
47
+ <hr size="1"/><address style="text-align: right;"><small>Generated by&nbsp;
48
+ <a href="http://www.doxygen.org/index.html">
49
+ <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.2 </small></address>
50
+ </body>
51
+ </html>
@@ -0,0 +1,3 @@
1
+ <map id="G" name="G">
2
+ <area shape="rect" id="node1" href="$classServerInstanceDirToucher.html" title="Touch all files in the server instance dir every 6 hours in order to prevent /tmp..." alt="" coords="7,5,191,35"/>
3
+ </map>
@@ -0,0 +1 @@
1
+ 895fbb1cabd5da8622d5341648d91bb3
Binary file
@@ -553,11 +553,19 @@ public:
553
553
  killProcessGroupAndWait(&pid, 5000);
554
554
  guard.clear();
555
555
  if (e == ENOENT) {
556
+ string passengerRootConfig;
557
+ if (type == APACHE) {
558
+ passengerRootConfig = "PassengerRoot";
559
+ } else {
560
+ passengerRootConfig = "passenger_root";
561
+ }
556
562
  throw RuntimeException("Unable to start the Phusion Passenger watchdog "
557
563
  "because its executable (" + watchdogFilename + ") does "
558
564
  "not exist. This probably means that your Phusion Passenger "
559
- "installation is broken or incomplete. Please reinstall "
560
- "Phusion Passenger");
565
+ "installation is broken or incomplete, or that your '" +
566
+ passengerRootConfig + "' directive is set to the wrong value. "
567
+ "Please reinstall Phusion Passenger or fix your '" +
568
+ passengerRootConfig + "' directive, whichever is applicable.");
561
569
  } else {
562
570
  throw SystemException("Unable to start the Phusion Passenger watchdog (" +
563
571
  watchdogFilename + ")", e);
@@ -26,7 +26,7 @@
26
26
  #define _PASSENGER_CONSTANTS_H_
27
27
 
28
28
  /* Don't forget to update lib/phusion_passenger.rb too. */
29
- #define PASSENGER_VERSION "3.0.1"
29
+ #define PASSENGER_VERSION "3.0.2"
30
30
 
31
31
  #define FEEDBACK_FD 3
32
32
 
data/ext/common/IniFile.h CHANGED
@@ -12,6 +12,7 @@
12
12
  #include <cctype>
13
13
  #include <boost/shared_ptr.hpp>
14
14
  #include <boost/make_shared.hpp>
15
+ #include <Exceptions.h>
15
16
 
16
17
  namespace Passenger {
17
18
 
@@ -295,6 +296,11 @@ public:
295
296
  currentColumn = 1;
296
297
  upcomingTokenPtrIsStale = true;
297
298
  iniFileStream.open(fileName.c_str());
299
+ if (iniFileStream.fail()) {
300
+ int e = errno;
301
+ throw FileSystemException("Cannot open file '" + fileName + "' for reading",
302
+ e, fileName);
303
+ }
298
304
  }
299
305
 
300
306
  ~IniFileLexer() {
@@ -390,7 +396,7 @@ protected:
390
396
  }
391
397
 
392
398
  void parseSection() {
393
- Token token = acceptAndReturnif (Token::SECTION_NAME);
399
+ Token token = acceptAndReturnif(Token::SECTION_NAME);
394
400
  acceptIfEOL();
395
401
 
396
402
  string sectionName = token.value;
@@ -447,7 +453,9 @@ protected:
447
453
  };
448
454
 
449
455
  public:
450
- IniFile(const string &iniFileName) : name(iniFileName) {
456
+ IniFile(const string &iniFileName)
457
+ : name(iniFileName)
458
+ {
451
459
  IniFileParser parser(this);
452
460
  }
453
461
 
@@ -577,10 +577,18 @@ public:
577
577
  unsigned int ret;
578
578
  try {
579
579
  ret = Passenger::readExact(fd, buf, size, &t);
580
- *timeout = llroundl((long double) t / 1000);
580
+ #ifdef __NetBSD__
581
+ *timeout = llround((double) t / 1000);
582
+ #else
583
+ *timeout = llroundl((long double) t / 1000);
584
+ #endif
581
585
  return ret == size;
582
586
  } catch (...) {
583
- *timeout = llroundl((long double) t / 1000);
587
+ #ifdef __NetBSD__
588
+ *timeout = llround((double) t / 1000);
589
+ #else
590
+ *timeout = llroundl((long double) t / 1000);
591
+ #endif
584
592
  throw;
585
593
  }
586
594
  } else {
@@ -58,7 +58,8 @@ private:
58
58
 
59
59
  public:
60
60
  ResourceLocator(const string &rootOrFile) {
61
- if (getFileType(rootOrFile) == FT_DIRECTORY) {
61
+ FileType rootOrFileType = getFileType(rootOrFile);
62
+ if (rootOrFileType == FT_DIRECTORY || rootOrFileType == FT_NONEXISTANT) {
62
63
  string root = rootOrFile;
63
64
  bool nativelyPackaged = !fileExists(root + "/Rakefile") ||
64
65
  !fileExists(root + "/DEVELOPERS.TXT");
data/ext/common/Utils.cpp CHANGED
@@ -837,7 +837,26 @@ getHighestFileDescriptor() {
837
837
  sigaction(SIGFPE, &action, NULL);
838
838
  sigaction(SIGABRT, &action, NULL);
839
839
 
840
- DIR *dir = opendir("/dev/fd");
840
+ DIR *dir = NULL;
841
+ #ifdef __APPLE__
842
+ /* /dev/fd can always be trusted on OS X. */
843
+ dir = opendir("/dev/fd");
844
+ #else
845
+ /* On FreeBSD and possibly other operating systems, /dev/fd only
846
+ * works if fdescfs is mounted. If it isn't mounted then /dev/fd
847
+ * still exists but always returns [0, 1, 2] and thus can't be
848
+ * trusted. If /dev and /dev/fd are on different filesystems
849
+ * then that probably means fdescfs is mounted.
850
+ */
851
+ struct stat dirbuf1, dirbuf2;
852
+ if (stat("/dev", &dirbuf1) == -1
853
+ || stat("/dev/fd", &dirbuf2) == -1) {
854
+ _exit(1);
855
+ }
856
+ if (dirbuf1.st_dev != dirbuf2.st_dev) {
857
+ dir = opendir("/dev/fd");
858
+ }
859
+ #endif
841
860
  if (dir == NULL) {
842
861
  dir = opendir("/proc/self/fd");
843
862
  if (dir == NULL) {
@@ -951,7 +970,7 @@ closeAllFileDescriptors(int lastToKeepOpen) {
951
970
  #if defined(F_CLOSEM)
952
971
  int ret;
953
972
  do {
954
- ret = fcntl(fd, F_CLOSEM, lastToKeepOpen + 1);
973
+ ret = fcntl(lastToKeepOpen + 1, F_CLOSEM);
955
974
  } while (ret == -1 && errno == EINTR);
956
975
  if (ret != -1) {
957
976
  return;
@@ -26,6 +26,7 @@
26
26
  #include <cstdio>
27
27
  #include <cstdlib>
28
28
  #include <cctype>
29
+ #include <cmath>
29
30
  #include <Utils/utf8.h>
30
31
  #include <Exceptions.h>
31
32
  #include <Utils/StrIntUtils.h>
@@ -322,7 +323,7 @@ cEscapeString(const StaticString &input) {
322
323
  string
323
324
  escapeHTML(const StaticString &input) {
324
325
  string result;
325
- result.reserve(input.size() * 1.25);
326
+ result.reserve((int) round(input.size() * 1.25));
326
327
 
327
328
  const char *current = (const char *) input.c_str();
328
329
  const char *end = current + input.size();
@@ -0,0 +1,10 @@
1
+
2
+ #ifndef _GNU_SOURCE
3
+ #define _GNU_SOURCE
4
+ #endif
5
+ #include "boost/src/pthread/once.cpp"
6
+ #include "boost/src/pthread/thread.cpp"
7
+ #include "oxt/backtrace.cpp"
8
+ #include "oxt/system_calls.cpp"
9
+ #include "oxt/thread.cpp"
10
+ #include "oxt/tracable_exception.cpp"
@@ -0,0 +1,15 @@
1
+
2
+ #ifndef _GNU_SOURCE
3
+ #define _GNU_SOURCE
4
+ #endif
5
+ #include "common/AccountsDatabase.cpp"
6
+ #include "common/AgentBase.cpp"
7
+ #include "common/AgentsStarter.cpp"
8
+ #include "common/Logging.cpp"
9
+ #include "common/Utils.cpp"
10
+ #include "common/Utils/Base64.cpp"
11
+ #include "common/Utils/CachedFileStat.cpp"
12
+ #include "common/Utils/IOUtils.cpp"
13
+ #include "common/Utils/MD5.cpp"
14
+ #include "common/Utils/StrIntUtils.cpp"
15
+ #include "common/Utils/SystemTime.cpp"
data/ext/nginx/config CHANGED
@@ -2,12 +2,14 @@ if ! test -f "$ngx_addon_dir/../common/libpassenger_common.a" || \
2
2
  ! test -f "$ngx_addon_dir/../common/libboost_oxt.a"; then
3
3
  echo "*** The Phusion Passenger support files are not yet compiled. Compiling them for you... ***"
4
4
  echo "*** Running 'rake nginx RELEASE=yes' in $ngx_addon_dir... ***"
5
+ old_dir=`pwd`
5
6
  if ! cd $ngx_addon_dir; then
6
7
  exit 1
7
8
  fi
8
9
  if ! rake nginx RELEASE=yes; then
9
10
  exit 1
10
11
  fi
12
+ cd "$old_dir"
11
13
  echo "*** Phusion Passenger support files have been successfully compiled. ***"
12
14
  fi
13
15
 
@@ -25,7 +25,7 @@ module PhusionPassenger
25
25
  ###### Version numbers ######
26
26
 
27
27
  # Phusion Passenger version number. Don't forget to edit ext/common/Constants.h too.
28
- VERSION_STRING = '3.0.1'
28
+ VERSION_STRING = '3.0.2'
29
29
 
30
30
  PREFERRED_NGINX_VERSION = '0.8.53'
31
31
  PREFERRED_PCRE_VERSION = '8.10'
@@ -49,6 +49,8 @@ module PhusionPassenger
49
49
  NATIVELY_PACKAGED_SOURCE_ROOT = "/usr/share/phusion-passenger/source"
50
50
  NATIVELY_PACKAGED_DOCDIR = "/usr/share/doc/phusion-passenger"
51
51
  NATIVELY_PACKAGED_RESOURCES_DIR = "/usr/share/phusion-passenger"
52
+ NATIVELY_PACKAGED_AGENTS_DIR = "/usr/lib/phusion-passenger/agents"
53
+ NATIVELY_PACKAGED_HELPER_SCRIPTS_DIR = "/usr/share/phusion-passenger/helper-scripts"
52
54
  NATIVELY_PACKAGED_APACHE2_MODULE = "/usr/lib/apache2/modules/mod_passenger.so"
53
55
 
54
56
  # Directory containing the Phusion Passenger Ruby libraries.
@@ -81,6 +83,10 @@ module PhusionPassenger
81
83
  # Directory containing Phusion Passenger resource files.
82
84
  RESOURCES_DIR = File.join(SOURCE_ROOT, "resources")
83
85
 
86
+ AGENTS_DIR = File.join(SOURCE_ROOT, "agents")
87
+
88
+ HELPER_SCRIPTS_DIR = File.join(SOURCE_ROOT, "helper-scripts")
89
+
84
90
  # Location of the Apache 2 module.
85
91
  APACHE2_MODULE = File.join(SOURCE_ROOT, "ext", "apache2", "mod_passenger.so")
86
92
 
@@ -91,6 +97,8 @@ module PhusionPassenger
91
97
  SOURCE_ROOT = NATIVELY_PACKAGED_SOURCE_ROOT
92
98
  DOCDIR = NATIVELY_PACKAGED_DOCDIR
93
99
  RESOURCES_DIR = NATIVELY_PACKAGED_RESOURCES_DIR
100
+ AGENTS_DIR = NATIVELY_PACKAGED_AGENTS_DIR
101
+ HELPER_SCRIPTS_DIR = NATIVELY_PACKAGED_HELPER_SCRIPTS_DIR
94
102
  APACHE2_MODULE = NATIVELY_PACKAGED_APACHE2_MODULE
95
103
  end
96
104
 
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: passenger
3
3
  version: !ruby/object:Gem::Version
4
- hash: 5
4
+ hash: 3
5
5
  prerelease: false
6
6
  segments:
7
7
  - 3
8
8
  - 0
9
- - 1
10
- version: 3.0.1
9
+ - 2
10
+ version: 3.0.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Phusion - http://www.phusion.nl/
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-12-07 00:00:00 +01:00
18
+ date: 2010-12-16 00:00:00 +01:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -369,6 +369,8 @@ files:
369
369
  - doc/cxxapi/classPassenger_1_1Process.html
370
370
  - doc/cxxapi/classPassenger_1_1RandomGenerator-members.html
371
371
  - doc/cxxapi/classPassenger_1_1RandomGenerator.html
372
+ - doc/cxxapi/classPassenger_1_1ResourceLocator-members.html
373
+ - doc/cxxapi/classPassenger_1_1ResourceLocator.html
372
374
  - doc/cxxapi/classPassenger_1_1RuntimeException-members.html
373
375
  - doc/cxxapi/classPassenger_1_1RuntimeException.html
374
376
  - doc/cxxapi/classPassenger_1_1SafeLibev-members.html
@@ -612,6 +614,9 @@ files:
612
614
  - doc/cxxapi/inherit__graph__4.map
613
615
  - doc/cxxapi/inherit__graph__4.md5
614
616
  - doc/cxxapi/inherit__graph__4.png
617
+ - doc/cxxapi/inherit__graph__40.map
618
+ - doc/cxxapi/inherit__graph__40.md5
619
+ - doc/cxxapi/inherit__graph__40.png
615
620
  - doc/cxxapi/inherit__graph__5.map
616
621
  - doc/cxxapi/inherit__graph__5.md5
617
622
  - doc/cxxapi/inherit__graph__5.png
@@ -628,6 +633,7 @@ files:
628
633
  - doc/cxxapi/inherit__graph__9.md5
629
634
  - doc/cxxapi/inherit__graph__9.png
630
635
  - doc/cxxapi/inherits.html
636
+ - doc/cxxapi/IniFile_8h_source.html
631
637
  - doc/cxxapi/Logging_8h-source.html
632
638
  - doc/cxxapi/Logging_8h_source.html
633
639
  - doc/cxxapi/LoggingServer_8h-source.html
@@ -781,6 +787,8 @@ files:
781
787
  - ext/common/AgentBase.cpp
782
788
  - ext/common/AgentsStarter.cpp
783
789
  - ext/common/BCrypt.cpp
790
+ - ext/common/libboost_oxt/aggregate.cpp
791
+ - ext/common/libpassenger_common/aggregate.cpp
784
792
  - ext/common/Logging.cpp
785
793
  - ext/common/LoggingAgent/Main.cpp
786
794
  - ext/common/Utils/Base64.cpp