From a53c4f107fa4f91634f098f180f0258dfbd50495 Mon Sep 17 00:00:00 2001 From: "rcritten@redhat.com" Date: Mon, 24 Sep 2007 15:50:38 -0400 Subject: Add a per-user re-configuration script rename browsersetup.sh to globalsetup.sh --- ipa-client/firefox/README | 6 +++++ ipa-client/firefox/browsersetup.sh | 53 -------------------------------------- ipa-client/firefox/globalsetup.sh | 53 ++++++++++++++++++++++++++++++++++++++ ipa-client/firefox/ipa.js | 4 +-- 4 files changed, 61 insertions(+), 55 deletions(-) delete mode 100644 ipa-client/firefox/browsersetup.sh create mode 100644 ipa-client/firefox/globalsetup.sh diff --git a/ipa-client/firefox/README b/ipa-client/firefox/README index d12be6e5..67013fcc 100644 --- a/ipa-client/firefox/README +++ b/ipa-client/firefox/README @@ -15,3 +15,9 @@ First need to remove any existing values for these. For more information on autoconfiguration, see: http://mit.edu/~firefox/www/maintainers/autoconfig.html + +globalsetup.sh will change the default setup for all users and will +lock the preferences. The downside is that rpm -V will show firefox as +corrupt. + +usersetup.sh will change all existing profiles of the current user diff --git a/ipa-client/firefox/browsersetup.sh b/ipa-client/firefox/browsersetup.sh deleted file mode 100644 index dc8aba93..00000000 --- a/ipa-client/firefox/browsersetup.sh +++ /dev/null @@ -1,53 +0,0 @@ -#!/bin/sh - -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 2 -# of the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -ipacfg="ipa.cfg" - -for file in /usr/lib/firefox-* /usr/lib64/firefox* -do - # Find the configuration file we want to change - cfg=`find $file -name all.js` - - # determine the directory by removing all.js - dir=`echo $cfg | sed 's/greprefs\/all.js//'` - - # It is possible that there will be empty Firefox directories, so skip - # those. - if test "X"$cfg != "X"; then - - rm -f $cfg.new - - # If the configuration already exists, remove it - if grep general.config.filename $cfg > /dev/null 2>&1; then - grep -v general.config.filename $cfg > $cfg.new - mv $cfg.new $cfg - fi - - # We have the configuration unobscured - if grep general.config.filename $cfg > /dev/null 2>&1; then - grep -v general.config.obscure_value $cfg > $cfg.new - mv $cfg.new $cfg - fi - - # Now we can add the new stuff to the file - echo "pref('general.config.obscure_value', 0);" >> "$cfg" - echo "pref('general.config.filename', '$ipacfg');" >> "$cfg" - - # Create a link to our configuration file - rm -f $dir/$ipacfg - ln -s /usr/share/ipa/ipa.cfg $dir/$ipacfg - fi -done diff --git a/ipa-client/firefox/globalsetup.sh b/ipa-client/firefox/globalsetup.sh new file mode 100644 index 00000000..dc8aba93 --- /dev/null +++ b/ipa-client/firefox/globalsetup.sh @@ -0,0 +1,53 @@ +#!/bin/sh + +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +ipacfg="ipa.cfg" + +for file in /usr/lib/firefox-* /usr/lib64/firefox* +do + # Find the configuration file we want to change + cfg=`find $file -name all.js` + + # determine the directory by removing all.js + dir=`echo $cfg | sed 's/greprefs\/all.js//'` + + # It is possible that there will be empty Firefox directories, so skip + # those. + if test "X"$cfg != "X"; then + + rm -f $cfg.new + + # If the configuration already exists, remove it + if grep general.config.filename $cfg > /dev/null 2>&1; then + grep -v general.config.filename $cfg > $cfg.new + mv $cfg.new $cfg + fi + + # We have the configuration unobscured + if grep general.config.filename $cfg > /dev/null 2>&1; then + grep -v general.config.obscure_value $cfg > $cfg.new + mv $cfg.new $cfg + fi + + # Now we can add the new stuff to the file + echo "pref('general.config.obscure_value', 0);" >> "$cfg" + echo "pref('general.config.filename', '$ipacfg');" >> "$cfg" + + # Create a link to our configuration file + rm -f $dir/$ipacfg + ln -s /usr/share/ipa/ipa.cfg $dir/$ipacfg + fi +done diff --git a/ipa-client/firefox/ipa.js b/ipa-client/firefox/ipa.js index 011f8923..5d6755fd 100644 --- a/ipa-client/firefox/ipa.js +++ b/ipa-client/firefox/ipa.js @@ -18,8 +18,8 @@ try { /* Kerberos SSO configuration */ - lockPref("network.negotiate-auth.trusted-uris", ".greyoak.com"); - lockPref("network.negotiate-auth.delegation-uris", ".greyoak.com"); + lockPref("network.negotiate-auth.trusted-uris", ".freeipa.org"); + lockPref("network.negotiate-auth.delegation-uris", ".freeipa.org"); /* These are the defaults */ lockPref("network.negotiate-auth.gsslib", ""); -- cgit