Bug 1246531 - error in systemd service file
Summary: error in systemd service file
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: sslh
Version: 22
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: James Hogarth
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-07-24 14:00 UTC by James Hogarth
Modified: 2015-08-22 22:50 UTC (History)
3 users (show)

Fixed In Version: 1.17-2.fc22
Clone Of: 1221320
Environment:
Last Closed: 2015-08-22 22:50:28 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description James Hogarth 2015-07-24 14:00:46 UTC
+++ This bug was initially created as a clone of Bug #1221320 +++

Description of problems:
file: /usr/lib/systemd/system/sslh.service
-ExecStart=/usr/sbin/sslh -F /etc/sslh.cfg ${DAEMON_OPTS}
+ExecStart=/usr/sbin/sslh -F /etc/sslh.cfg $DAEMON_OPTS

file: /etc/sysconfig/sslh
non existent - should be there with defaults like:
DAEMON_OPTS=--foreground --user sslh --listen 0.0.0.0:443 --ssl 127.0.0.1:8443 --ssh 127.0.0.1:22

file: /etc/sslh.cfg
-# Change hostname with your external address name.
-listen:
-(
-    { host: "klaut-ng"; port: "443"; }
-);
-
-protocols:
-(
-     { name: "ssh"; service: "ssh"; host: "localhost"; port: "22"; probe: "builtin"; },
-     { name: "http"; host: "localhost"; port: "80"; probe: "builtin"; },
-     { name: "ssl"; host: "localhost"; port: "442"; probe: "builtin"; },
-);
These defaults do not work. Use /etc/sysconfig/sslh instead.


Version-Release number of selected component (if applicable):
sslh-1.17-1.el7.x86_64

--- Additional comment from James Hogarth on 2015-05-14 07:04:57 EDT ---

I disagree with using /etc/sysconfig/sslh to configure it in entirety (the whole reason for libconfig is to use /etc/sslh.cfg and that configuration file allows for other probes than builtin).

The sysconfig file is nonexistent but the systemd service file does reference it if it exists ... 

How about this as an option that, so far as I can see, will satisfy your need but not affect current behaviour from a straight install ...

1) Create /etc/sysconfig/sslh from install 
2) Have the systemd unit reference it
3) Have the default DAEMON_OPTS be '-F /etc/sslh.cfg' so it's clear and easily overridable rather than hard code that into the systemd unit.

As for the defaults  not working ... I was running on the reasoning that someone would have to change these anyway to configure appropriately - just as they'd have to config mod_ssl to use localhost (or a different port) and so on ... Setting the listening port to 0.0.0.0:443 would conflict with a standard install of httpd/mod_ssl ... and it's better to have mod_ssl listen on localhost:443 (selinux reasons etc) than to move that ...

In fact the config file explicitly states "Change hostname with your external address name" to make this clear.

--- Additional comment from James Hogarth on 2015-05-18 10:18:36 EDT ---

If you can let me know what you think of my alternative I can edit the package and push updates.

--- Additional comment from  on 2015-05-18 10:25:47 EDT ---

your approach...

1) Create /etc/sysconfig/sslh from install 
2) Have the systemd unit reference it
3) Have the default DAEMON_OPTS be '-F /etc/sslh.cfg' so it's clear and easily overridable rather than hard code that into the systemd unit.

... is a reasonable compromise. 

Please push this update.

Comment 1 Fedora Update System 2015-07-24 14:05:51 UTC
sslh-1.17-2.fc22 has been submitted as an update for Fedora 22.
https://admin.fedoraproject.org/updates/sslh-1.17-2.fc22

Comment 2 Fedora Update System 2015-07-30 00:54:01 UTC
Package sslh-1.17-2.fc22:
* should fix your issue,
* was pushed to the Fedora 22 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing sslh-1.17-2.fc22'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2015-12145/sslh-1.17-2.fc22
then log in and leave karma (feedback).

Comment 3 Fedora Update System 2015-08-22 22:50:26 UTC
sslh-1.17-2.fc22 has been pushed to the Fedora 22 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.