Skip to content

Commit

Permalink
Bugfixes (20/20) Stability workarounds
Browse files Browse the repository at this point in the history
  • Loading branch information
noproto committed Oct 10, 2021
1 parent 6bf1bc5 commit 8994ffb
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions src/library/platforms/linux/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -270,14 +270,23 @@ unsafe extern "C" fn la_symbind64(sym: *const libc::Elf64_Sym, _ndx: libc::c_uin
if (*refcook) == 0 {
return (*(sym)).st_value as usize;
}
// FIXME: Hacks around Python/rsyslog/libcrypto issue: (python dlopen/dlopen/openssl_fopen used by python/rsyslog/curl respectively)
// FIXME: Hacks various Python/rsyslog/dpkg/libcrypto issue(s): (python dlopen/dlopen/dlopen/openssl_fopen used by python/rsyslog/curl respectively)
if (calling_library_basename_str == "libcrypto.so.1.1") && (symbol_str == "fopen64") {
return (*(sym)).st_value as usize;
}
if symbol_str == "dlopen" {
if let Ok(exe) = std::env::current_exe() {
if let Ok(exe_string) = exe.into_os_string().into_string() {
if exe_string.starts_with("/usr/bin/python") || exe_string == String::from("/usr/sbin/rsyslogd") { return (*(sym)).st_value as usize; }
if exe_string.starts_with("/usr/bin/python") ||
exe_string == String::from("/usr/sbin/rsyslogd") ||
exe_string == String::from("/usr/bin/perl") { return (*(sym)).st_value as usize; }
}
}
}
if symbol_str == "execvp" {
if let Ok(exe) = std::env::current_exe() {
if let Ok(exe_string) = exe.into_os_string().into_string() {
if exe_string.starts_with("/usr/bin/apt") { return (*(sym)).st_value as usize; }
}
}
}
Expand Down

0 comments on commit 8994ffb

Please sign in to comment.