Description of problem:
The 'passenger' RPM ships scripts to help launch Passenger, but they have the wrong context, causing Passenger to load in the web server's context (e.g. httpd_t) instead of passenger_t.
The paths changed and the file context list needs updating.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. ll -Z /usr/lib64/passenger/support-binaries/PassengerAgent
2. ll -Z /usr/share/passenger/helper-scripts/prespawn
-rwxr-xr-x. 1 root root system_u:object_r:lib_t:s0 4392456 Mar 29 07:18 /usr/lib64/passenger/support-binaries/PassengerAgent
-rwxr-xr-x. 1 root root system_u:object_r:usr_t:s0 4001 Mar 29 07:18 /usr/share/passenger/helper-scripts/prespawn
-rwxr-xr-x. 1 root root system_u:object_r:passenger_exec_t:s0 4001 Mar 29 07:18 /usr/share/passenger/helper-scripts/prespawn
-rwxr-xr-x. 1 root root system_u:object_r:passenger_exec_t:s0 4392456 Mar 29 07:18 /usr/lib64/passenger/support-binaries/PassengerAgent
semanage fcontext -l | grep passenger returns:
/usr/lib/gems/.*/ApplicationPoolServerExecutable regular file system_u:object_r:passenger_exec_t:s0
/usr/lib/gems/.*/Passenger.* regular file system_u:object_r:passenger_exec_t:s0
/usr/share/.*/gems/.*/helper-scripts/prespawn regular file system_u:object_r:passenger_exec_t:s0
/usr/share/gems/.*/ApplicationPoolServerExecutable regular file system_u:object_r:passenger_exec_t:s0
/usr/share/gems/.*/Passenger.* regular file system_u:object_r:passenger_exec_t:s0
Passenger was repackaged from a rubygem to plain "passenger" in Fedora 22. The F24 package content list is at http://koji.fedoraproject.org/koji/rpminfo?rpmID=7541815
This causes Passenger under httpd to run in httpd_t instead of passenger_t:
App 11401 stdout:
[ 2016-05-26 09:47:19.2498 11297/7f33720cb700 age/Cor/App/Implementation.cpp:304 ]: Could not spawn process for application /usr/share/foreman: An error occurred while starting up the preloader.
Error ID: 66bc9839
Error details saved to: /tmp/passenger-error-T9T1T8.html
Message from application: Permission denied @ rb_sysopen - /usr/share/foreman/tmp/cache/websockets_ssl_key20160526-11401-1jr00ol (Errno::EACCES)
/usr/share/ruby/tempfile.rb:133:in `block in initialize'
/usr/share/gems/gems/activesupport-22.214.171.124/lib/active_support/cache.rb:391:in `block in write'
/usr/share/gems/gems/activesupport-126.96.36.199/lib/active_support/cache.rb:547:in `block in instrument'
/usr/share/foreman/config/environment.rb:5:in `<top (required)>'
config.ru:3:in `block in <main>'
[ 2016-05-26 09:47:19.2538 11297/7f337314e700 age/Cor/Con/CheckoutSession.cpp:285 ]: [Client 1-4] Cannot checkout session because a spawning error occurred. The identifier of the error is 66bc9839. Please see earlier logs for details about the error.
[root@ec2-52-51-40-228 ~]# ps -efZ | grep Passenger
system_u:system_r:httpd_t:s0 root 11290 11261 0 09:46 ? 00:00:00 Passenger watchdog
system_u:system_r:httpd_t:s0 root 11297 11290 0 09:46 ? 00:00:00 Passenger core
system_u:system_r:httpd_t:s0 nobody 11302 11290 0 09:46 ? 00:00:00 Passenger ust-router
unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 root 11423 997 0 09:47 pts/0 00:00:00 grep --color=auto Passenger
This message is a reminder that Fedora 24 is nearing its end of life.
Approximately 2 (two) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 24. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora 'version'
Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version.
Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 24 is end of life. If you would still like
to see this bug fixed and are able to reproduce it against a later version
of Fedora, you are encouraged change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.
Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.
Fedora 24 changed to end-of-life (EOL) status on 2017-08-08. Fedora 24 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.
If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
Thank you for reporting this bug and we are sorry it could not be fixed.