This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: Installing sshd on W7 reveals errors in CSIH_SCRIPT -- patch file against master
- From: Houder <houder at xs4all dot nl>
- To: cygwin at cygwin dot com
- Date: Sat, 27 May 2017 14:01:09 +0200
- Subject: Re: Installing sshd on W7 reveals errors in CSIH_SCRIPT -- patch file against master
- Authentication-results: sourceware.org; auth=none
- References: <c50589c74b974315dd7756109e270c74@xs4all.nl>
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
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)
--
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