12 lines
408 B
C
12 lines
408 B
C
#define _GNU_SOURCE
|
|
#include <dlfcn.h>
|
|
#include <signal.h>
|
|
#include <string.h>
|
|
#include <unistd.h>
|
|
int rename(const char *oldpath, const char *newpath) {
|
|
int (*original)(const char *, const char *) = dlsym(RTLD_NEXT, "rename");
|
|
int result = original(oldpath, newpath);
|
|
if (result == 0 && strstr(newpath, "/.preland-admin-staging/backup-1-") != NULL) kill(getpid(), SIGKILL);
|
|
return result;
|
|
}
|