After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 751326 - Uses hard-coded name for ssh service
Uses hard-coded name for ssh service
Status: RESOLVED FIXED
Product: gnome-control-center
Classification: Core
Component: Sharing
3.16.x
Other Linux
: Normal normal
: ---
Assigned To: Control-Center Maintainers
Control-Center Maintainers
: 692223 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2015-06-22 15:01 UTC by Michael Biebl
Modified: 2015-07-27 16:13 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
[PATCH] Make it possible to override SSHD_SERVICE (985 bytes, patch)
2015-06-28 11:06 UTC, Michael Biebl
accepted-commit_now Details | Review

Description Michael Biebl 2015-06-22 15:01:21 UTC
The Sharing panel for remote logins uses a hard-coded name for the SSH service, named sshd.service.

Unfortunately, openssh does not yet ship a systemd service file, so different distros use different names: E.g. on Fedora the unit is called sshd.service, on Debian/Ubuntu it is called ssh.service.

It would therefore be good, if the name would be configurable via a configure switch.
Atm it's statically defined as
panels/sharing/cc-remote-login-helper.c:#define SSHD_SERVICE "sshd.service"

A very simple fix could be to at least wrap that into a
#ifndef SSHD_SERVICE
#define SSHD_SERVICE "sshd.service"
#endif

so it could be overridden via CFLAGS.
Comment 1 Michael Biebl 2015-06-22 21:14:03 UTC
I'm happy to provide a patch which adds a configure option
--with-ssh-service=<foo>.service
Comment 2 Bastien Nocera 2015-06-26 09:15:04 UTC
(In reply to Michael Biebl from comment #0)
<snip>
> A very simple fix could be to at least wrap that into a
> #ifndef SSHD_SERVICE
> #define SSHD_SERVICE "sshd.service"
> #endif

I'll take a patch for that, not really interested in making this any more complicated.
Comment 3 Michael Biebl 2015-06-28 11:06:15 UTC
Created attachment 306233 [details] [review]
[PATCH] Make it possible to override SSHD_SERVICE
Comment 4 Bastien Nocera 2015-06-28 19:00:55 UTC
Review of attachment 306233 [details] [review]:

> Therefor make it possible to override SSHD_SERVICE via CFLAGS.

Therefore

I'm guessing you tested this as well? If so, looks good to commit with the typo fix.
Comment 5 Michael Biebl 2015-06-28 22:28:26 UTC
Committed as 1f4f6ded0fd4a1cc333148c7e4ab11b9631e4779 

I fixed the typo you mentioned and also updated another occurence of SSHD_SERVICE in panels/sharing/cc-remote-login.c.

Thanks for the review.
Comment 6 Bastien Nocera 2015-07-27 16:13:43 UTC
*** Bug 692223 has been marked as a duplicate of this bug. ***