Functions | |
| PyObject * | tuple_item (PyObject *args, Py_ssize_t index) |
| std::string | python_unicode (PyObject *object) |
| bool | python_text (PyObject *object, std::string &out) |
| std::string | python_path (PyObject *object) |
| std::string | python_str (PyObject *object) |
| void | collect_stdlib_dirs () |
| bool | is_stdlib_frame (PyObject *frame) |
| std::vector< PyObject * > | stack_frames () |
| void | take_returned_frames (std::vector< PyObject * > &held, std::vector< PyObject * > &dropped) |
| AuditEventCategory | open_category (PyObject *args) |
| std::vector< std::string > | audit_targets (const std::string &event_name, AuditEventCategory category, PyObject *args) |
| std::vector< std::string > * | permission_list_for (AuditEventCategory category, bool by_event, PluginPermissions &permissions) |
| std::string | event_grant_key (AuditEventCategory category, const std::string &event_name) |
| bool | tree_grant_root (const std::string &grant, boost::filesystem::path &root) |
| std::string | absolute_tree_grant (const std::string &grant) |
| bool | fs_grant_covers (const std::string &grant, const std::string &target) |
| bool | has_permission (AuditEventCategory category, bool by_event, const std::vector< std::string > &granted, const std::string &target) |
| bool | has_network_permission (const PluginPermissions &permissions, const std::string &target) |
| bool | has_any_network_permission (const PluginPermissions &permissions) |
| void | seed_install_metadata (const PluginDescriptor &descriptor, PluginInstallState &state) |
| bool | persist_permission (const std::string &plugin_key, PluginInstallState &state, AuditEventCategory category, bool by_event, std::vector< std::string > &permission_list, const std::string &target) |
| int | report_denied (PluginAuditManager &mgr, const std::string &event_name, const AuditDecision &decision, const std::string &target={}) |
| wxString | audit_message (AuditEventCategory category, const wxString &plugin_name, const wxString &event_name, const wxString &target_list, size_t target_count) |
| bool | prompt_for_targets (AuditEventCategory category, const std::string &plugin_name, const std::string &event_name, const std::vector< std::string > &unresolved) |
| bool | prompt_for_permission_message (const wxString &message) |
| void | persist_grant (const std::string &plugin_key, AuditEventCategory category, bool by_event, const std::vector< std::string > &keys) |
| static const char * | audit_category_name (AuditEventCategory category) |
| bool | request_permission (AuditEventCategory category, const std::string &plugin_key, const std::string &plugin_name, const std::string &event_name, bool by_event, const std::vector< std::string > &keys) |
| int | decide_audited_event (PluginAuditManager &mgr, PluginInstallState &state, const std::string &plugin_key, const std::string &plugin_name, const std::string &event_name, AuditEventCategory category, const std::vector< std::string > &targets) |
| int | audit_plugin_event (PluginAuditManager &mgr, const std::string &event_name, AuditEventCategory event_type, PyObject *args) |
Variables | |
| static std::vector< boost::filesystem::path > | s_stdlib_dirs |
| static std::vector< boost::filesystem::path > | s_site_package_dirs |
| static std::unordered_map< std::string, bool > | s_stdlib_file_verdicts |
| static const std::unordered_set< std::string > | two_path_fs_events |
| static const std::unordered_map< std::string, std::vector< Py_ssize_t > > | audit_target_arg_indices |
| static PluginAuditManager::PermissionPrompt | s_permission_prompt_for_testing |
| static PluginAuditManager::PermissionMessagePrompt | s_permission_message_prompt_for_testing |
| std::string Slic3r::PluginAuditDetail::absolute_tree_grant | ( | const std::string & | grant | ) |
References tree_grant_root().
Referenced by Slic3r::PluginAuditManager::request_permissions().
|
static |
References Slic3r::FsCreate, Slic3r::FsDelete, Slic3r::FsRead, Slic3r::FsReadWrite, Slic3r::Http, Slic3r::ProcessCreate, Slic3r::ProcessReplace, Slic3r::Socket, and Slic3r::Threading.
Referenced by request_permission().
| wxString Slic3r::PluginAuditDetail::audit_message | ( | AuditEventCategory | category, |
| const wxString & | plugin_name, | ||
| const wxString & | event_name, | ||
| const wxString & | target_list, | ||
| size_t | target_count ) |
References _L, _L_PLURAL, Slic3r::FsCreate, Slic3r::FsDelete, Slic3r::FsRead, Slic3r::FsReadWrite, Slic3r::Http, Slic3r::ProcessCreate, Slic3r::ProcessReplace, Slic3r::Socket, and Slic3r::Threading.
Referenced by prompt_for_targets(), and Slic3r::PluginAuditManager::request_permissions().
| int Slic3r::PluginAuditDetail::audit_plugin_event | ( | PluginAuditManager & | mgr, |
| const std::string & | event_name, | ||
| AuditEventCategory | event_type, | ||
| PyObject * | args ) |
References audit_targets(), Slic3r::PluginAuditManager::covered_by_root_frame(), Slic3r::PluginAuditManager::current_plugin(), decide_audited_event(), Slic3r::FsRead, Slic3r::PluginManager::get_install_state(), Slic3r::PluginManager::instance(), Slic3r::PluginAuditManager::is_denied_path(), Slic3r::is_fs_category(), Slic3r::operation_root_events, Slic3r::PluginInstallState::plugin_name, Slic3r::PluginAuditManager::record_root_frame(), and report_denied().
Referenced by Slic3r::PluginAuditManager::audit_hook().
| std::vector< std::string > Slic3r::PluginAuditDetail::audit_targets | ( | const std::string & | event_name, |
| AuditEventCategory | category, | ||
| PyObject * | args ) |
References audit_target_arg_indices, Slic3r::FsCreate, Slic3r::FsDelete, Slic3r::FsRead, Slic3r::FsReadWrite, Slic3r::kThreadPermissionTarget, python_path(), python_str(), Slic3r::Threading, tuple_item(), and two_path_fs_events.
Referenced by audit_plugin_event().
| void Slic3r::PluginAuditDetail::collect_stdlib_dirs | ( | ) |
References python_unicode(), s_site_package_dirs, s_stdlib_dirs, and s_stdlib_file_verdicts.
Referenced by Slic3r::PluginAuditManager::install_hook().
| int Slic3r::PluginAuditDetail::decide_audited_event | ( | PluginAuditManager & | mgr, |
| PluginInstallState & | state, | ||
| const std::string & | plugin_key, | ||
| const std::string & | plugin_name, | ||
| const std::string & | event_name, | ||
| AuditEventCategory | category, | ||
| const std::vector< std::string > & | targets ) |
References event_grant_key(), has_any_network_permission(), has_network_permission(), has_permission(), Slic3r::is_network_category(), permission_list_for(), Slic3r::PluginInstallState::permissions, persist_permission(), Slic3r::PluginAuditManager::releasing_frames(), report_denied(), and request_permission().
Referenced by audit_plugin_event().
| std::string Slic3r::PluginAuditDetail::event_grant_key | ( | AuditEventCategory | category, |
| const std::string & | event_name ) |
References Slic3r::category_name().
Referenced by decide_audited_event().
| bool Slic3r::PluginAuditDetail::fs_grant_covers | ( | const std::string & | grant, |
| const std::string & | target ) |
References Slic3r::is_inside_allowed_root(), and tree_grant_root().
Referenced by has_permission().
| bool Slic3r::PluginAuditDetail::has_any_network_permission | ( | const PluginPermissions & | permissions | ) |
References Slic3r::PluginPermissions::network_http, and Slic3r::PluginPermissions::network_socket.
Referenced by decide_audited_event().
| bool Slic3r::PluginAuditDetail::has_network_permission | ( | const PluginPermissions & | permissions, |
| const std::string & | target ) |
References Slic3r::PluginPermissions::network_http, Slic3r::PluginAuditManager::network_permission_matches(), and Slic3r::PluginPermissions::network_socket.
Referenced by decide_audited_event(), and Slic3r::PluginAuditManager::request_permissions().
| bool Slic3r::PluginAuditDetail::has_permission | ( | AuditEventCategory | category, |
| bool | by_event, | ||
| const std::vector< std::string > & | granted, | ||
| const std::string & | target ) |
References fs_grant_covers(), Slic3r::FsRead, and Slic3r::FsReadWrite.
Referenced by decide_audited_event(), persist_permission(), and Slic3r::PluginAuditManager::request_permissions().
| bool Slic3r::PluginAuditDetail::is_stdlib_frame | ( | PyObject * | frame | ) |
References Slic3r::PluginAuditManager::is_stdlib_file(), and python_unicode().
Referenced by Slic3r::PluginAuditManager::covered_by_root_frame(), and Slic3r::PluginAuditManager::record_root_frame().
| AuditEventCategory Slic3r::PluginAuditDetail::open_category | ( | PyObject * | args | ) |
References Slic3r::FsRead, Slic3r::FsReadWrite, python_unicode(), and tuple_item().
Referenced by Slic3r::PluginAuditManager::audit_hook().
| std::vector< std::string > * Slic3r::PluginAuditDetail::permission_list_for | ( | AuditEventCategory | category, |
| bool | by_event, | ||
| PluginPermissions & | permissions ) |
References Slic3r::PluginPermissions::events, Slic3r::PluginPermissions::fs_read, Slic3r::PluginPermissions::fs_readwrite, Slic3r::FsRead, Slic3r::FsReadWrite, Slic3r::Http, Slic3r::PluginPermissions::network_http, Slic3r::PluginPermissions::network_socket, Slic3r::PluginPermissions::process, Slic3r::ProcessCreate, Slic3r::ProcessReplace, Slic3r::Socket, Slic3r::Threading, and Slic3r::PluginPermissions::threading.
Referenced by decide_audited_event(), persist_grant(), and Slic3r::PluginAuditManager::request_permissions().
| void Slic3r::PluginAuditDetail::persist_grant | ( | const std::string & | plugin_key, |
| AuditEventCategory | category, | ||
| bool | by_event, | ||
| const std::vector< std::string > & | keys ) |
References Slic3r::PluginManager::instance(), permission_list_for(), Slic3r::PluginInstallState::permissions, and persist_permission().
Referenced by request_permission().
| bool Slic3r::PluginAuditDetail::persist_permission | ( | const std::string & | plugin_key, |
| PluginInstallState & | state, | ||
| AuditEventCategory | category, | ||
| bool | by_event, | ||
| std::vector< std::string > & | permission_list, | ||
| const std::string & | target ) |
References has_permission(), Slic3r::PluginManager::instance(), Slic3r::PluginDescriptor::plugin_root, seed_install_metadata(), and Slic3r::write_install_state().
Referenced by decide_audited_event(), and persist_grant().
| bool Slic3r::PluginAuditDetail::prompt_for_permission_message | ( | const wxString & | message | ) |
References _L.
Referenced by Slic3r::PluginAuditManager::request_permissions().
| bool Slic3r::PluginAuditDetail::prompt_for_targets | ( | AuditEventCategory | category, |
| const std::string & | plugin_name, | ||
| const std::string & | event_name, | ||
| const std::vector< std::string > & | unresolved ) |
References _L, and audit_message().
Referenced by request_permission().
| std::string Slic3r::PluginAuditDetail::python_path | ( | PyObject * | object | ) |
References python_text().
Referenced by audit_targets().
| std::string Slic3r::PluginAuditDetail::python_str | ( | PyObject * | object | ) |
References python_unicode().
Referenced by audit_targets().
| bool Slic3r::PluginAuditDetail::python_text | ( | PyObject * | object, |
| std::string & | out ) |
References python_unicode().
Referenced by python_path().
| std::string Slic3r::PluginAuditDetail::python_unicode | ( | PyObject * | object | ) |
Referenced by collect_stdlib_dirs(), is_stdlib_frame(), open_category(), python_str(), and python_text().
| int Slic3r::PluginAuditDetail::report_denied | ( | PluginAuditManager & | mgr, |
| const std::string & | event_name, | ||
| const AuditDecision & | decision, | ||
| const std::string & | target = {} ) |
Referenced by audit_plugin_event(), and decide_audited_event().
| bool Slic3r::PluginAuditDetail::request_permission | ( | AuditEventCategory | category, |
| const std::string & | plugin_key, | ||
| const std::string & | plugin_name, | ||
| const std::string & | event_name, | ||
| bool | by_event, | ||
| const std::vector< std::string > & | keys ) |
References audit_category_name(), persist_grant(), prompt_for_targets(), and s_permission_prompt_for_testing.
Referenced by decide_audited_event().
| void Slic3r::PluginAuditDetail::seed_install_metadata | ( | const PluginDescriptor & | descriptor, |
| PluginInstallState & | state ) |
References Slic3r::PluginDescriptor::cloud_uuid(), Slic3r::PluginInstallState::cloud_uuid, Slic3r::PluginInstallState::enabled, Slic3r::PluginInstallState::installed_from, Slic3r::PluginDescriptor::installed_version, Slic3r::PluginInstallState::installed_version, Slic3r::PluginDescriptor::is_cloud_plugin(), Slic3r::PluginDescriptor::name, Slic3r::PluginInstallState::plugin_name, and Slic3r::PluginDescriptor::version.
Referenced by persist_permission(), and Slic3r::PluginAuditManager::request_permissions().
| std::vector< PyObject * > Slic3r::PluginAuditDetail::stack_frames | ( | ) |
Referenced by Slic3r::PluginAuditManager::covered_by_root_frame(), and take_returned_frames().
| void Slic3r::PluginAuditDetail::take_returned_frames | ( | std::vector< PyObject * > & | held, |
| std::vector< PyObject * > & | dropped ) |
References stack_frames().
Referenced by Slic3r::PluginAuditManager::audit_hook().
| bool Slic3r::PluginAuditDetail::tree_grant_root | ( | const std::string & | grant, |
| boost::filesystem::path & | root ) |
Referenced by absolute_tree_grant(), and fs_grant_covers().
| PyObject * Slic3r::PluginAuditDetail::tuple_item | ( | PyObject * | args, |
| Py_ssize_t | index ) |
Referenced by audit_targets(), and open_category().
|
static |
Referenced by audit_targets().
|
static |
|
static |
Referenced by request_permission(), and Slic3r::PluginAuditManager::set_permission_prompt_for_testing().
|
static |
|
static |
|
static |
Referenced by collect_stdlib_dirs(), and Slic3r::PluginAuditManager::is_stdlib_file().
|
static |
Referenced by audit_targets().