#define _GNU_SOURCE #include #include #include #include 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; }