Skip to Content.
Sympa Menu

sm-commit - Re: [SM-Commit] GIT changes to master grimoire by Thomas Orgis (dfe672243730504388dc46fc56b9e9beafd3817b)

sm-commit AT lists.ibiblio.org

Subject: Source Mage code commit list

List archive

Chronological Thread  
  • From: Jeremy Blosser <jblosser-smgl AT firinn.org>
  • To: sm-commit AT lists.ibiblio.org
  • Subject: Re: [SM-Commit] GIT changes to master grimoire by Thomas Orgis (dfe672243730504388dc46fc56b9e9beafd3817b)
  • Date: Tue, 6 Feb 2007 14:28:17 -0600

On Feb 06, Thomas Orgis [scm AT mail.sourcemage.org] wrote:
> commit fe545c4b24abdeb7177efbab4a650469f4d6a284
> Author: Thomas Orgis <sobukus AT sourcemage.org>
> Commit: Thomas Orgis <sobukus AT sourcemage.org>
>
> shadow: fixing the unpleasant result of saying n to the account files
> conversion but still having pwunconv in PRE_REMOVE
>

What about this instead. It's very similar to yours but lets us remove
this after an acceptable time. Also it still defaults the query to 'n'
since if they said 'n' before they may well have meant it. And it won't
ask them twice, and it won't switch their answer for the future. I just
want to be very careful not to create anything else we find we have to undo
later.

I haven't tested this anywhere yet... if we think this is worth changing
I'll do that then revert the other and apply this version. (Including your
other changes to the other files as well, of course.)

diff --git a/security/shadow/CONFIGURE b/security/shadow/CONFIGURE
index 6c97b30..c06410e 100755
--- a/security/shadow/CONFIGURE
+++ b/security/shadow/CONFIGURE
@@ -1,5 +1,14 @@
-config_query SHADOW_CONV "Attempt to convert/fix accounts (with installed
shadow utils)" n &&
-if [[ "$SHADOW_CONV" == y ]]; then
+if [[ "$SHADOW_CONV" == n ]] && [[ -z "$SHADOW_RECONV" ]]; then
+ message "Checking passwd for shadowness (there could have been an unwanted
run of pwunconv/grpunconv, see bug #8834)." &&
+ if ! grep -q '^root:x:' "$INSTALL_ROOT/etc/passwd"; then
+ message "${PROBLEM_COLOR}Your passwd file contains password hashes,
resuggesting conversion to shadow." &&
+ message "${MESSAGE_COLOR}You can still say n to the upcoming query but
make sure to run pwconv / grpconv yourself if you want existing passwords
shadowed." &&
+ query SHADOW_RECONV "Attempt to convert/fix accounts (with installed
shadow utils)" n &&
+ fi
+else
+ config_query SHADOW_CONV "Attempt to convert/fix accounts (with installed
shadow utils)" n
+fi &&
+if [[ "$SHADOW_CONV" == y ]] || [[ "$SHADOW_RECONV" == y ]]; then
message "OK, checking your user and group accounts" &&
grpck -r "$INSTALL_ROOT/etc/group" "$INSTALL_ROOT/etc/gshadow" ||
{
diff --git a/security/shadow/FINAL b/security/shadow/FINAL
index eca5bd2..5baa2d1 100755
--- a/security/shadow/FINAL
+++ b/security/shadow/FINAL
@@ -1,6 +1,8 @@
-if [ "$SHADOW_CONV" == y ]; then
+if [ "$SHADOW_CONV" == y ] || [ "$SHADOW_RECONV" == "y" ]; then
#Create or update necessary files for shadow
message "running pwconv and grpconv" &&
${INSTALL_ROOT}/usr/sbin/pwconv &&
${INSTALL_ROOT}/usr/sbin/grpconv
-fi
+fi &&
+
+SHADOW_RECONV=x

Attachment: pgpNKckVT7dcw.pgp
Description: PGP signature




Archive powered by MHonArc 2.6.24.

Top of Page