aboutsummaryrefslogtreecommitdiffstats
path: root/lib/snmp/src/agent/snmpa_vacm.erl
diff options
context:
space:
mode:
authorMicael Karlberg <[email protected]>2011-02-25 13:54:07 +0100
committerMicael Karlberg <[email protected]>2011-02-25 13:54:07 +0100
commit931e775de52e6e335a10759c7fb3e0f8efea21d3 (patch)
tree79afd23e811719acaaf527707f9edf9a585de88d /lib/snmp/src/agent/snmpa_vacm.erl
parent02b9003b697474ef6b7e07a6f7eebd6105d4497f (diff)
parentca6e87e84dae13b6ebe15ca67bf98a0245f25857 (diff)
downloadotp-931e775de52e6e335a10759c7fb3e0f8efea21d3.tar.gz
otp-931e775de52e6e335a10759c7fb3e0f8efea21d3.tar.bz2
otp-931e775de52e6e335a10759c7fb3e0f8efea21d3.zip
[agent] When calling
snmp_view_based_acm_mib:snmp_view_based_acm_mib:reconfigure/1 on a running node, the table vacmAccessTable was not properly cleaned. This meant that if some entries in the vacm.conf file was removed (compared to the "current" config), while others where modified and/or added, the removed entrie(s) would still exist in the vacmAccessTable table. Merge branch 'bmk/snmp/vacmAccessTable_cleanup/OTP-8981' into bmk/snmp/snmp419_integration/OTP-9068 Conflicts: lib/snmp/doc/src/notes.xml lib/snmp/src/app/snmp.appup.src lib/snmp/vsn.mk
Diffstat (limited to 'lib/snmp/src/agent/snmpa_vacm.erl')
-rw-r--r--lib/snmp/src/agent/snmpa_vacm.erl9
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/snmp/src/agent/snmpa_vacm.erl b/lib/snmp/src/agent/snmpa_vacm.erl
index 2eacea4301..892dc265f1 100644
--- a/lib/snmp/src/agent/snmpa_vacm.erl
+++ b/lib/snmp/src/agent/snmpa_vacm.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1999-2009. All Rights Reserved.
+%% Copyright Ericsson AB 1999-2010. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -21,7 +21,7 @@
-export([get_mib_view/5]).
-export([init/1, init/2, backup/1]).
-export([delete/1, get_row/1, get_next_row/1, insert/1, insert/2,
- dump_table/0]).
+ cleanup/0, dump_table/0]).
-include("SNMPv2-TC.hrl").
-include("SNMP-VIEW-BASED-ACM-MIB.hrl").
@@ -256,6 +256,11 @@ delete(Key) ->
ets:delete(snmpa_vacm, Key),
dump_table().
+
+cleanup() ->
+ ets:delete_all_objects(snmpa_vacm),
+ dump_table().
+
dump_table(true) ->
dump_table();
dump_table(_) ->