GNOME Bugzilla – Bug 751326
Uses hard-coded name for ssh service
Last modified: 2015-07-27 16:13:43 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.
I'm happy to provide a patch which adds a configure option --with-ssh-service=<foo>.service
(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.
Created attachment 306233 [details] [review] [PATCH] Make it possible to override SSHD_SERVICE
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.
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.
*** Bug 692223 has been marked as a duplicate of this bug. ***