Skip to content

Commit 130dfeb

Browse files
committed
feat: Add rbw inject and rbw run commands
1 parent 77464d4 commit 130dfeb

File tree

6 files changed

+1783
-3
lines changed

6 files changed

+1783
-3
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
/pkg
22
/target
33
/target-ra
4+
5+
.worktrees/

Cargo.lock

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ zeroize = "1.8.2"
8787
arboard = { version = "3.6.1", default-features = false, features = [
8888
"wayland-data-control",
8989
], optional = true }
90+
dotenvy = "0.15.7"
9091

9192
[features]
9293
default = ["clipboard"]

src/bin/rbw-agent/debugger.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ pub fn disable_tracing() -> anyhow::Result<()> {
2727
if ret != 0 {
2828
let e = std::io::Error::last_os_error();
2929
return Err(anyhow::anyhow!(
30-
"failed to deny debugger attach, agent memory may be readable by other processes: {}", e
30+
"failed to deny debugger attach, agent memory may be readable by other processes: {e}"
3131
));
3232
}
3333

@@ -38,11 +38,11 @@ pub fn disable_tracing() -> anyhow::Result<()> {
3838
};
3939
// safety: correct argument
4040
// https://developer.apple.com/library/archive/documentation/System/Conceptual/ManPages_iPhoneOS/man2/setrlimit.2.html
41-
let ret = unsafe { libc::setrlimit(libc::RLIMIT_CORE, &rlim) };
41+
let ret = unsafe { libc::setrlimit(libc::RLIMIT_CORE, &raw const rlim) };
4242
if ret != 0 {
4343
let e = std::io::Error::last_os_error();
4444
return Err(anyhow::anyhow!(
45-
"failed to disable core dumps, agent memory may be dumped to disk: {}", e
45+
"failed to disable core dumps, agent memory may be dumped to disk: {e}"
4646
));
4747
}
4848

0 commit comments

Comments
 (0)