mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
First crack at automated browser configuration. Requires running a
script to set things up on the client machine.
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
SUBDIRS=ipa-install
|
SUBDIRS=ipa-install firefox
|
||||||
PYTHONDIR=$(DESTDIR)/usr/share/ipa/ipaclient
|
PYTHONDIR=$(DESTDIR)/usr/share/ipa/ipaclient
|
||||||
|
|
||||||
all:
|
all:
|
||||||
|
|||||||
12
ipa-client/firefox/Makefile
Normal file
12
ipa-client/firefox/Makefile
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
IPADIR=$(DESTDIR)/usr/share/ipa/ipaclient
|
||||||
|
|
||||||
|
all:
|
||||||
|
|
||||||
|
install:
|
||||||
|
-mkdir -p $(IPADIR)
|
||||||
|
install -m 644 ipa.js $(IPADIR)
|
||||||
|
install -m 644 ipa.cfg $(IPADIR)
|
||||||
|
|
||||||
|
clean:
|
||||||
|
|
||||||
|
test:
|
||||||
17
ipa-client/firefox/README
Normal file
17
ipa-client/firefox/README
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
Firefox automatic configuration.
|
||||||
|
|
||||||
|
ipa.cfg needs to be installed in the Firefox root directory
|
||||||
|
(/usr/lib/firefox-version). It can be a symlink somewhere else. We install
|
||||||
|
the actual file into /usr/share/ipa.
|
||||||
|
|
||||||
|
ipa.js contains the javascript that sets the desired configuration.
|
||||||
|
|
||||||
|
The Firefox all.js needs to be modified to set:
|
||||||
|
|
||||||
|
pref('general.config.obscure_value', 0);
|
||||||
|
pref('general.config.filename', 'ipa.cfg');
|
||||||
|
|
||||||
|
First need to remove any existing values for these.
|
||||||
|
|
||||||
|
For more information on autoconfiguration, see:
|
||||||
|
http://mit.edu/~firefox/www/maintainers/autoconfig.html
|
||||||
53
ipa-client/firefox/browsersetup.sh
Normal file
53
ipa-client/firefox/browsersetup.sh
Normal file
@@ -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
|
||||||
19
ipa-client/firefox/ipa.cfg
Normal file
19
ipa-client/firefox/ipa.cfg
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
#
|
||||||
|
/*
|
||||||
|
* 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.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
lockPref("autoadmin.global_config_url","file:///usr/share/ipa/ipa.js");
|
||||||
35
ipa-client/firefox/ipa.js
Normal file
35
ipa-client/firefox/ipa.js
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
/*
|
||||||
|
* 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.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
/* Kerberos SSO configuration */
|
||||||
|
lockPref("network.negotiate-auth.trusted-uris", ".greyoak.com");
|
||||||
|
lockPref("network.negotiate-auth.delegation-uris", ".greyoak.com");
|
||||||
|
|
||||||
|
/* These are the defaults */
|
||||||
|
lockPref("network.negotiate-auth.gsslib", "");
|
||||||
|
lockPref("network.negotiate-auth.using-native-gsslib", true);
|
||||||
|
lockPref("network.negotiate-auth.allow-proxies", true);
|
||||||
|
|
||||||
|
/* For Windows */
|
||||||
|
lockPref("network.auth.use-sspi", false);
|
||||||
|
}
|
||||||
|
catch(e)
|
||||||
|
{
|
||||||
|
displayError("Error in Autoconfig", e);
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user