public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Houder <houder@xs4all.nl>
To: cygwin@cygwin.com
Subject: Re: Installing sshd on W7 reveals errors in CSIH_SCRIPT -- patch file against master
Date: Sat, 27 May 2017 15:55:00 -0000	[thread overview]
Message-ID: <a2907cfe582879ff35f5357cf937c279@xs4all.nl> (raw)
In-Reply-To: <c50589c74b974315dd7756109e270c74@xs4all.nl>

[-- Attachment #1: Type: text/plain, Size: 356 bytes --]

On 2017-05-26 21:35, Houder wrote:
> Hi,
> 
> Installing sshd on W7 reveals errors in CSIH_SCRIPT ...
> 
> CSIH_SCRIPT = /usr/share/csih/cygwin-service-installation-helper.sh

Retrieved CSIH_SCRIPT from the master (January 19 2017) here:

     https://cygwin.com/git/?p=cygwin-apps/csih.git;a=summary

Attached patch file against master ...

Regards,
Henri

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: csih.patch --]
[-- Type: text/x-diff; name=csih.patch, Size: 1477 bytes --]

diff --git a/master/cygwin-service-installation-helper.sh b/henri/cygwin-service-installation-helper.sh
index a0b6216..14a40c1 100644
--- a/master/cygwin-service-installation-helper.sh
+++ b/henri/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()
 {
@@ -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)

[-- Attachment #3: Type: text/plain, Size: 219 bytes --]


--
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

  parent reply	other threads:[~2017-05-27 12:01 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-26 19:38 Installing sshd on W7 reveals errors in CSIH_SCRIPT Houder
2017-05-27 11:35 ` Houder
2017-05-27 15:55 ` Houder [this message]
2017-05-28 13:46   ` Installing sshd on W7 reveals errors in CSIH_SCRIPT -- patch file against master Houder
2017-06-07  9:15   ` Corinna Vinschen
2017-06-07 11:58     ` Houder
2017-06-07 14:35       ` Corinna Vinschen
2017-06-07 18:17         ` Houder
2017-06-07 18:56           ` Corinna Vinschen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a2907cfe582879ff35f5357cf937c279@xs4all.nl \
    --to=houder@xs4all.nl \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).