[25637] in Source-Commits

home help back first fref pref prev next nref lref last post

Re: /svn/athena r25134 - in trunk/debathena/debathena/firefox-wrapper:

daemon@ATHENA.MIT.EDU (Liz A. Denys)
Wed Jun 15 14:49:37 2011

Date: Wed, 15 Jun 2011 14:49:16 -0400 (EDT)
From: "Liz A. Denys" <lizdenys@MIT.EDU>
To: Jonathan D Reed <jdreed@mit.edu>
cc: source-commits@mit.edu
In-Reply-To: <201106141702.p5EH2E04008402@drugstore.mit.edu>
Message-ID: <alpine.DEB.2.00.1106151449130.18895@taboo>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed

ACK

-- 
Liz A. Denys
lizdenys@mit.edu

On Tue, 14 Jun 2011, Jonathan D Reed wrote:

> Date: Tue, 14 Jun 2011 13:02:14 -0400
> From: Jonathan D Reed <jdreed@MIT.EDU>
> To: source-commits@mit.edu
> Subject: /svn/athena r25134 - in trunk/debathena/debathena/firefox-wrapper: .
>     debian
> 
> Author: jdreed
> Date: 2011-06-14 13:02:14 -0400 (Tue, 14 Jun 2011)
> New Revision: 25134
>
> Modified:
>   trunk/debathena/debathena/firefox-wrapper/debian/changelog
>   trunk/debathena/debathena/firefox-wrapper/debian/control.in
>   trunk/debathena/debathena/firefox-wrapper/firefox.sh
> Log:
> In firefox-wrapper:
>  * Use modutil to detect when a user has borked their security database
>    (Trac: #698)
>  * Add dependency on libnss3-tools for the above change
>
>
> Modified: trunk/debathena/debathena/firefox-wrapper/debian/changelog
> ===================================================================
> --- trunk/debathena/debathena/firefox-wrapper/debian/changelog	2011-06-14 13:38:28 UTC (rev 25133)
> +++ trunk/debathena/debathena/firefox-wrapper/debian/changelog	2011-06-14 17:02:14 UTC (rev 25134)
> @@ -1,3 +1,11 @@
> +debathena-firefox-wrapper (10.0.9) unstable; urgency=low
> +
> +  * Use modutil to detect when a user has borked their security database
> +    (Trac: #698)
> +  * Add dependency on libnss3-tools for the above change
> +
> + -- Jonathan Reed <jdreed@mit.edu>  Tue, 14 Jun 2011 13:00:17 -0400
> +
> debathena-firefox-wrapper (10.0.8) unstable; urgency=low
>
>   * Rename the "default" variable used in the wrapper's awk
>
> Modified: trunk/debathena/debathena/firefox-wrapper/debian/control.in
> ===================================================================
> --- trunk/debathena/debathena/firefox-wrapper/debian/control.in	2011-06-14 13:38:28 UTC (rev 25133)
> +++ trunk/debathena/debathena/firefox-wrapper/debian/control.in	2011-06-14 17:02:14 UTC (rev 25134)
> @@ -7,7 +7,7 @@
>
> Package: debathena-firefox-wrapper
> Architecture: any
> -Depends: ${shlibs:Depends}, ${misc:Depends}, iceweasel | firefox, zenity, bind9-host
> +Depends: ${shlibs:Depends}, ${misc:Depends}, iceweasel | firefox, zenity, bind9-host, libnss3-tools
> Description: Wrapper to configure Mozilla Firefox for Debathena
>  This package provides a wrapper for the stock Mozilla Firefox web
>  browser.  It handles disposing of stale profile locks, as well as
>
> Modified: trunk/debathena/debathena/firefox-wrapper/firefox.sh
> ===================================================================
> --- trunk/debathena/debathena/firefox-wrapper/firefox.sh	2011-06-14 13:38:28 UTC (rev 25133)
> +++ trunk/debathena/debathena/firefox-wrapper/firefox.sh	2011-06-14 17:02:14 UTC (rev 25134)
> @@ -183,6 +183,50 @@
>   esac
> }
>
> +# Deal with a corrupted security database
> +fix_profile () {
> +  dialog_ok_text="
> +  Your Firefox profile was corrupted and has been repaired.
> +  You will need to obtain new MIT Personal Certificates.
> +
> +  To avoid this problem in the future, please be sure to
> +  completely quit Firefox (File->Quit or Ctrl-Q) before
> +  logging out of an Athena workstation.
> +
> +  To continue using Firefox, click \"OK\".
> +"
> +  dialog_err_text="
> +  Your Firefox profile is corrupted and cannot be repaired.
> +  Please try running the following command in the Terminal:
> +
> +         mv ~/.mozilla ~/.mozilla-old
> +
> +  Then re-launch Firefox.
> +
> +  Be sure to completely quit Firefox before
> +  logging out of Athena.
> +"
> +  dbdir="$1"
> +  files="cert8.db key3.db secmod.db"
> +  found=0
> +  for f in $files; do
> +    f="$dbdir/$f"
> +    if [ -f "$f" ]; then
> +	found=1
> +    fi
> +    rm -f $f
> +  done
> +  if ! modutil -create -force -dbdir "$dbdir"; then
> +    zenity --error --title "Firefox profile corrupted" --text "$dialog_err_text"
> +    exit 1
> +  else
> +    if [ $found -eq 1 ]; then
> +      zenity --info --title "Firefox profile repaired" --text "$dialog_ok_text"
> +    fi
> +  fi
> +}
> +
> +
> # Give a warning if we're running on a dialup machine.
> if [ -x /etc/athena/dialuptype ]; then
>   cat << \EOF
> @@ -266,6 +310,10 @@
>       # the aforementioned openafs bug.
>       rm -f "$profdir/.parentlock"
>     fi
> +    # Now check for corrupted profiles
> +    if hash modutil > /dev/null 2>&1 && ! modutil -list -dbdir $profdir > /dev/null 2>&1; then
> +	fix_profile "$profdir"
> +    fi
>   fi
> fi
>
>
>

home help back first fref pref prev next nref lref last post