Bug 977873 - Use full path to server when checking selinux context
Use full path to server when checking selinux context
Product: Fedora
Classification: Fedora
Component: xinetd (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Jan Synacek
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2013-06-25 09:49 EDT by Jan Synacek
Modified: 2013-07-04 22:06 EDT (History)
2 users (show)

See Also:
Fixed In Version: xinetd-2.3.15-6.fc19
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2013-07-04 22:06:56 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Patch (404 bytes, patch)
2013-06-25 09:51 EDT, Jan Synacek
no flags Details | Diff

  None (edit)
Description Jan Synacek 2013-06-25 09:49:57 EDT
Description of problem:
When the server binary is checked for its selinux context, its path is not full, and if the binary is located in a nonstandard location, getfilecon() returns -1 and xinetd reports that changing process context failed.

In set_context_from_socket():
   exepath = SC_SERVER_ARGV( scp )[0];
   if (getfilecon(exepath, &exec_context) < 0)
     goto fail;

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. Have a testing server

2. Configure a xinetd service
service test_labeled_ipv4
        id              = test_labeled_ipv4
        type            = UNLISTED
        flags           = REUSE IPv4 LABELED
        wait            = no
        user            = root
        disable         = no
        instances       = 1
        socket_type     = stream
        protocol        = tcp
        port            = 4001
        server          = /usr/local/non-standard/path/test_labeled_ipv4

3. Connect to the server

4. Observe an error

Actual results:
13/6/25@15:44:01: ERROR: 8373 {exec_server} Changing process context failed for test_labeled_ipv4

Expected results:
Connection succeeds if all the selinux stuff is right.
Comment 1 Jan Synacek 2013-06-25 09:51:52 EDT
Created attachment 765095 [details]
Comment 2 Fedora Update System 2013-06-26 04:07:14 EDT
xinetd-2.3.15-6.fc19 has been submitted as an update for Fedora 19.
Comment 4 Fedora Update System 2013-06-26 13:08:00 EDT
Package xinetd-2.3.15-6.fc19:
* should fix your issue,
* was pushed to the Fedora 19 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing xinetd-2.3.15-6.fc19'
as soon as you are able to.
Please go to the following url:
then log in and leave karma (feedback).
Comment 5 Fedora Update System 2013-07-04 22:06:56 EDT
xinetd-2.3.15-6.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.