On Wed, 7 Jun 2017 11:15:01, Corinna Vinschen wrote: > --24zk1gE8NUlDmwG9 > Content-Type: text/plain; charset=utf-8 > Content-Disposition: inline > Content-Transfer-Encoding: quoted-printable > > Hi Houder, > > On May 27 14:01, Houder wrote: > > On 2017-05-26 21:35, Houder wrote: > > > Hi, > > >=20 > > > Installing sshd on W7 reveals errors in CSIH_SCRIPT ... > > >=20 > > > CSIH_SCRIPT =3D /usr/share/csih/cygwin-service-installation-helper.sh > >=20 > > Retrieved CSIH_SCRIPT from the master (January 19 2017) here: > >=20 > > https://cygwin.com/git/?p=3Dcygwin-apps/csih.git;a=3Dsummary > >=20 > > Attached patch file against master ... > > Can you please recreate the patch with `git format-patch' and attach > it to your reply? That would be most helpful.
Sigh! ... it has been years and YEARS! since I exercised git. So I attempted to do what you are asking for ... - cloned csih - branched - created TWO fixes in that branch - invoked 'git format-patch -n HEAD^^' # which is completely new to Two files were created ... I included them here. Sufficient? Regards, Henri ----- File 0001-Amend-prologue-of-csih_use_file_etc.patch: >From 2d96db1b32df33b142aa23afaa90ad21db74cc3d Mon Sep 17 00:00:00 2001 From: "J.H. van de Water" <hou...@xs4all.nl> Date: Wed, 7 Jun 2017 13:28:21 +0200 Subject: [PATCH 1/2] Amend prologue of csih_use_file_etc Prologue (bottom) of csih_use_file_etc should state: Returns 1 if files shall be used, 0 otherwise. Currently it states the reverse. --- cygwin-service-installation-helper.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cygwin-service-installation-helper.sh b/cygwin-service-installation-helper.sh index a0b6216..f291edc 100755 --- a/cygwin-service-installation-helper.sh +++ b/cygwin-service-installation-helper.sh @@ -2566,7 +2566,7 @@ readonly -f csih_old_cygwin # # Otherwise, we need the files. # -# Returns 0 if files shall be used, 1 otherwise. +# Returns 1 if files shall be used, 0 otherwise. # ====================================================================== csih_use_file_etc() { -- 2.7.5 ----- File 0002-Move-call-of-mkpasswd-UPwards-in-csih_create_privile.patch: >From d07d3a567f063d22c9eba381cbcc987b63a8eabb Mon Sep 17 00:00:00 2001 From: "J.H. van de Water" <hou...@xs4all.nl> Date: Wed, 7 Jun 2017 13:36:27 +0200 Subject: [PATCH 2/2] Move call of mkpasswd UPwards in csih_create_privileged_user Move call of mkpasswd UPwards in csih_create_privileged_user, and place it before the 1st call of passwd. --- cygwin-service-installation-helper.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/cygwin-service-installation-helper.sh b/cygwin-service-installation-helper.sh index f291edc..14a40c1 100755 --- a/cygwin-service-installation-helper.sh +++ b/cygwin-service-installation-helper.sh @@ -3003,6 +3003,12 @@ csih_create_privileged_user() csih_inform "the '${csih_PRIVILEGED_USERNAME}' account." echo "" + # If we use /etc account DB only, write new account to /etc/passwd + if csih_use_file_etc passwd + then + /usr/bin/mkpasswd -l -u "${csih_PRIVILEGED_USERNAME}" >> "${SYSCONFDIR}/passwd" + fi + if ! passwd -e "${csih_PRIVILEGED_USERNAME}" >/dev/null then csih_warning "Setting password expiry for user '${csih_PRIVILEGED_USERNAME}' failed!" @@ -3063,12 +3069,6 @@ csih_create_privileged_user() fi fi - # If we use /etc account DB only, write new account to /etc/passwd - if csih_use_file_etc passwd - then - /usr/bin/mkpasswd -l -u "${csih_PRIVILEGED_USERNAME}" >> "${SYSCONFDIR}/passwd" - fi - return "${ret}" fi # ! username_in_sam return 1 # failed to create user (or prevented by auto-answer veto) -- 2.7.5 ===== -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple