This is the mail archive of the cygwin-apps-cvs mailing list for the cygwin-apps project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[csih - Cygwin service installation helper, a helper script and tools to create service installation scripts] branch master, updated. v0_9_11-1-g20c23cd;h=20c23cd8e0d3e7c10f59d42fa9650c94628aef99

commit 20c23cd8e0d3e7c10f59d42fa9650c94628aef99
Author: Takashi Yano <>
Date:   Sat Jun 16 19:13:52 2018 +0900

    Fix the test of whether the computer is on a domain.
    * (csih_select_rivileged_username):
      In the case logged in as a local user, csih failed to judge to be
      on a domain even if the computer is on a domain.  This is because
      ${LOGSERVER,,*} has the same value as \\\\${COMPUTERNAME,,*}. The
      fix is done to use cygwin username returned by mkpasswd command to
      check it instead. Also, testing has been changed so that USERDOMAIN
      is used instead of LOGONSERVER because LOGONSERVER may not be set
      if "Run as administrator" is used.
      See the post below for more detail.

--- |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/ b/
index abdb0ef..fbdff0d 100755
--- a/
+++ b/
@@ -2882,9 +2882,8 @@ csih_select_privileged_username()
     if ! csih_use_file_etc "passwd"
       # This test succeeds on domain member machines only, not on DCs.
-      if [ "\\\\${COMPUTERNAME,,*}" != "${LOGONSERVER,,*}" \
-	   -a "${LOGONSERVER}" != "" \
-	   -a "${LOGONSERVER}" != "\\\\MicrosoftAccount" ]
+      if [ "${USERDOMAIN,,*}" != "${COMPUTERNAME,,*}" \
+	   -o "$(/usr/bin/mkpasswd -c | /usr/bin/awk -F: '{print $1}')" = "${USERDOMAIN}+${USERNAME}" ]
 	# Lowercase of USERDOMAIN

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]