From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 64131 invoked by alias); 7 Jun 2017 14:34:33 -0000 Mailing-List: contact cygwin-apps-cvs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: cygwin-apps-cvs-owner@sourceware.org Received: (qmail 64109 invoked by uid 9078); 7 Jun 2017 14:34:32 -0000 Date: Wed, 07 Jun 2017 14:34:00 -0000 Message-ID: <20170607143432.64080.qmail@sourceware.org> 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 X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Oldrev: 5e210bc57bd36a9c7b935ccf16707742584cb566 X-Git-Newrev: c3aa664a4e79f35442ce264590833ca9242077e5 X-SW-Source: 2017-q2/txt/msg00052.txt.bz2 https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/csih.git;h=c3aa664a4e79f35442ce264590833ca9242077e5 commit c3aa664a4e79f35442ce264590833ca9242077e5 Author: J.H. van de Water 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 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)