2000-08-12
2000-08-12 21:47:26 by Martin Stjernholm <mast@lysator.liu.se>
-
ab7c31cd28648867bd7aa651e9b94758c77a34b3
(14 lines)
(+9/-5)
[
Show
| Annotate
]
Branch: 5.2
More robustness in check_security for functions that come from
destructed objects. Delay module destruction in reload_module a little
to avoid annoying backtraces when reloading modules in the admin
interface from the admin interface.
Rev: server/base_server/configuration.pike:1.333
1:
// A vitual server's main configuration
// Copyright © 1996 - 2000, Roxen IS.
- constant cvs_version = "$Id: configuration.pike,v 1.332 2000/08/11 19:30:26 lange Exp $";
+ constant cvs_version = "$Id: configuration.pike,v 1.333 2000/08/12 21:47:26 mast Exp $";
constant is_configuration = 1;
#include <module.h>
#include <module_constants.h>
844: Inside #if defined(MODULE_LEVEL_SECURITY)
// It's probably an RXML.Tag object, and in that case we
// assume that the parent object is the module. FIXME: That's
// not necessarily true.
- mod = function_object (object_program (a));
+ catch (mod = function_object (object_program (a)));
else
- mod = function_object (a);
- if(mod->query_seclevels)
+ catch (mod = function_object (a));
+ if(mod && mod->query_seclevels)
misc_cache[ a ] = seclevels = ({
mod->query_seclevels(),
mod->query("_seclvl"),
2251:
catch( mi->update_with( nm,0 ) ); // This is sort of nessesary...
nm->report_notice(LOC_C(11, "Reloaded %s.\n"), mi->get_name());
- destruct( old_module );
+ // It's possible e.g. in the config interface that the module
+ // being reloaded is in use for the current request, so delay it a
+ // little.
+ call_out (destruct, 2, old_module);
}
call_start_callbacks( nm, mi, modules[ (modname/"#")[0] ] );