28 if (strcmp(path,
"/") == 0)
31 if (strlen(path) >=
sizeof(modpath))
33 strscpy(modpath, path,
sizeof(modpath));
35 size_t len = strlen(modpath);
36 if (len > 1 && modpath[len - 1] ==
'/') {
37 modpath[len - 1] =
'\0';
65static char *
get_abs_path(
const char __user *u_path,
char *buf,
int buflen) {
70 err = user_path_at(AT_FDCWD, u_path, LOOKUP_FOLLOW, &path);
74 full = d_path(&path, buf, buflen);
89 buf = kmalloc(PATH_MAX, GFP_KERNEL);
int forbid_file(const char *path)
int unforbid_file(const char *path)
static char * get_abs_path(const char __user *u_path, char *buf, int buflen)
int forbid_contains(const char __user *u_path)
int forbid_list_get(char *buf, size_t buf_size)
int forbid_contains_str(const char *k_path)
int ulist_add(struct ulist *ul, const char *value, u32 flags, const char *payload)
void ulist_clear(struct ulist *ul)
int ulist_load(struct ulist *ul)
int ulist_list(struct ulist *ul, char *buf, size_t buf_size)
int ulist_save(struct ulist *ul)
int ulist_remove(struct ulist *ul, const char *value)
int ulist_contains(struct ulist *ul, const char *value)
static void ulist_init(struct ulist *ul, const char *fname)