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

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

Hi,

For those of you who like to look at a patch file, the patch
file should have been attached to this post.

Henri

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

--- orig/cygwin-service-installation-helper.sh       2015-10-28 10:23:49.000000000 +0100
+++ new/cygwin-service-installation-helper.sh   2017-05-26 21:43:04.308202700 +0200
@@ -2566,7 +2566,7 @@
 #
 #     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_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 @@
         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 "${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

                 reply	other threads:[~2017-05-26 20:34 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=c01f0b7cf49d8c1c343fd4d6536cdb24@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).