| www.delorie.com/archives/browse.cgi | search |
| 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:to:from:subject:message-id:date:mime-version | |
| :content-type; q=dns; s=default; b=XIEG4y0qgmexyKMjdg5fUeo68qG5k | |
| zNPXf9odgu7j0bf8N/ckU1M3TAH82DvMRDDRtaPDKWsuPGaF9dpP9mVYnygvbwgt | |
| mj6GMpScxCQ3bye6erpirQwaRiC9gFS8bjXaxVyeBTGgPrm/qoNy1Sz8AkrMPKib | |
| S3FKw9KV9uadHU= | |
| 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:to:from:subject:message-id:date:mime-version | |
| :content-type; s=default; bh=gAhbrD7+UYLkJaQxOdQdSu5fuls=; b=H0G | |
| aTybl6t9+6Qsb2LBtF5eX0JPJDstlGmGoESqNSSgJgXVQ/ZS6PjJAhvS+8LYNqA5 | |
| YfJPJLRKK2hSqU49A1wt4daeSnPp4RBOD8i8PESYDu5OIxF0WYUQVKFTYdUM6Cvt | |
| AMrLl6jOVCR/cChuPvN2lbUkOJDgie7xiyqurKVA= | |
| Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
| List-Id: | <cygwin.cygwin.com> |
| List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
| List-Archive: | <http://sourceware.org/ml/cygwin/> |
| List-Post: | <mailto:cygwin AT cygwin DOT com> |
| List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
| 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=-0.5 required=5.0 tests=BAYES_05,RCVD_IN_DNSWL_LOW,SPF_SOFTFAIL autolearn=no version=3.3.2 spammy=2017-01-18, H*RU:sk:220-245, Hx-spam-relays-external:sk:220-245, H*r:sk:220-245 |
| X-HELO: | mail14.tpgi.com.au |
| X-TPG-Junk-Status: | Message not scanned |
| X-TPG-Abuse: | host=220-245-251-204.static.tpgi.com.au; ip=220.245.251.204; date=Wed, 18 Jan 2017 14:34:09 +1100 |
| To: | cygwin AT cygwin DOT com |
| From: | Shaddy Baddah <lithium-cygwin AT shaddybaddah DOT name> |
| Subject: | ssh-host-config: patch fix debug option + broken for me on Vista (non-domain) |
| Message-ID: | <84a7692e-041a-8b99-2ea9-fb1c784fc01c@shaddybaddah.name> |
| Date: | Wed, 18 Jan 2017 14:34:04 +1100 |
| User-Agent: | Mozilla/5.0 (X11; Linux i686; rv:45.0) Gecko/20100101 Icedove/45.6.0 |
| MIME-Version: | 1.0 |
| X-IsSubscribed: | yes |
--------------D85E7718207D69BE05ACFA9E
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
Hi,
First please find attached a simple patch that fixes a problem I
encountered running ssh-host-config with the --debug option.
Pretty simple. Without redirecting the output of csih_stacktrace() to
stderr, then (3.5.4) Command Substitution of functions that call it will
run into problems. And the one that I encountered was this one:
cygwin-service-installation-helper.sh:1147:csih_mktemp ()
cygwin-service-installation-helper.sh:1148:{
cygwin-service-installation-helper.sh:1149: csih_stacktrace "${@}"
cygwin-service-installation-helper.sh:1150: $_csih_trace
cygwin-service-installation-helper.sh:1152: local __umask=$(umask)
cygwin-service-installation-helper.sh:1153: local rval
cygwin-service-installation-helper.sh:1154: local tmpdir
cygwin-service-installation-helper.sh:1156:
tmpdir=$(csih_writable_tmpdir) || return 1
cygwin-service-installation-helper.sh:1158: umask 0077
cygwin-service-installation-helper.sh:1159: /usr/bin/mktemp
--tmpdir="${tmpdir}" "$@"
tmpdir will be filled with stacktrace output from the
csih_writable_tmpdir() call, and mktemp will fail.
Further, there is definitely a bug, at least for me, with running
ssh-host-config on Vista (32 bit, but that shouldn't matter) in a
non-domain environment.
The script obviously confuses the form of username construct to use at
various points. I encounter the following error:
*** Info: This script plans to use 'cyg_server'.
*** Info: 'cyg_server' will only be used by registered services.
no
*** Query: Create new privileged user account 'LIBRA-VW\cyg_server'
(Cygwin name: 'libra-vw+cyg_server')? (yes/no) yes
*** Info: Please enter a password for new user libra-vw+cyg_server.
Please be sure
*** Info: that this password matches the password rules given on your
system.
*** Info: Entering no password will exit the configuration.
*** Query: Please enter the password:
*** Query: Reenter:
*** Info: User 'libra-vw+cyg_server' has been created with password
'melum0m0'.
*** Info: If you change the password, please remember also to change the
*** Info: password for the installed services which use (or will soon use)
*** Info: the 'libra-vw+cyg_server' account.
passwd: unknown user libra-vw+cyg_server
*** Warning: Setting password expiry for user 'libra-vw+cyg_server' failed!
*** Warning: Please check that password never expires or set it to your
needs.
No user or group 'libra-vw+cyg_server' known.
*** Warning: Assigning the appropriate privileges to user
'libra-vw+cyg_server' failed!
*** ERROR: There was a serious problem creating a privileged user.
yes
*** Warning: Expected privileged user 'libra-vw+cyg_server' does not exist.
*** Warning: Defaulting to 'SYSTEM'
*** Info: The sshd service has been installed under the LocalSystem
*** Info: account (also known as SYSTEM). To start the service now, call
*** Info: `net start sshd' or `cygrunsrv -S sshd'. Otherwise, it
*** Info: will start automatically after the next reboot.
*** Warning: Host configuration exited with 1 errors or warnings!
*** Warning: Make sure that all problems reported are fixed,
*** Warning: then re-run ssh-host-config.
And I'm sure the problem is that this well-intended change to the script
fails on the assumption that LOGONSERVER is always populated. It isn't
for me on Vista.
cygwin-service-installation-helper.sh:2884: # This test succeeds on
domain member machines only, not on DCs.
cygwin-service-installation-helper.sh:2885: if [
"\\\\${COMPUTERNAME,,*}" != "${LOGONSERVER,,*}" \
cygwin-service-installation-helper.sh:2886: -a "${LOGONSERVER}"
!= "\\\\MicrosoftAccount" ]
cygwin-service-installation-helper.sh:2887: then
cygwin-service-installation-helper.sh:2888: # Lowercase of USERDOMAIN
cygwin-service-installation-helper.sh:2889:
csih_PRIVILEGED_USERNAME="${COMPUTERNAME,,*}+${username}"
cygwin-service-installation-helper.sh:2890: fi
cygwin-service-installation-helper.sh:2891: fi
I fixed this by modifying the test to check LOGONSERVER is not empty:
if [ -n "${LOGONSERVER}" -a "\\\\...
Can this be fixed in the next release?
--
Regards,
Shaddy
--------------D85E7718207D69BE05ACFA9E
Content-Type: text/x-patch;
name="fix-ssh-host-config-debug.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename="fix-ssh-host-config-debug.diff"
--- cygwin-service-installation-helper.sh.orig 2015-10-28 20:23:49.000000000 +1100
+++ cygwin-service-installation-helper.sh 2017-01-18 14:04:40.856126700 +1100
@@ -384,7 +384,7 @@
fi
n=$(($n-1))
done
- echo -e "${_csih_STACKTRACE_STR} ${val} ${@}"
+ echo -e "${_csih_STACKTRACE_STR} ${val} ${@}" 1>&2
fi
} # === End of csih_stacktrace() === #
readonly -f csih_stacktrace
--------------D85E7718207D69BE05ACFA9E
Content-Type: text/plain; charset=us-ascii
--
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
--------------D85E7718207D69BE05ACFA9E--
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |