summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorDerek Jennings <djennings@mageia.org>2013-07-02 15:37:34 +0000
committerColin Guthrie <colin@mageia.org>2013-08-24 18:29:42 +0100
commit9398dbc1ddc79ca4ef46e327e6a2c7eec621fe5f (patch)
treea2c48e5b0e357a5739d4e71cef9edef0077c2250 /bin
parent7f742ed445eb8dd9da4a02ea281feb246d946210 (diff)
downloaddrakguard-9398dbc1ddc79ca4ef46e327e6a2c7eec621fe5f.tar
drakguard-9398dbc1ddc79ca4ef46e327e6a2c7eec621fe5f.tar.gz
drakguard-9398dbc1ddc79ca4ef46e327e6a2c7eec621fe5f.tar.bz2
drakguard-9398dbc1ddc79ca4ef46e327e6a2c7eec621fe5f.tar.xz
drakguard-9398dbc1ddc79ca4ef46e327e6a2c7eec621fe5f.zip
allow urpmi to work when parental controls enabled (mga#7775)
Diffstat (limited to 'bin')
-rwxr-xr-xbin/drakguard5
1 files changed, 3 insertions, 2 deletions
diff --git a/bin/drakguard b/bin/drakguard
index bb6cc75..5be4409 100755
--- a/bin/drakguard
+++ b/bin/drakguard
@@ -69,6 +69,7 @@ my $proxy_port = 3128;
my $proxy_user = 'squid';
my $guardian_port = 8080;
my $guardian_user = 'dansguardian';
+my $root_user = 'root';
load();
@@ -91,7 +92,7 @@ my $users_program_list;
my $users_list = Gtk2::SimpleList->new(N("Allowed users") => 'text');
$users_list->get_selection->set_mode('multiple');
-@{$users_list->{data}} = difference2($shorewall->{accept_local_users}{http}, [ $proxy_user ]);
+@{$users_list->{data}} = difference2($shorewall->{accept_local_users}{http}, [ $root_user, $proxy_user ]);
my @url_lists = (
{
@@ -466,7 +467,7 @@ sub save() {
if ($shorewall) {
$shorewall->{disabled} = 0 if $enable;
- @{$shorewall->{accept_local_users}{http}} = if_($enable, uniq($proxy_user, list_get_entries($users_list)));
+ @{$shorewall->{accept_local_users}{http}} = if_($enable, uniq($proxy_user, $root_user, list_get_entries($users_list)));
@{$shorewall->{accept_local_users}{$proxy_port}} = if_($enable, $guardian_user);
network::shorewall::set_redirected_ports($shorewall, 'tcp', $guardian_port, if_($enable, 'http', $proxy_port));
network::shorewall::write($shorewall, $in);