From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 51230 invoked by alias); 7 Jun 2017 11:58:00 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 51212 invoked by uid 89); 7 Jun 2017 11:57:59 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-23.3 required=5.0 tests=AWL,BAYES_20,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=Water, van, jh, JH X-HELO: lb1-smtp-cloud2.xs4all.net Received: from lb1-smtp-cloud2.xs4all.net (HELO lb1-smtp-cloud2.xs4all.net) (194.109.24.21) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 07 Jun 2017 11:57:56 +0000 Received: from tmp.nDxDWTN6aq ([83.162.234.136]) by smtp-cloud2.xs4all.net with ESMTP id Vnxw1v00U2xEdKF01nxxq1; Wed, 07 Jun 2017 13:57:58 +0200 Date: Wed, 07 Jun 2017 11:58:00 -0000 Message-ID: From: Houder To: cygwin@cygwin.com Subject: Re: Installing sshd on W7 reveals errors in CSIH_SCRIPT -- patch file against master References: <20170607091501.GB5971@calimero.vinschen.de> In-Reply-to: <20170607091501.GB5971@calimero.vinschen.de> Content-Type: text/plain; charset=UTF-8; format=fixed User-Agent: mua.awk 0.99 X-SW-Source: 2017-06/txt/msg00037.txt.bz2 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" 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" 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