X-Recipient: archive-cygwin AT delorie DOT com DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:message-id:from:to:subject:references :in-reply-to:content-type; q=dns; s=default; b=HuZhJfiGOnEke5Cys wVwJxmc1DU6xNfb7TcJtVBo0iB1H/C735FIXFTyqXQLv1ka/QqeRvJhZaX2B5gHc 8so/geyvXGZ8ljlZXYsc1x5QdiGk7+KT5Cabjcer6sFoKVPTD6V2zDjCWc6VcYsB HxjI52mQUmChW9UgjL/FM25wx0= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:message-id:from:to:subject:references :in-reply-to:content-type; s=default; bh=HJ7I6IcShcU7mjwlqG84qDV 2M7g=; b=TRlBc+pTdI4EjJv5ZcZdMKq8RfeReLZc1ToD2bTJT5NG9aR24ot6INk MesAuG4rIyU5YhEwFDhKCDZHBVR7E+yTeNq2pwVU6vBzqsc7v5o3GNbHQ98FEef+ GkTfpOc9PSLMkLTPIptubctzG6f+kBfPCBrfZ06oU9GPgYIIaqAw= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com 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 Date: Wed, 07 Jun 2017 13:57:58 +0200 Message-ID: From: Houder To: cygwin AT cygwin DOT com Subject: Re: Installing sshd on W7 reveals errors in CSIH_SCRIPT -- patch file against master References: <20170607091501 DOT GB5971 AT calimero DOT vinschen DOT de> In-Reply-to: <20170607091501.GB5971@calimero.vinschen.de> Content-Type: text/plain; charset=UTF-8; format=fixed User-Agent: mua.awk 0.99 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