passenger 5.0.20 → 5.0.21
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.
- checksums.yaml +8 -8
- checksums.yaml.gz.asc +7 -7
- data.tar.gz.asc +7 -7
- data/CHANGELOG +14 -0
- data/CONTRIBUTORS +1 -0
- data/README.md +1 -1
- data/Rakefile +4 -1
- data/bin/passenger +3 -2
- data/bin/passenger-config +3 -2
- data/bin/passenger-install-apache2-module +3 -3
- data/bin/passenger-install-nginx-module +10 -3
- data/bin/passenger-memory-stats +3 -2
- data/bin/passenger-status +3 -2
- data/build/agent.rb +4 -3
- data/build/apache2.rb +3 -2
- data/build/basics.rb +3 -2
- data/build/common_library.rb +9 -8
- data/build/cplusplus_support.rb +3 -2
- data/build/cxx_dependency_map.rb +67 -134
- data/build/cxx_tests.rb +3 -2
- data/build/documentation.rb +3 -2
- data/build/integration_tests.rb +3 -2
- data/build/misc.rb +3 -22
- data/build/nginx.rb +3 -2
- data/build/node_tests.rb +3 -2
- data/build/oxt_tests.rb +3 -2
- data/build/packaging.rb +4 -3
- data/build/ruby_extension.rb +3 -2
- data/build/ruby_tests.rb +3 -2
- data/build/test_basics.rb +3 -2
- data/dev/copy_boost_headers +3 -2
- data/doc/Design and Architecture.html +1 -1
- data/doc/Design and Architecture.txt +1 -1
- data/doc/Users guide Apache.html +1 -1
- data/doc/Users guide Nginx.html +1 -1
- data/doc/users_guide_snippets/appendix_a_about.txt +1 -1
- data/man/passenger-config.1 +0 -2
- data/man/passenger-memory-stats.8 +0 -2
- data/man/passenger-status.8 +0 -2
- data/src/agent/AgentMain.cpp +3 -2
- data/src/agent/Core/ApiServer.h +3 -2
- data/src/agent/Core/ApplicationPool/BasicGroupInfo.h +3 -2
- data/src/agent/Core/ApplicationPool/BasicProcessInfo.h +3 -2
- data/src/agent/Core/ApplicationPool/Common.h +3 -2
- data/src/agent/Core/ApplicationPool/Context.h +3 -2
- data/src/agent/Core/ApplicationPool/ErrorRenderer.h +3 -2
- data/src/agent/Core/ApplicationPool/Group.h +3 -2
- data/src/agent/Core/ApplicationPool/Group/InitializationAndShutdown.cpp +3 -2
- data/src/agent/Core/ApplicationPool/Group/InternalUtils.cpp +3 -2
- data/src/agent/Core/ApplicationPool/Group/LifetimeAndBasics.cpp +3 -2
- data/src/agent/Core/ApplicationPool/Group/Miscellaneous.cpp +3 -2
- data/src/agent/Core/ApplicationPool/Group/OutOfBandWork.cpp +3 -2
- data/src/agent/Core/ApplicationPool/Group/ProcessListManagement.cpp +3 -2
- data/src/agent/Core/ApplicationPool/Group/SessionManagement.cpp +3 -2
- data/src/agent/Core/ApplicationPool/Group/SpawningAndRestarting.cpp +3 -2
- data/src/agent/Core/ApplicationPool/Group/StateInspection.cpp +3 -2
- data/src/agent/Core/ApplicationPool/Group/Verification.cpp +3 -2
- data/src/agent/Core/ApplicationPool/Implementation.cpp +3 -2
- data/src/agent/Core/ApplicationPool/Options.h +3 -11
- data/src/agent/Core/ApplicationPool/Pool.h +3 -2
- data/src/agent/Core/ApplicationPool/Pool/AnalyticsCollection.cpp +3 -2
- data/src/agent/Core/ApplicationPool/Pool/GarbageCollection.cpp +3 -2
- data/src/agent/Core/ApplicationPool/Pool/GeneralUtils.cpp +3 -2
- data/src/agent/Core/ApplicationPool/Pool/GroupUtils.cpp +3 -2
- data/src/agent/Core/ApplicationPool/Pool/InitializationAndShutdown.cpp +3 -2
- data/src/agent/Core/ApplicationPool/Pool/Miscellaneous.cpp +3 -2
- data/src/agent/Core/ApplicationPool/Pool/ProcessUtils.cpp +3 -2
- data/src/agent/Core/ApplicationPool/Pool/StateInspection.cpp +3 -2
- data/src/agent/Core/ApplicationPool/Process.h +3 -2
- data/src/agent/Core/ApplicationPool/Session.h +3 -2
- data/src/agent/Core/ApplicationPool/Socket.h +3 -2
- data/src/agent/Core/CoreMain.cpp +3 -2
- data/src/agent/Core/OptionParser.h +3 -2
- data/src/agent/Core/RequestHandler.h +3 -2
- data/src/agent/Core/RequestHandler/AppResponse.h +3 -2
- data/src/agent/Core/RequestHandler/BufferBody.cpp +3 -2
- data/src/agent/Core/RequestHandler/CheckoutSession.cpp +3 -2
- data/src/agent/Core/RequestHandler/Client.h +3 -2
- data/src/agent/Core/RequestHandler/ForwardResponse.cpp +3 -2
- data/src/agent/Core/RequestHandler/Hooks.cpp +4 -2
- data/src/agent/Core/RequestHandler/InitRequest.cpp +13 -4
- data/src/agent/Core/RequestHandler/Request.h +10 -2
- data/src/agent/Core/RequestHandler/SendRequest.cpp +40 -9
- data/src/agent/Core/RequestHandler/TurboCaching.h +3 -2
- data/src/agent/Core/RequestHandler/Utils.cpp +3 -2
- data/src/agent/Core/ResponseCache.h +3 -2
- data/src/agent/Core/SpawningKit/BackgroundIOCapturer.h +3 -2
- data/src/agent/Core/SpawningKit/Config.h +3 -2
- data/src/agent/Core/SpawningKit/DirectSpawner.h +3 -2
- data/src/agent/Core/SpawningKit/DummySpawner.h +3 -2
- data/src/agent/Core/SpawningKit/Factory.h +3 -2
- data/src/agent/Core/SpawningKit/Options.h +3 -2
- data/src/agent/Core/SpawningKit/PipeWatcher.h +3 -2
- data/src/agent/Core/SpawningKit/Result.h +3 -2
- data/src/agent/Core/SpawningKit/SmartSpawner.h +3 -2
- data/src/agent/Core/SpawningKit/Spawner.h +18 -2
- data/src/agent/Core/SpawningKit/UserSwitchingRules.h +3 -2
- data/src/agent/Core/UnionStation/Connection.h +3 -2
- data/src/agent/Core/UnionStation/Core.h +3 -2
- data/src/agent/Core/UnionStation/StopwatchLog.h +3 -2
- data/src/agent/Core/UnionStation/Transaction.h +3 -2
- data/src/agent/Shared/ApiServerUtils.h +3 -2
- data/src/agent/Shared/ApplicationPoolApiKey.h +3 -2
- data/src/agent/Shared/Base.cpp +3 -2
- data/src/agent/Shared/Base.h +3 -2
- data/src/agent/SpawnPreparer/SpawnPreparerMain.cpp +3 -2
- data/src/agent/SystemMetrics/SystemMetricsMain.cpp +3 -2
- data/src/agent/TempDirToucher/TempDirToucherMain.cpp +3 -2
- data/src/agent/UstRouter/ApiServer.h +3 -2
- data/src/agent/UstRouter/Client.h +3 -2
- data/src/agent/UstRouter/Controller.h +3 -2
- data/src/agent/UstRouter/DataStoreId.h +3 -2
- data/src/agent/UstRouter/FileSink.h +3 -2
- data/src/agent/UstRouter/LogSink.h +3 -2
- data/src/agent/UstRouter/OptionParser.h +3 -2
- data/src/agent/UstRouter/RemoteSender.h +3 -2
- data/src/agent/UstRouter/RemoteSink.h +3 -2
- data/src/agent/UstRouter/Transaction.h +3 -2
- data/src/agent/UstRouter/UstRouterMain.cpp +3 -2
- data/src/agent/Watchdog/AgentWatcher.cpp +3 -2
- data/src/agent/Watchdog/ApiServer.h +3 -2
- data/src/agent/Watchdog/CoreWatcher.cpp +3 -2
- data/src/agent/Watchdog/InstanceDirToucher.cpp +3 -2
- data/src/agent/Watchdog/UstRouterWatcher.cpp +3 -2
- data/src/agent/Watchdog/WatchdogMain.cpp +4 -3
- data/src/apache2_module/Bucket.cpp +3 -2
- data/src/apache2_module/Bucket.h +3 -2
- data/src/apache2_module/Configuration.cpp +3 -2
- data/src/apache2_module/Configuration.h +3 -2
- data/src/apache2_module/Configuration.hpp +3 -2
- data/src/apache2_module/ConfigurationCommands.cpp +3 -2
- data/src/apache2_module/ConfigurationCommands.cpp.erb +3 -2
- data/src/apache2_module/ConfigurationFields.hpp +3 -2
- data/src/apache2_module/ConfigurationFields.hpp.erb +3 -2
- data/src/apache2_module/ConfigurationSetters.cpp +3 -2
- data/src/apache2_module/ConfigurationSetters.cpp.erb +3 -2
- data/src/apache2_module/CreateDirConfig.cpp +3 -2
- data/src/apache2_module/CreateDirConfig.cpp.erb +3 -2
- data/src/apache2_module/DirectoryMapper.h +3 -2
- data/src/apache2_module/Hooks.cpp +12 -11
- data/src/apache2_module/Hooks.h +3 -2
- data/src/apache2_module/MergeDirConfig.cpp +3 -2
- data/src/apache2_module/MergeDirConfig.cpp.erb +3 -2
- data/src/apache2_module/SetHeaders.cpp +3 -2
- data/src/apache2_module/SetHeaders.cpp.erb +3 -2
- data/src/apache2_module/mod_passenger.c +3 -2
- data/src/cxx_supportlib/AppTypes.cpp +3 -2
- data/src/cxx_supportlib/AppTypes.h +3 -2
- data/src/cxx_supportlib/BackgroundEventLoop.cpp +3 -2
- data/src/cxx_supportlib/BackgroundEventLoop.h +3 -2
- data/src/cxx_supportlib/Constants.h +4 -7
- data/src/cxx_supportlib/Constants.h.erb +3 -4
- data/src/cxx_supportlib/DataStructures/HashedStaticString.h +3 -2
- data/src/cxx_supportlib/DataStructures/LString.h +3 -2
- data/src/cxx_supportlib/DataStructures/StringKeyTable.h +3 -2
- data/src/cxx_supportlib/Exceptions.cpp +3 -2
- data/src/cxx_supportlib/Exceptions.h +3 -2
- data/src/cxx_supportlib/FileDescriptor.h +3 -2
- data/src/cxx_supportlib/Hooks.h +3 -2
- data/src/cxx_supportlib/InstanceDirectory.h +4 -3
- data/src/cxx_supportlib/Logging.cpp +3 -2
- data/src/cxx_supportlib/Logging.h +3 -2
- data/src/cxx_supportlib/MemoryKit/mbuf.h +1 -1
- data/src/cxx_supportlib/MemoryKit/palloc.cpp +1 -1
- data/src/cxx_supportlib/MemoryKit/palloc.h +1 -1
- data/src/cxx_supportlib/MessageClient.h +3 -2
- data/src/cxx_supportlib/MessageReadersWriters.h +3 -2
- data/src/cxx_supportlib/RandomGenerator.h +3 -2
- data/src/cxx_supportlib/ResourceLocator.h +3 -2
- data/src/cxx_supportlib/SafeLibev.h +3 -2
- data/src/cxx_supportlib/ServerKit/AcceptLoadBalancer.h +3 -2
- data/src/cxx_supportlib/ServerKit/Channel.h +3 -2
- data/src/cxx_supportlib/ServerKit/Client.h +3 -2
- data/src/cxx_supportlib/ServerKit/ClientRef.h +3 -2
- data/src/cxx_supportlib/ServerKit/Context.h +3 -2
- data/src/cxx_supportlib/ServerKit/CookieUtils.h +3 -2
- data/src/cxx_supportlib/ServerKit/Errors.h +3 -2
- data/src/cxx_supportlib/ServerKit/FdSinkChannel.h +3 -2
- data/src/cxx_supportlib/ServerKit/FdSourceChannel.h +3 -2
- data/src/cxx_supportlib/ServerKit/FileBufferedChannel.h +3 -2
- data/src/cxx_supportlib/ServerKit/FileBufferedFdSinkChannel.h +3 -2
- data/src/cxx_supportlib/ServerKit/HeaderTable.h +3 -2
- data/src/cxx_supportlib/ServerKit/Hooks.h +3 -2
- data/src/cxx_supportlib/ServerKit/HttpChunkedBodyParser.h +3 -2
- data/src/cxx_supportlib/ServerKit/HttpChunkedBodyParserState.h +3 -2
- data/src/cxx_supportlib/ServerKit/HttpClient.h +3 -2
- data/src/cxx_supportlib/ServerKit/HttpHeaderParser.h +3 -2
- data/src/cxx_supportlib/ServerKit/HttpHeaderParserState.h +3 -2
- data/src/cxx_supportlib/ServerKit/HttpRequest.h +3 -2
- data/src/cxx_supportlib/ServerKit/HttpRequestRef.h +3 -2
- data/src/cxx_supportlib/ServerKit/HttpServer.h +3 -2
- data/src/cxx_supportlib/ServerKit/Implementation.cpp +3 -2
- data/src/cxx_supportlib/ServerKit/Server.h +3 -2
- data/src/cxx_supportlib/StaticString.h +3 -2
- data/src/cxx_supportlib/UnionStationFilterSupport.cpp +3 -2
- data/src/cxx_supportlib/UnionStationFilterSupport.h +3 -2
- data/src/cxx_supportlib/Utils.cpp +3 -2
- data/src/cxx_supportlib/Utils.h +3 -2
- data/src/cxx_supportlib/Utils/AnsiColorConstants.h +3 -2
- data/src/cxx_supportlib/Utils/BlockingQueue.h +3 -2
- data/src/cxx_supportlib/Utils/BufferedIO.h +3 -2
- data/src/cxx_supportlib/Utils/CachedFileStat.cpp +3 -2
- data/src/cxx_supportlib/Utils/CachedFileStat.h +3 -2
- data/src/cxx_supportlib/Utils/CachedFileStat.hpp +3 -2
- data/src/cxx_supportlib/Utils/ClassUtils.h +20 -2
- data/src/cxx_supportlib/Utils/Curl.h +3 -2
- data/src/cxx_supportlib/Utils/DateParsing.h +3 -2
- data/src/cxx_supportlib/Utils/FastStringStream.h +3 -2
- data/src/cxx_supportlib/Utils/FileChangeChecker.h +3 -2
- data/src/cxx_supportlib/Utils/HashMap.h +3 -2
- data/src/cxx_supportlib/Utils/Hasher.cpp +3 -2
- data/src/cxx_supportlib/Utils/Hasher.h +3 -2
- data/src/cxx_supportlib/Utils/HttpConstants.h +3 -2
- data/src/cxx_supportlib/Utils/IOUtils.cpp +3 -2
- data/src/cxx_supportlib/Utils/IOUtils.h +3 -2
- data/src/cxx_supportlib/Utils/IniFile.h +3 -2
- data/src/cxx_supportlib/Utils/JsonUtils.h +3 -2
- data/src/cxx_supportlib/Utils/LargeFiles.h +3 -2
- data/src/cxx_supportlib/Utils/MemZeroGuard.h +3 -2
- data/src/cxx_supportlib/Utils/MemoryBarrier.h +3 -2
- data/src/cxx_supportlib/Utils/MessageIO.h +3 -2
- data/src/cxx_supportlib/Utils/MessagePassing.h +4 -3
- data/src/cxx_supportlib/Utils/OptionParsing.h +3 -2
- data/src/cxx_supportlib/Utils/ProcessMetricsCollector.h +3 -2
- data/src/cxx_supportlib/Utils/ScopeGuard.h +3 -2
- data/src/cxx_supportlib/Utils/SpeedMeter.h +3 -2
- data/src/cxx_supportlib/Utils/StrIntUtils.cpp +3 -2
- data/src/cxx_supportlib/Utils/StrIntUtils.h +3 -2
- data/src/cxx_supportlib/Utils/StrIntUtilsNoStrictAliasing.cpp +3 -2
- data/src/cxx_supportlib/Utils/StringMap.h +3 -2
- data/src/cxx_supportlib/Utils/StringScanning.h +3 -2
- data/src/cxx_supportlib/Utils/SystemMetricsCollector.h +3 -2
- data/src/cxx_supportlib/Utils/SystemTime.cpp +3 -2
- data/src/cxx_supportlib/Utils/SystemTime.h +3 -2
- data/src/cxx_supportlib/Utils/Timer.h +3 -2
- data/src/cxx_supportlib/Utils/VariantMap.h +3 -2
- data/src/cxx_supportlib/{AgentsStarter.cpp → WatchdogLauncher.cpp} +42 -41
- data/src/cxx_supportlib/{AgentsStarter.h → WatchdogLauncher.h} +99 -112
- data/src/cxx_supportlib/oxt/backtrace.hpp +1 -1
- data/src/cxx_supportlib/oxt/detail/backtrace_disabled.hpp +1 -1
- data/src/cxx_supportlib/oxt/detail/backtrace_enabled.hpp +1 -1
- data/src/cxx_supportlib/oxt/detail/context.hpp +1 -1
- data/src/cxx_supportlib/oxt/detail/spin_lock_darwin.hpp +1 -1
- data/src/cxx_supportlib/oxt/detail/spin_lock_gcc_x86.hpp +1 -1
- data/src/cxx_supportlib/oxt/detail/spin_lock_portable.hpp +1 -1
- data/src/cxx_supportlib/oxt/detail/spin_lock_pthreads.hpp +1 -1
- data/src/cxx_supportlib/oxt/detail/tracable_exception_disabled.hpp +1 -1
- data/src/cxx_supportlib/oxt/detail/tracable_exception_enabled.hpp +1 -1
- data/src/cxx_supportlib/oxt/dynamic_thread_group.hpp +1 -1
- data/src/cxx_supportlib/oxt/implementation.cpp +1 -1
- data/src/cxx_supportlib/oxt/initialize.hpp +1 -1
- data/src/cxx_supportlib/oxt/macros.hpp +1 -1
- data/src/cxx_supportlib/oxt/spin_lock.hpp +1 -1
- data/src/cxx_supportlib/oxt/system_calls.cpp +1 -1
- data/src/cxx_supportlib/oxt/system_calls.hpp +1 -1
- data/src/cxx_supportlib/oxt/thread.hpp +1 -1
- data/src/cxx_supportlib/oxt/tracable_exception.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/regex/v4/regex_raw_buffer.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/jsoncpp/jsoncpp.cpp +2 -2
- data/src/cxx_supportlib/{vendor-copy → vendor-modified}/libev/Changes +0 -0
- data/src/cxx_supportlib/{vendor-copy → vendor-modified}/libev/LICENSE +0 -0
- data/src/cxx_supportlib/{vendor-copy → vendor-modified}/libev/Makefile.am +0 -0
- data/src/cxx_supportlib/{vendor-copy → vendor-modified}/libev/Makefile.in +0 -0
- data/src/cxx_supportlib/{vendor-copy → vendor-modified}/libev/README +0 -0
- data/src/cxx_supportlib/{vendor-copy → vendor-modified}/libev/aclocal.m4 +0 -0
- data/src/cxx_supportlib/{vendor-copy → vendor-modified}/libev/autogen.sh +0 -0
- data/src/cxx_supportlib/{vendor-copy → vendor-modified}/libev/config.guess +0 -0
- data/src/cxx_supportlib/{vendor-copy → vendor-modified}/libev/config.h.in +0 -0
- data/src/cxx_supportlib/{vendor-copy → vendor-modified}/libev/config.sub +0 -0
- data/src/cxx_supportlib/{vendor-copy → vendor-modified}/libev/configure +0 -0
- data/src/cxx_supportlib/{vendor-copy → vendor-modified}/libev/configure.ac +0 -0
- data/src/cxx_supportlib/{vendor-copy → vendor-modified}/libev/depcomp +0 -0
- data/src/cxx_supportlib/{vendor-copy → vendor-modified}/libev/ev++.h +0 -0
- data/src/cxx_supportlib/{vendor-copy → vendor-modified}/libev/ev.c +0 -0
- data/src/cxx_supportlib/{vendor-copy → vendor-modified}/libev/ev.h +0 -0
- data/src/cxx_supportlib/{vendor-copy → vendor-modified}/libev/ev_epoll.c +0 -0
- data/src/cxx_supportlib/{vendor-copy → vendor-modified}/libev/ev_kqueue.c +0 -0
- data/src/cxx_supportlib/{vendor-copy → vendor-modified}/libev/ev_poll.c +0 -0
- data/src/cxx_supportlib/{vendor-copy → vendor-modified}/libev/ev_port.c +0 -0
- data/src/cxx_supportlib/{vendor-copy → vendor-modified}/libev/ev_select.c +0 -0
- data/src/cxx_supportlib/{vendor-copy → vendor-modified}/libev/ev_vars.h +0 -0
- data/src/cxx_supportlib/{vendor-copy → vendor-modified}/libev/ev_win32.c +0 -0
- data/src/cxx_supportlib/{vendor-copy → vendor-modified}/libev/ev_wrap.h +0 -0
- data/src/cxx_supportlib/{vendor-copy → vendor-modified}/libev/event.c +0 -0
- data/src/cxx_supportlib/{vendor-copy → vendor-modified}/libev/event.h +0 -0
- data/src/cxx_supportlib/{vendor-copy → vendor-modified}/libev/install-sh +0 -0
- data/src/cxx_supportlib/{vendor-copy → vendor-modified}/libev/libev.m4 +0 -0
- data/src/cxx_supportlib/{vendor-copy → vendor-modified}/libev/ltmain.sh +0 -0
- data/src/cxx_supportlib/{vendor-copy → vendor-modified}/libev/missing +0 -0
- data/src/cxx_supportlib/{vendor-copy → vendor-modified}/libev/mkinstalldirs +0 -0
- data/src/helper-scripts/backtrace-sanitizer.rb +3 -2
- data/src/helper-scripts/crash-watch.rb +1 -1
- data/src/helper-scripts/download_binaries/extconf.rb +3 -2
- data/src/helper-scripts/meteor-loader.rb +3 -2
- data/src/helper-scripts/node-loader.js +8 -5
- data/src/helper-scripts/prespawn +3 -2
- data/src/helper-scripts/rack-loader.rb +6 -3
- data/src/helper-scripts/rack-preloader.rb +6 -3
- data/src/helper-scripts/wsgi-loader.py +3 -2
- data/src/nginx_module/CacheLocationConfig.c +3 -2
- data/src/nginx_module/CacheLocationConfig.c.erb +3 -2
- data/src/nginx_module/Configuration.c +1 -1
- data/src/nginx_module/Configuration.h +1 -1
- data/src/nginx_module/ConfigurationCommands.c +3 -2
- data/src/nginx_module/ConfigurationCommands.c.erb +3 -2
- data/src/nginx_module/ConfigurationFields.h +3 -2
- data/src/nginx_module/ConfigurationFields.h.erb +3 -2
- data/src/nginx_module/ContentHandler.c +7 -7
- data/src/nginx_module/ContentHandler.h +1 -1
- data/src/nginx_module/CreateLocationConfig.c +3 -2
- data/src/nginx_module/CreateLocationConfig.c.erb +3 -2
- data/src/nginx_module/MergeLocationConfig.c +3 -2
- data/src/nginx_module/MergeLocationConfig.c.erb +3 -2
- data/src/nginx_module/StaticContentHandler.c +1 -1
- data/src/nginx_module/StaticContentHandler.h +1 -1
- data/src/nginx_module/config +1 -1
- data/src/nginx_module/ngx_http_passenger_module.c +46 -46
- data/src/nginx_module/ngx_http_passenger_module.h +3 -3
- data/src/nodejs_supportlib/phusion_passenger/line_reader.js +3 -2
- data/src/ruby_native_extension/extconf.rb +3 -2
- data/src/ruby_native_extension/passenger_native_support.c +6 -5
- data/src/ruby_supportlib/phusion_passenger.rb +4 -3
- data/src/ruby_supportlib/phusion_passenger/abstract_installer.rb +3 -2
- data/src/ruby_supportlib/phusion_passenger/admin_tools.rb +3 -2
- data/src/ruby_supportlib/phusion_passenger/admin_tools/instance.rb +3 -2
- data/src/ruby_supportlib/phusion_passenger/admin_tools/instance_registry.rb +3 -2
- data/src/ruby_supportlib/phusion_passenger/admin_tools/memory_stats.rb +3 -2
- data/src/ruby_supportlib/phusion_passenger/apache2/config_options.rb +3 -2
- data/src/ruby_supportlib/phusion_passenger/common_library.rb +6 -5
- data/src/ruby_supportlib/phusion_passenger/config/about_command.rb +3 -2
- data/src/ruby_supportlib/phusion_passenger/config/agent_compiler.rb +3 -2
- data/src/ruby_supportlib/phusion_passenger/config/api_call_command.rb +3 -2
- data/src/ruby_supportlib/phusion_passenger/config/build_native_support_command.rb +3 -2
- data/src/ruby_supportlib/phusion_passenger/config/command.rb +3 -2
- data/src/ruby_supportlib/phusion_passenger/config/compile_agent_command.rb +3 -2
- data/src/ruby_supportlib/phusion_passenger/config/compile_nginx_engine_command.rb +3 -2
- data/src/ruby_supportlib/phusion_passenger/config/detach_process_command.rb +3 -2
- data/src/ruby_supportlib/phusion_passenger/config/download_agent_command.rb +3 -2
- data/src/ruby_supportlib/phusion_passenger/config/download_nginx_engine_command.rb +3 -2
- data/src/ruby_supportlib/phusion_passenger/config/install_agent_command.rb +3 -2
- data/src/ruby_supportlib/phusion_passenger/config/install_standalone_runtime_command.rb +3 -2
- data/src/ruby_supportlib/phusion_passenger/config/installation_utils.rb +3 -2
- data/src/ruby_supportlib/phusion_passenger/config/list_instances_command.rb +3 -2
- data/src/ruby_supportlib/phusion_passenger/config/main.rb +3 -2
- data/src/ruby_supportlib/phusion_passenger/config/nginx_engine_compiler.rb +25 -3
- data/src/ruby_supportlib/phusion_passenger/config/reopen_logs_command.rb +3 -2
- data/src/ruby_supportlib/phusion_passenger/config/restart_app_command.rb +4 -3
- data/src/ruby_supportlib/phusion_passenger/config/system_metrics_command.rb +3 -2
- data/src/ruby_supportlib/phusion_passenger/config/utils.rb +3 -2
- data/src/ruby_supportlib/phusion_passenger/config/validate_install_command.rb +3 -2
- data/src/ruby_supportlib/phusion_passenger/console_text_template.rb +3 -2
- data/src/ruby_supportlib/phusion_passenger/constants.rb +3 -11
- data/src/ruby_supportlib/phusion_passenger/debug_logging.rb +3 -2
- data/src/ruby_supportlib/phusion_passenger/loader_shared_helpers.rb +21 -2
- data/src/ruby_supportlib/phusion_passenger/message_channel.rb +8 -2
- data/src/ruby_supportlib/phusion_passenger/message_client.rb +3 -2
- data/src/ruby_supportlib/phusion_passenger/native_support.rb +3 -2
- data/src/ruby_supportlib/phusion_passenger/nginx/config_options.rb +3 -2
- data/src/ruby_supportlib/phusion_passenger/packaging.rb +3 -2
- data/src/ruby_supportlib/phusion_passenger/platform_info.rb +3 -2
- data/src/ruby_supportlib/phusion_passenger/platform_info/apache.rb +3 -2
- data/src/ruby_supportlib/phusion_passenger/platform_info/apache_detector.rb +3 -2
- data/src/ruby_supportlib/phusion_passenger/platform_info/binary_compatibility.rb +3 -2
- data/src/ruby_supportlib/phusion_passenger/platform_info/compiler.rb +3 -2
- data/src/ruby_supportlib/phusion_passenger/platform_info/curl.rb +3 -2
- data/src/ruby_supportlib/phusion_passenger/platform_info/cxx_portability.rb +3 -2
- data/src/ruby_supportlib/phusion_passenger/platform_info/depcheck.rb +6 -0
- data/src/ruby_supportlib/phusion_passenger/platform_info/depcheck_specs/libs.rb +5 -1
- data/src/ruby_supportlib/phusion_passenger/platform_info/linux.rb +3 -2
- data/src/ruby_supportlib/phusion_passenger/platform_info/openssl.rb +61 -0
- data/src/ruby_supportlib/phusion_passenger/platform_info/operating_system.rb +3 -2
- data/src/ruby_supportlib/phusion_passenger/platform_info/ruby.rb +3 -2
- data/src/ruby_supportlib/phusion_passenger/platform_info/zlib.rb +3 -2
- data/src/ruby_supportlib/phusion_passenger/plugin.rb +3 -2
- data/src/ruby_supportlib/phusion_passenger/preloader_shared_helpers.rb +3 -2
- data/src/ruby_supportlib/phusion_passenger/public_api.rb +3 -2
- data/src/ruby_supportlib/phusion_passenger/rack/out_of_band_gc.rb +3 -2
- data/src/ruby_supportlib/phusion_passenger/rack/thread_handler_extension.rb +18 -6
- data/src/ruby_supportlib/phusion_passenger/request_handler.rb +3 -2
- data/src/ruby_supportlib/phusion_passenger/request_handler/thread_handler.rb +3 -2
- data/src/ruby_supportlib/phusion_passenger/ruby_core_enhancements.rb +45 -18
- data/src/ruby_supportlib/phusion_passenger/ruby_core_io_enhancements.rb +3 -2
- data/src/ruby_supportlib/phusion_passenger/simple_benchmarking.rb +3 -2
- data/src/ruby_supportlib/phusion_passenger/standalone/app_finder.rb +8 -7
- data/src/ruby_supportlib/phusion_passenger/standalone/command.rb +3 -2
- data/src/ruby_supportlib/phusion_passenger/standalone/config_utils.rb +4 -3
- data/src/ruby_supportlib/phusion_passenger/standalone/control_utils.rb +3 -2
- data/src/ruby_supportlib/phusion_passenger/standalone/main.rb +3 -2
- data/src/ruby_supportlib/phusion_passenger/standalone/start_command.rb +23 -20
- data/src/ruby_supportlib/phusion_passenger/standalone/start_command/builtin_engine.rb +3 -2
- data/src/ruby_supportlib/phusion_passenger/standalone/start_command/nginx_engine.rb +3 -2
- data/src/ruby_supportlib/phusion_passenger/standalone/status_command.rb +8 -3
- data/src/ruby_supportlib/phusion_passenger/standalone/stop_command.rb +8 -3
- data/src/ruby_supportlib/phusion_passenger/standalone/version_command.rb +5 -3
- data/src/ruby_supportlib/phusion_passenger/utils.rb +3 -2
- data/src/ruby_supportlib/phusion_passenger/utils/ansi_colors.rb +3 -2
- data/src/ruby_supportlib/phusion_passenger/utils/download.rb +3 -2
- data/src/ruby_supportlib/phusion_passenger/utils/file_system_watcher.rb +3 -2
- data/src/ruby_supportlib/phusion_passenger/utils/hosts_file_parser.rb +3 -2
- data/src/ruby_supportlib/phusion_passenger/utils/lock.rb +3 -2
- data/src/ruby_supportlib/phusion_passenger/utils/native_support_utils.rb +3 -2
- data/src/ruby_supportlib/phusion_passenger/utils/progress_bar.rb +3 -2
- data/src/ruby_supportlib/phusion_passenger/utils/terminal_choice_menu.rb +3 -2
- data/src/ruby_supportlib/phusion_passenger/utils/unseekable_socket.rb +3 -2
- metadata +36 -37
- metadata.gz.asc +7 -7
- data/src/cxx_supportlib/Account.h +0 -171
- data/src/cxx_supportlib/AccountsDatabase.h +0 -125
@@ -1,8 +1,9 @@
|
|
1
1
|
# encoding: utf-8
|
2
2
|
# Phusion Passenger - https://www.phusionpassenger.com/
|
3
|
-
# Copyright (c) 2013 Phusion
|
3
|
+
# Copyright (c) 2013 Phusion Holding B.V.
|
4
4
|
#
|
5
|
-
# "Phusion Passenger"
|
5
|
+
# "Passenger", "Phusion Passenger" and "Union Station" are registered
|
6
|
+
# trademarks of Phusion Holding B.V.
|
6
7
|
#
|
7
8
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
8
9
|
# of this software and associated documentation files (the "Software"), to deal
|
@@ -1,7 +1,8 @@
|
|
1
1
|
# Phusion Passenger - https://www.phusionpassenger.com/
|
2
|
-
# Copyright (c) 2010 Phusion
|
2
|
+
# Copyright (c) 2010 Phusion Holding B.V.
|
3
3
|
#
|
4
|
-
# "Phusion Passenger"
|
4
|
+
# "Passenger", "Phusion Passenger" and "Union Station" are registered
|
5
|
+
# trademarks of Phusion Holding B.V.
|
5
6
|
#
|
6
7
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
7
8
|
# of this software and associated documentation files (the "Software"), to deal
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: passenger
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.0.
|
4
|
+
version: 5.0.21
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Phusion - http://www.phusion.nl/
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-10-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -378,10 +378,6 @@ files:
|
|
378
378
|
- src/apache2_module/SetHeaders.cpp
|
379
379
|
- src/apache2_module/SetHeaders.cpp.erb
|
380
380
|
- src/apache2_module/mod_passenger.c
|
381
|
-
- src/cxx_supportlib/Account.h
|
382
|
-
- src/cxx_supportlib/AccountsDatabase.h
|
383
|
-
- src/cxx_supportlib/AgentsStarter.cpp
|
384
|
-
- src/cxx_supportlib/AgentsStarter.h
|
385
381
|
- src/cxx_supportlib/AppTypes.cpp
|
386
382
|
- src/cxx_supportlib/AppTypes.h
|
387
383
|
- src/cxx_supportlib/BackgroundEventLoop.cpp
|
@@ -479,6 +475,8 @@ files:
|
|
479
475
|
- src/cxx_supportlib/Utils/Template.h
|
480
476
|
- src/cxx_supportlib/Utils/Timer.h
|
481
477
|
- src/cxx_supportlib/Utils/VariantMap.h
|
478
|
+
- src/cxx_supportlib/WatchdogLauncher.cpp
|
479
|
+
- src/cxx_supportlib/WatchdogLauncher.h
|
482
480
|
- src/cxx_supportlib/oxt/Readme.txt
|
483
481
|
- src/cxx_supportlib/oxt/backtrace.hpp
|
484
482
|
- src/cxx_supportlib/oxt/detail/backtrace_disabled.hpp
|
@@ -499,37 +497,6 @@ files:
|
|
499
497
|
- src/cxx_supportlib/oxt/system_calls.hpp
|
500
498
|
- src/cxx_supportlib/oxt/thread.hpp
|
501
499
|
- src/cxx_supportlib/oxt/tracable_exception.hpp
|
502
|
-
- src/cxx_supportlib/vendor-copy/libev/Changes
|
503
|
-
- src/cxx_supportlib/vendor-copy/libev/LICENSE
|
504
|
-
- src/cxx_supportlib/vendor-copy/libev/Makefile.am
|
505
|
-
- src/cxx_supportlib/vendor-copy/libev/Makefile.in
|
506
|
-
- src/cxx_supportlib/vendor-copy/libev/README
|
507
|
-
- src/cxx_supportlib/vendor-copy/libev/aclocal.m4
|
508
|
-
- src/cxx_supportlib/vendor-copy/libev/autogen.sh
|
509
|
-
- src/cxx_supportlib/vendor-copy/libev/config.guess
|
510
|
-
- src/cxx_supportlib/vendor-copy/libev/config.h.in
|
511
|
-
- src/cxx_supportlib/vendor-copy/libev/config.sub
|
512
|
-
- src/cxx_supportlib/vendor-copy/libev/configure
|
513
|
-
- src/cxx_supportlib/vendor-copy/libev/configure.ac
|
514
|
-
- src/cxx_supportlib/vendor-copy/libev/depcomp
|
515
|
-
- src/cxx_supportlib/vendor-copy/libev/ev++.h
|
516
|
-
- src/cxx_supportlib/vendor-copy/libev/ev.c
|
517
|
-
- src/cxx_supportlib/vendor-copy/libev/ev.h
|
518
|
-
- src/cxx_supportlib/vendor-copy/libev/ev_epoll.c
|
519
|
-
- src/cxx_supportlib/vendor-copy/libev/ev_kqueue.c
|
520
|
-
- src/cxx_supportlib/vendor-copy/libev/ev_poll.c
|
521
|
-
- src/cxx_supportlib/vendor-copy/libev/ev_port.c
|
522
|
-
- src/cxx_supportlib/vendor-copy/libev/ev_select.c
|
523
|
-
- src/cxx_supportlib/vendor-copy/libev/ev_vars.h
|
524
|
-
- src/cxx_supportlib/vendor-copy/libev/ev_win32.c
|
525
|
-
- src/cxx_supportlib/vendor-copy/libev/ev_wrap.h
|
526
|
-
- src/cxx_supportlib/vendor-copy/libev/event.c
|
527
|
-
- src/cxx_supportlib/vendor-copy/libev/event.h
|
528
|
-
- src/cxx_supportlib/vendor-copy/libev/install-sh
|
529
|
-
- src/cxx_supportlib/vendor-copy/libev/libev.m4
|
530
|
-
- src/cxx_supportlib/vendor-copy/libev/ltmain.sh
|
531
|
-
- src/cxx_supportlib/vendor-copy/libev/missing
|
532
|
-
- src/cxx_supportlib/vendor-copy/libev/mkinstalldirs
|
533
500
|
- src/cxx_supportlib/vendor-copy/libuv/AUTHORS
|
534
501
|
- src/cxx_supportlib/vendor-copy/libuv/ChangeLog
|
535
502
|
- src/cxx_supportlib/vendor-copy/libuv/LICENSE
|
@@ -2844,6 +2811,37 @@ files:
|
|
2844
2811
|
- src/cxx_supportlib/vendor-modified/jsoncpp/json-forwards.h
|
2845
2812
|
- src/cxx_supportlib/vendor-modified/jsoncpp/json.h
|
2846
2813
|
- src/cxx_supportlib/vendor-modified/jsoncpp/jsoncpp.cpp
|
2814
|
+
- src/cxx_supportlib/vendor-modified/libev/Changes
|
2815
|
+
- src/cxx_supportlib/vendor-modified/libev/LICENSE
|
2816
|
+
- src/cxx_supportlib/vendor-modified/libev/Makefile.am
|
2817
|
+
- src/cxx_supportlib/vendor-modified/libev/Makefile.in
|
2818
|
+
- src/cxx_supportlib/vendor-modified/libev/README
|
2819
|
+
- src/cxx_supportlib/vendor-modified/libev/aclocal.m4
|
2820
|
+
- src/cxx_supportlib/vendor-modified/libev/autogen.sh
|
2821
|
+
- src/cxx_supportlib/vendor-modified/libev/config.guess
|
2822
|
+
- src/cxx_supportlib/vendor-modified/libev/config.h.in
|
2823
|
+
- src/cxx_supportlib/vendor-modified/libev/config.sub
|
2824
|
+
- src/cxx_supportlib/vendor-modified/libev/configure
|
2825
|
+
- src/cxx_supportlib/vendor-modified/libev/configure.ac
|
2826
|
+
- src/cxx_supportlib/vendor-modified/libev/depcomp
|
2827
|
+
- src/cxx_supportlib/vendor-modified/libev/ev++.h
|
2828
|
+
- src/cxx_supportlib/vendor-modified/libev/ev.c
|
2829
|
+
- src/cxx_supportlib/vendor-modified/libev/ev.h
|
2830
|
+
- src/cxx_supportlib/vendor-modified/libev/ev_epoll.c
|
2831
|
+
- src/cxx_supportlib/vendor-modified/libev/ev_kqueue.c
|
2832
|
+
- src/cxx_supportlib/vendor-modified/libev/ev_poll.c
|
2833
|
+
- src/cxx_supportlib/vendor-modified/libev/ev_port.c
|
2834
|
+
- src/cxx_supportlib/vendor-modified/libev/ev_select.c
|
2835
|
+
- src/cxx_supportlib/vendor-modified/libev/ev_vars.h
|
2836
|
+
- src/cxx_supportlib/vendor-modified/libev/ev_win32.c
|
2837
|
+
- src/cxx_supportlib/vendor-modified/libev/ev_wrap.h
|
2838
|
+
- src/cxx_supportlib/vendor-modified/libev/event.c
|
2839
|
+
- src/cxx_supportlib/vendor-modified/libev/event.h
|
2840
|
+
- src/cxx_supportlib/vendor-modified/libev/install-sh
|
2841
|
+
- src/cxx_supportlib/vendor-modified/libev/libev.m4
|
2842
|
+
- src/cxx_supportlib/vendor-modified/libev/ltmain.sh
|
2843
|
+
- src/cxx_supportlib/vendor-modified/libev/missing
|
2844
|
+
- src/cxx_supportlib/vendor-modified/libev/mkinstalldirs
|
2847
2845
|
- src/cxx_supportlib/vendor-modified/modp_b64.cpp
|
2848
2846
|
- src/cxx_supportlib/vendor-modified/modp_b64.h
|
2849
2847
|
- src/cxx_supportlib/vendor-modified/modp_b64_data.h
|
@@ -2934,6 +2932,7 @@ files:
|
|
2934
2932
|
- src/ruby_supportlib/phusion_passenger/platform_info/depcheck_specs/ruby.rb
|
2935
2933
|
- src/ruby_supportlib/phusion_passenger/platform_info/depcheck_specs/utilities.rb
|
2936
2934
|
- src/ruby_supportlib/phusion_passenger/platform_info/linux.rb
|
2935
|
+
- src/ruby_supportlib/phusion_passenger/platform_info/openssl.rb
|
2937
2936
|
- src/ruby_supportlib/phusion_passenger/platform_info/operating_system.rb
|
2938
2937
|
- src/ruby_supportlib/phusion_passenger/platform_info/ruby.rb
|
2939
2938
|
- src/ruby_supportlib/phusion_passenger/platform_info/zlib.rb
|
metadata.gz.asc
CHANGED
@@ -2,11 +2,11 @@
|
|
2
2
|
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
|
3
3
|
Comment: GPGTools - http://gpgtools.org
|
4
4
|
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
=
|
5
|
+
iQEcBAABAgAGBQJWKKTiAAoJECrHRaUKISqMekQH/1osYVyAJQ13IA9saa0qd7zw
|
6
|
+
ebgUPfao2rL4HQIvguxxO1m03wlzeOj1Thwyayl3/3cAqT8+7hyuqzTXuE5Haw5C
|
7
|
+
CnIZxaaFQDINNCWnR72jAsFzMgAMPw/E5i1dqj+qQg800EIw3A/ahEMWA12c0TSm
|
8
|
+
cfYOcAffDUiwTqOIEjYvoP2bpMi5onyGBR4zvS8DmekPhPr6McvEQi7BhFDgPPnA
|
9
|
+
ozkFns1HIhjizqMM9cG1BmpRxodc+iLhGriTpgfu508ETl5ZKJYJOhMomEawtJ8A
|
10
|
+
k5sX2UEqsOIcw0tyibJ/XgF8Yd1ncPurZHrzYzO+jih105zOhCLKImawxxWmQhs=
|
11
|
+
=wsRl
|
12
12
|
-----END PGP SIGNATURE-----
|
@@ -1,171 +0,0 @@
|
|
1
|
-
/*
|
2
|
-
* Phusion Passenger - https://www.phusionpassenger.com/
|
3
|
-
* Copyright (c) 2010-2015 Phusion
|
4
|
-
*
|
5
|
-
* "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
|
6
|
-
*
|
7
|
-
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
8
|
-
* of this software and associated documentation files (the "Software"), to deal
|
9
|
-
* in the Software without restriction, including without limitation the rights
|
10
|
-
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
11
|
-
* copies of the Software, and to permit persons to whom the Software is
|
12
|
-
* furnished to do so, subject to the following conditions:
|
13
|
-
*
|
14
|
-
* The above copyright notice and this permission notice shall be included in
|
15
|
-
* all copies or substantial portions of the Software.
|
16
|
-
*
|
17
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
18
|
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
19
|
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
20
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
21
|
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
22
|
-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
23
|
-
* THE SOFTWARE.
|
24
|
-
*/
|
25
|
-
#ifndef _PASSENGER_ACCOUNT_H_
|
26
|
-
#define _PASSENGER_ACCOUNT_H_
|
27
|
-
|
28
|
-
#include <string>
|
29
|
-
#include <vector>
|
30
|
-
#include <boost/shared_ptr.hpp>
|
31
|
-
#include <StaticString.h>
|
32
|
-
#include <Exceptions.h>
|
33
|
-
#include <Utils/StrIntUtils.h>
|
34
|
-
|
35
|
-
namespace Passenger {
|
36
|
-
|
37
|
-
using namespace boost;
|
38
|
-
using namespace std;
|
39
|
-
|
40
|
-
/*
|
41
|
-
* SECURITY NOTES
|
42
|
-
*
|
43
|
-
* We want to avoid storing plain text passwords in memory, because attackers may be able
|
44
|
-
* to read this process's memory, e.g. through core dumps or debuggers. So in this source
|
45
|
-
* file, as well as in several others, we follow these guidelines:
|
46
|
-
*
|
47
|
-
* - Variables and arguments named userSuppliedPassword represent passwords
|
48
|
-
* supplied by a human, i.e. user input. These variables and arguments have the type
|
49
|
-
* 'StaticString' instead of 'string', because we want to avoid accidentally copying
|
50
|
-
* the password values.
|
51
|
-
* - Variables and arguments named passwordOrHash might also represent passwords. However,
|
52
|
-
* if it is a password, then it is guaranteed NOT to be supplied by a human, e.g. it's
|
53
|
-
* randomly generated. Therefore it's okay for passwordOrHash to be of type 'string'.
|
54
|
-
* - If there is a need to copy the password for whatever reason, then it must be cleared
|
55
|
-
* with ZeroMemoryGuard as soon as possible. Do not use memset(), the code
|
56
|
-
* for ZeroMemoryGuard explains why.
|
57
|
-
*/
|
58
|
-
|
59
|
-
class Account {
|
60
|
-
public:
|
61
|
-
enum Rights {
|
62
|
-
ALL = ~0,
|
63
|
-
NONE = 0,
|
64
|
-
|
65
|
-
// Passenger core ApplicationPool rights.
|
66
|
-
CLEAR = 1 << 0,
|
67
|
-
DETACH = 1 << 1,
|
68
|
-
SET_PARAMETERS = 1 << 2,
|
69
|
-
RESTART = 1 << 3,
|
70
|
-
INSPECT_BASIC_INFO = 1 << 4,
|
71
|
-
INSPECT_SENSITIVE_INFO = 1 << 5,
|
72
|
-
|
73
|
-
// Passenger core admin rights.
|
74
|
-
INSPECT_REQUESTS = 1 << 8,
|
75
|
-
INSPECT_BACKTRACES = 1 << 9,
|
76
|
-
|
77
|
-
// Other rights.
|
78
|
-
EXIT = 1 << 31
|
79
|
-
};
|
80
|
-
|
81
|
-
private:
|
82
|
-
string username;
|
83
|
-
string passwordOrHash;
|
84
|
-
bool hashGiven;
|
85
|
-
Rights rights;
|
86
|
-
|
87
|
-
public:
|
88
|
-
// Urgh, I can't use 'Rights' here as type because apparently bitwise
|
89
|
-
// ORing two enums results in an int type.
|
90
|
-
|
91
|
-
static Rights parseRightsString(const string &str, int defaultValue = NONE) {
|
92
|
-
vector<string> rights_vec;
|
93
|
-
vector<string>::const_iterator it;
|
94
|
-
int result = defaultValue;
|
95
|
-
|
96
|
-
split(str, ',', rights_vec);
|
97
|
-
for (it = rights_vec.begin(); it != rights_vec.end(); it++) {
|
98
|
-
if (*it == "all") {
|
99
|
-
result = ALL;
|
100
|
-
} else if (*it == "none") {
|
101
|
-
result = NONE;
|
102
|
-
|
103
|
-
} else if (*it == "clear") {
|
104
|
-
result |= CLEAR;
|
105
|
-
} else if (*it == "detach") {
|
106
|
-
result |= DETACH;
|
107
|
-
} else if (*it == "set_parameters") {
|
108
|
-
result |= SET_PARAMETERS;
|
109
|
-
} else if (*it == "inspect_basic_info") {
|
110
|
-
result |= INSPECT_BASIC_INFO;
|
111
|
-
} else if (*it == "inspect_sensitive_info") {
|
112
|
-
result |= INSPECT_SENSITIVE_INFO;
|
113
|
-
|
114
|
-
} else if (*it == "inspect_requests") {
|
115
|
-
result |= INSPECT_REQUESTS;
|
116
|
-
} else if (*it == "inspect_backtraces") {
|
117
|
-
result |= INSPECT_BACKTRACES;
|
118
|
-
|
119
|
-
} else if (*it == "exit") {
|
120
|
-
result |= EXIT;
|
121
|
-
|
122
|
-
} else if (*it != "") {
|
123
|
-
throw ArgumentException("Unknown right '" + *it + "'.");
|
124
|
-
}
|
125
|
-
}
|
126
|
-
|
127
|
-
return (Rights) result;
|
128
|
-
}
|
129
|
-
|
130
|
-
Account(const string &username, const string &passwordOrHash, bool hashGiven, int rights = ALL) {
|
131
|
-
this->username = username;
|
132
|
-
this->passwordOrHash = passwordOrHash;
|
133
|
-
this->hashGiven = hashGiven;
|
134
|
-
this->rights = (Rights) rights;
|
135
|
-
}
|
136
|
-
|
137
|
-
bool checkPasswordOrHash(const StaticString &userSuppliedPassword) const {
|
138
|
-
if (hashGiven) {
|
139
|
-
return passwordOrHash == createHash(userSuppliedPassword);
|
140
|
-
} else {
|
141
|
-
return userSuppliedPassword == passwordOrHash;
|
142
|
-
}
|
143
|
-
}
|
144
|
-
|
145
|
-
bool hasRights(int rights) const {
|
146
|
-
return this->rights & rights;
|
147
|
-
}
|
148
|
-
|
149
|
-
void setRights(int rights) {
|
150
|
-
this->rights = (Rights) rights;
|
151
|
-
}
|
152
|
-
|
153
|
-
string getUsername() const {
|
154
|
-
return username;
|
155
|
-
}
|
156
|
-
|
157
|
-
string getRawPassword() const {
|
158
|
-
return passwordOrHash;
|
159
|
-
}
|
160
|
-
|
161
|
-
static string createHash(const StaticString &userSuppliedPassword) {
|
162
|
-
// TODO: use bcrypt or something
|
163
|
-
return userSuppliedPassword;
|
164
|
-
}
|
165
|
-
};
|
166
|
-
|
167
|
-
typedef boost::shared_ptr<Account> AccountPtr;
|
168
|
-
|
169
|
-
} // namespace Passenger
|
170
|
-
|
171
|
-
#endif /* _PASSENGER_ACCOUNT_H_ */
|
@@ -1,125 +0,0 @@
|
|
1
|
-
/*
|
2
|
-
* Phusion Passenger - https://www.phusionpassenger.com/
|
3
|
-
* Copyright (c) 2010-2014 Phusion
|
4
|
-
*
|
5
|
-
* "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
|
6
|
-
*
|
7
|
-
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
8
|
-
* of this software and associated documentation files (the "Software"), to deal
|
9
|
-
* in the Software without restriction, including without limitation the rights
|
10
|
-
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
11
|
-
* copies of the Software, and to permit persons to whom the Software is
|
12
|
-
* furnished to do so, subject to the following conditions:
|
13
|
-
*
|
14
|
-
* The above copyright notice and this permission notice shall be included in
|
15
|
-
* all copies or substantial portions of the Software.
|
16
|
-
*
|
17
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
18
|
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
19
|
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
20
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
21
|
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
22
|
-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
23
|
-
* THE SOFTWARE.
|
24
|
-
*/
|
25
|
-
#ifndef _PASSENGER_ACCOUNTS_DATABASE_H_
|
26
|
-
#define _PASSENGER_ACCOUNTS_DATABASE_H_
|
27
|
-
|
28
|
-
#include <string>
|
29
|
-
#include <map>
|
30
|
-
#include <boost/thread.hpp>
|
31
|
-
#include <boost/shared_ptr.hpp>
|
32
|
-
#include <Account.h>
|
33
|
-
#include <StaticString.h>
|
34
|
-
|
35
|
-
/* This source file follows the security guidelines written in Account.h. */
|
36
|
-
|
37
|
-
namespace Passenger {
|
38
|
-
|
39
|
-
using namespace std;
|
40
|
-
using namespace boost;
|
41
|
-
|
42
|
-
class AccountsDatabase;
|
43
|
-
typedef boost::shared_ptr<AccountsDatabase> AccountsDatabasePtr;
|
44
|
-
|
45
|
-
|
46
|
-
class AccountsDatabase {
|
47
|
-
private:
|
48
|
-
mutable boost::mutex lock;
|
49
|
-
map<string, AccountPtr> accounts;
|
50
|
-
unsigned int uniqueNumber;
|
51
|
-
|
52
|
-
public:
|
53
|
-
AccountsDatabase() {
|
54
|
-
uniqueNumber = 0;
|
55
|
-
}
|
56
|
-
|
57
|
-
unsigned int size() const {
|
58
|
-
boost::lock_guard<boost::mutex> l(lock);
|
59
|
-
return (unsigned int) accounts.size();
|
60
|
-
}
|
61
|
-
|
62
|
-
vector<string> listUsernames() const {
|
63
|
-
map<string, AccountPtr>::const_iterator it;
|
64
|
-
vector<string> result;
|
65
|
-
|
66
|
-
for (it = accounts.begin(); it != accounts.end(); it++) {
|
67
|
-
result.push_back(it->second->getUsername());
|
68
|
-
}
|
69
|
-
return result;
|
70
|
-
}
|
71
|
-
|
72
|
-
AccountPtr add(const string &username, const string &passwordOrHash, bool hashGiven, int rights = Account::ALL) {
|
73
|
-
AccountPtr account(new Account(username, passwordOrHash, hashGiven, rights));
|
74
|
-
boost::lock_guard<boost::mutex> l(lock);
|
75
|
-
accounts[username] = account;
|
76
|
-
return account;
|
77
|
-
}
|
78
|
-
|
79
|
-
const AccountPtr get(const string &username) const {
|
80
|
-
boost::lock_guard<boost::mutex> l(lock);
|
81
|
-
map<string, AccountPtr>::const_iterator it = accounts.find(username);
|
82
|
-
if (it == accounts.end()) {
|
83
|
-
return AccountPtr();
|
84
|
-
} else {
|
85
|
-
return it->second;
|
86
|
-
}
|
87
|
-
}
|
88
|
-
|
89
|
-
AccountPtr authenticate(const string &username, const StaticString &userSuppliedPassword) const {
|
90
|
-
boost::lock_guard<boost::mutex> l(lock);
|
91
|
-
map<string, AccountPtr>::const_iterator it = accounts.find(username);
|
92
|
-
if (it == accounts.end()) {
|
93
|
-
return AccountPtr();
|
94
|
-
} else {
|
95
|
-
AccountPtr account = it->second;
|
96
|
-
if (account->checkPasswordOrHash(userSuppliedPassword)) {
|
97
|
-
return account;
|
98
|
-
} else {
|
99
|
-
return AccountPtr();
|
100
|
-
}
|
101
|
-
}
|
102
|
-
}
|
103
|
-
|
104
|
-
bool remove(const string &username) {
|
105
|
-
boost::lock_guard<boost::mutex> l(lock);
|
106
|
-
map<string, AccountPtr>::iterator it = accounts.find(username);
|
107
|
-
if (it == accounts.end()) {
|
108
|
-
return false;
|
109
|
-
} else {
|
110
|
-
accounts.erase(it);
|
111
|
-
return true;
|
112
|
-
}
|
113
|
-
}
|
114
|
-
|
115
|
-
unsigned int getUniqueNumber() {
|
116
|
-
boost::lock_guard<boost::mutex> l(lock);
|
117
|
-
unsigned int result = uniqueNumber;
|
118
|
-
uniqueNumber++;
|
119
|
-
return result;
|
120
|
-
}
|
121
|
-
};
|
122
|
-
|
123
|
-
} // namespace Passenger
|
124
|
-
|
125
|
-
#endif /* _PASSENGER_ACCOUNTS_DATABASE_H_ */
|