Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions crates/rrg-proto/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ const PROTOS: &'static [&'static str] = &[
"../../proto/rrg/action/list_winreg_keys.proto",
"../../proto/rrg/action/list_winreg_values.proto",
"../../proto/rrg/action/query_wmi.proto",
"../../proto/rrg/action/dump_process_memory.proto",
];

fn main() {
Expand Down
2 changes: 2 additions & 0 deletions crates/rrg/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ default = [
"action-list_winreg_keys",
"action-query_wmi",
"action-execute_signed_command",
"action-dump_process_memory",
]

action-get_system_metadata = []
Expand All @@ -51,6 +52,7 @@ action-execute_signed_command = []
# in most RRG builds. Once that mechanism is no longer needed, this should be
# deleted.
action-execute_signed_command-preverified = ["action-execute_signed_command"]
action-dump_process_memory = []

test-setfattr = []
test-chattr = []
Expand Down
9 changes: 8 additions & 1 deletion crates/rrg/src/action.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@ pub mod query_wmi;
#[cfg(feature = "action-execute_signed_command")]
pub mod execute_signed_command;

#[cfg(feature = "action-dump_process_memory")]
pub mod dump_process_memory;

use log::info;

/// Dispatches the given `request` to an appropriate action handler.
Expand Down Expand Up @@ -146,12 +149,16 @@ where
ExecuteSignedCommand => {
handle(session, request, self::execute_signed_command::handle)
}
#[cfg(feature = "action-dump_process_memory")]
DumpProcessMemory => {
handle(session, request, self::dump_process_memory::handle)
}
// We allow `unreachable_patterns` because otherwise we get a warning if
// we compile with all the actions enabled.
#[allow(unreachable_patterns)]
action => {
return Err(crate::session::Error::unsupported_action(action));
},
}
};

info!("finished dispatching request '{request_id}'");
Expand Down
Loading
Loading