public inbox for cygwin-apps-cvs@sourceware.org
help / color / mirror / Atom feed
From: corinna@sourceware.org
To: cygwin-apps-cvs@sourceware.org
Subject: [csih - Cygwin service installation helper, a helper script and tools to create service installation scripts] branch master, updated. v0_9_9-4-gc3aa664
Date: Wed, 07 Jun 2017 14:34:00 -0000	[thread overview]
Message-ID: <20170607143432.64080.qmail@sourceware.org> (raw)




https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/csih.git;h=c3aa664a4e79f35442ce264590833ca9242077e5

commit c3aa664a4e79f35442ce264590833ca9242077e5
Author: J.H. van de Water <houder@xs4all.nl>
Date:   Wed Jun 7 13:36:27 2017 +0200

    Move call of mkpasswd UPwards in csih_create_privileged_user
    
    Move call of mkpasswd UPwards in csih_create_privileged_user, and place it
    before the 1st call of passwd.

https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/csih.git;h=f2b4d281f566eb47b3d1aa8b09c268aabd257fce

commit f2b4d281f566eb47b3d1aa8b09c268aabd257fce
Author: J.H. van de Water <houder@xs4all.nl>
Date:   Wed Jun 7 13:28:21 2017 +0200

    Amend prologue of csih_use_file_etc
    
    Prologue (bottom) of csih_use_file_etc should state:
    
        Returns 1 if files shall be used, 0 otherwise.
    
    Currently it states the reverse.


Diff:
---
 cygwin-service-installation-helper.sh |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/cygwin-service-installation-helper.sh b/cygwin-service-installation-helper.sh
index a0b6216..14a40c1 100755
--- a/cygwin-service-installation-helper.sh
+++ b/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)


                 reply	other threads:[~2017-06-07 14: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=20170607143432.64080.qmail@sourceware.org \
    --to=corinna@sourceware.org \
    --cc=cygwin-apps-cvs@sourceware.org \
    /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).