Overwrite the local datastore with the normalized option, even if it

came from a global datastore due to a fall-through
unstable
HD Moore 2012-03-07 07:37:02 -06:00 committed by Jonathan Cran
parent 36240b6fe4
commit f0685e4a1f
1 changed files with 8 additions and 1 deletions

View File

@ -658,7 +658,14 @@ class OptionContainer < Hash
errors << name
# If the option is valid, normalize its format to the correct type.
elsif ((val = option.normalize(datastore[name])) != nil)
datastore.update_value(name, val)
# This *will* result in a module that previously used the
# global datastore to have its local datastore set, which
# means that changing the global datastore and re-running
# the same module will now use the newly-normalized local
# datastore value instead. This is mostly mitigated by
# forcing a clone through mod.replicant, but can break
# things in corner cases.
datastore[name] = val
end
}