Babelo,
Sorry here a patch that would work against 4.0.6-2
James
===============
diff --git a/lib/pf/authentication.pm b/lib/pf/authentication.pm
index e96441f..895e2fc 100644
--- a/lib/pf/authentication.pm
+++ b/lib/pf/authentication.pm
@@ -207,15 +207,14 @@ sub readAuthenticationConfigFile {
push(@authentication_sources, $current_source);
$authentication_lookup{$source_id} = $current_source;
}
- $config->cache->set("authentication_lookup",\%authentication_lookup);
$config->cache->set("authentication_sources",\@authentication_sources);
update_profiles_guest_modes($cached_profiles_config,"update_profiles_guest_modes");
}],
-oncachereload => [
on_cache_authentication_reload => sub {
my ($config, $name) = @_;
- %authentication_lookup =
%{$config->fromCacheUntainted("authentication_lookup")};
@authentication_sources =
@{$config->fromCacheUntainted("authentication_sources")};
+ %authentication_lookup = map { $_->id => $_ }
@authentication_sources;
},
]
);
===============
James Rouzier
[email protected] :: +1.514.755.3630 :: http://www.inverse.ca
Inverse inc. :: Leaders behind SOGo (http://www.sogo.nu) and PacketFence
(http://www.packetfence.org)
On 2013-10-03 6:01 PM, Babelo Gmvsdm wrote:
Just to be sure, to apply the patch I do:
patch -b /usr/local/pf/lib/authentication.pm -i
/home/PFAdmin/Documents/f0660655caeb7205555bc22c9dd88b8aadbc8910.diff
Because this way i have this error:
Hunk #1 FAILED at 210.
1 out of 1 hunk FAILED -- saving rejects to file authentication.pm.rej
This what I have in /usr/local/pf/lib/authentication.pm.rej:
--- authentication.pm
+++ authentication.pm
@@ -210,17 +210,15 @@
push(@authentication_sources, $current_source);
$authentication_lookup{$source_id} = $current_source;
}
-
$config->cache->set("authentication_lookup",\%authentication_lookup);
$config->cache->set("authentication_sources",\@authentication_sources);
}],
-oncachereload => [
on_cache_authentication_reload => sub {
my ($config, $name) = @_;
- my $authentication_lookup_ref =
$config->fromCacheUntainted("authentication_lookup");
my $authentication_sources_ref =
$config->fromCacheUntainted("authentication_sources");
- if( all_defined($authentication_sources_ref,
$authentication_lookup_ref)) {
- %authentication_lookup = %$authentication_lookup_ref;
+ if( defined($authentication_sources_ref) ) {
@authentication_sources =
@$authentication_sources_ref;
+ %authentication_lookup = map { $_->id => $_ }
@authentication_sources;
} else {
$config->doCallbacks(1,0);
}
Thx by advance
------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60134791&iu=/4140/ostg.clktrk
_______________________________________________
PacketFence-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/packetfence-users
diff --git a/lib/pf/authentication.pm b/lib/pf/authentication.pm
index e96441f..895e2fc 100644
--- a/lib/pf/authentication.pm
+++ b/lib/pf/authentication.pm
@@ -207,15 +207,14 @@ sub readAuthenticationConfigFile {
push(@authentication_sources, $current_source);
$authentication_lookup{$source_id} = $current_source;
}
-
$config->cache->set("authentication_lookup",\%authentication_lookup);
$config->cache->set("authentication_sources",\@authentication_sources);
update_profiles_guest_modes($cached_profiles_config,"update_profiles_guest_modes");
}],
-oncachereload => [
on_cache_authentication_reload => sub {
my ($config, $name) = @_;
- %authentication_lookup =
%{$config->fromCacheUntainted("authentication_lookup")};
@authentication_sources =
@{$config->fromCacheUntainted("authentication_sources")};
+ %authentication_lookup = map { $_->id => $_ }
@authentication_sources;
},
]
);
------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60134791&iu=/4140/ostg.clktrk
_______________________________________________
PacketFence-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/packetfence-users