Closed metaskills closed 2 years ago
Thanks so much for this library. I used it at Custom Ink for some Lambda Environment variable work here. https://github.com/customink/crypteia
I'd like to also hook into environ() like I do here (https://github.com/customink/crypteia/blob/main/src/lib.rs#L22) for getenv() but could use some help if you have a spare moment. The GNU (https://www.gnu.org/software/libc/manual/html_node/Environment-Access.html) documents both as:
environ()
getenv()
So my two questions are:
redhook::hook! { unsafe fn environ() -> *mut c_char => crypteia_environ { let value = redhook::real!(environ)(); return value; } }
redhook::hook!
Is environ not possible because it is a variable vs. a function?
environ
Answering this myself. I heard the answer is no. Maybe we could with __start. Closing this issue.
__start
Thanks so much for this library. I used it at Custom Ink for some Lambda Environment variable work here. https://github.com/customink/crypteia
I'd like to also hook into
environ()
like I do here (https://github.com/customink/crypteia/blob/main/src/lib.rs#L22) forgetenv()
but could use some help if you have a spare moment. The GNU (https://www.gnu.org/software/libc/manual/html_node/Environment-Access.html) documents both as:So my two questions are:
1) Would the hook look like this? Or is the type and/or code wrong?
2) Can I call
redhook::hook!
twice or do I have do combine them?