Bug 2922

Summary: missing service_name in check_service_files_ownership function of ssh-host-config for cygwin
Product: Portable OpenSSH Reporter: Christian.Lupien
Component: MiscellaneousAssignee: Assigned to nobody <unassigned-bugs>
Status: CLOSED FIXED    
Severity: normal CC: ahmedsayeed1982, djm, dtucker, vinschen
Priority: P5    
Version: 7.7p1   
Hardware: amd64   
OS: Cygwin on NT/2k/Win7-11   
Bug Depends on:    
Bug Blocks: 2893    
Attachments:
Description Flags
patch to fix the hardcoded sshd service name
none
follow up fix none

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]