Bug 2922 - missing service_name in check_service_files_ownership function of ssh-host-config for cygwin
Summary: missing service_name in check_service_files_ownership function of ssh-host-co...
Status: CLOSED FIXED
Alias: None
Product: Portable OpenSSH
Classification: Unclassified
Component: Miscellaneous (show other bugs)
Version: 7.7p1
Hardware: amd64 Cygwin on NT/2k/Win7-11
: P5 normal
Assignee: Assigned to nobody
URL:
Keywords:
Depends on:
Blocks: V_7_9
  Show dependency treegraph
 
Reported: 2018-10-23 11:29 AEDT by Christian.Lupien
Modified: 2021-10-14 01:40 AEDT (History)
4 users (show)

See Also:


Attachments
patch to fix the hardcoded sshd service name (391 bytes, patch)
2018-10-23 11:29 AEDT, Christian.Lupien
no flags Details | Diff
follow up fix (2.47 KB, patch)
2018-11-09 20:35 AEDT, Corinna Vinschen
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Christian.Lupien 2018-10-23 11:29:38 AEDT
Created attachment 3195 [details]
patch to fix the hardcoded sshd service name

On windows 10 (1803), there is already a sshd service present, therefore during the cygwin sshd setup, using ssh-host-config, it requires using the -N option to use a different service name. For example:
 ssh-host-config -N cygwin_sshd

However that fails because during the function:
  check_service_files_ownership
it still tries to use the old sshd service name which is hardcoded.

The following patch fixes the problem for me (I was using OpenSSH_7.8p1, but the problem is still there today 2018-10-22 on the master branch)
Comment 1 Damien Miller 2018-11-09 13:54:41 AEDT
Corinna, could you please take a look at this?
Comment 2 Corinna Vinschen 2018-11-09 20:35:34 AEDT
Created attachment 3201 [details]
follow up fix

Patch is fine, but on inspection I found a few comments
suffering the same problem.  Also fixed a typo.  Patch attached.
Comment 3 Darren Tucker 2018-11-11 16:02:41 AEDT
Applied both to head, thanks.  Both changes will be in the next major release.  I also cherry picked the servicename fix into the V_7_9 branch so if there a is p2 release it'll be in it (we typically don't do those unless something critical comes up).
Comment 4 Damien Miller 2021-04-23 14:55:39 AEST
closing resolved bugs as of 8.6p1 release
Comment 5 Ahmed Sayeed 2021-10-14 01:40:24 AEDT
[spam removed]