mirror of
https://git.proxmox.com/git/proxmox-perl-rs
synced 2025-05-23 16:34:18 +00:00
expose use_safe_putenv via Proxmox::Lib::PMG
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
parent
c8d4db7836
commit
a04d26b0d2
@ -14,4 +14,12 @@ mod export {
|
||||
pub fn init() {
|
||||
common::logger::init("PMG_LOG", "info");
|
||||
}
|
||||
|
||||
/// CLI tools should call this very early. This is a workaround causing environment variable
|
||||
/// manipulation to leak instead of crash. Required when calling into rust code that causes
|
||||
/// `setenv` calls, particularly code using the openssl crate.
|
||||
#[export]
|
||||
pub fn use_safe_putenv() {
|
||||
perlmod::ffi::use_safe_putenv(true);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user