Home | Info | Community | Development | myReactOS | Contact Us
[static]
Definition at line 87 of file secmgr.c.
Referenced by InternetHostSecurityManager_QueryCustomPolicy().
{ DWORD policy, enabled_opts, supported_opts; IObjectSafety *obj_safety; HRESULT hres; TRACE("%s %p %s\n", debugstr_w(url), cs->pUnk, debugstr_guid(&cs->clsid)); /* FIXME: Check URLACTION_ACTIVEX_OVERRIDE_SCRIPT_SAFETY */ hres = IInternetSecurityManager_ProcessUrlAction(This->secmgr, url, URLACTION_SCRIPT_SAFE_ACTIVEX, (BYTE*)&policy, sizeof(policy), NULL, 0, 0, 0); if(FAILED(hres) || policy != URLPOLICY_ALLOW) { *ret = URLPOLICY_DISALLOW; return S_OK; } hres = IUnknown_QueryInterface(cs->pUnk, &IID_IObjectSafety, (void**)&obj_safety); if(FAILED(hres)) { CATID scripting_catid = CATID_SafeForScripting; if(!This->catmgr) { hres = CoCreateInstance(&CLSID_StdComponentCategoriesMgr, NULL, CLSCTX_INPROC_SERVER, &IID_ICatInformation, (void**)&This->catmgr); if(FAILED(hres)) return hres; } hres = ICatInformation_IsClassOfCategories(This->catmgr, &cs->clsid, 1, &scripting_catid, 0, NULL); if(FAILED(hres)) return hres; *ret = hres == S_OK ? URLPOLICY_ALLOW : URLPOLICY_DISALLOW; return S_OK; } hres = IObjectSafety_GetInterfaceSafetyOptions(obj_safety, &IID_IDispatchEx, &supported_opts, &enabled_opts); if(FAILED(hres)) supported_opts = 0; enabled_opts = INTERFACESAFE_FOR_UNTRUSTED_CALLER; if(supported_opts & INTERFACE_USES_SECURITY_MANAGER) enabled_opts |= INTERFACE_USES_SECURITY_MANAGER; hres = IObjectSafety_SetInterfaceSafetyOptions(obj_safety, &IID_IDispatchEx, enabled_opts, enabled_opts); if(FAILED(hres)) { enabled_opts &= ~INTERFACE_USES_SECURITY_MANAGER; hres = IObjectSafety_SetInterfaceSafetyOptions(obj_safety, &IID_IDispatch, enabled_opts, enabled_opts); } IObjectSafety_Release(obj_safety); *ret = SUCCEEDED(hres) ? URLPOLICY_ALLOW : URLPOLICY_DISALLOW; return S_OK; }