Unverified Commit 6911c3e7 authored by Tommaso Tocci's avatar Tommaso Tocci
Browse files

Do not intercept puts

puts has nothing to do with the FS. thus we leave libc handling it
directly
parent af7a8996
Loading
Loading
Loading
Loading
+0 −2
Changes for ifs/include/preload/passthrough.hpp: 0 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -58,8 +58,6 @@ extern void* libc___lxstat64;
extern void* libc_statfs;
extern void* libc_fstatfs;

extern void* libc_puts;

extern void* libc_write;
extern void* libc_pwrite;
extern void* libc_pwrite64;
+0 −4
Changes for ifs/src/preload/intcp_functions.cpp: 0 added lines, 4 removed lines.
Original line number Diff line number Diff line
@@ -750,10 +750,6 @@ int fstatfs(int fd, struct statfs* buf) {
    return (reinterpret_cast<decltype(&fstatfs)>(libc_fstatfs))(fd, buf);
}

int puts(const char* str) {
    return (reinterpret_cast<decltype(&puts)>(libc_puts))(str);
}

ssize_t write(int fd, const void* buf, size_t count) {
    init_passthrough_if_needed();
    if(CTX->initialized()) {
+0 −4
Changes for ifs/src/preload/passthrough.cpp: 0 added lines, 4 removed lines.
Original line number Diff line number Diff line
@@ -62,8 +62,6 @@ void* libc___lxstat64;
void* libc_statfs;
void* libc_fstatfs;

void* libc_puts;

void* libc_write;
void* libc_pwrite;
void* libc_pwrite64;
@@ -157,8 +155,6 @@ void init_passthrough_() {
    libc_statfs = dlsym(libc, "statfs");
    libc_fstatfs = dlsym(libc, "fstatfs");

    libc_puts = dlsym(libc, "puts");

    libc_write = dlsym(libc, "write");
    libc_pwrite = dlsym(libc, "pwrite");
    libc_pwrite64 = dlsym(libc, "pwrite64");