mirror of
https://github.com/openharmony/kernel_linux_common_modules.git
synced 2026-08-27 09:41:18 -04:00
0afc82cd6f
--------------------------------------- DEC(Dynamic Enhance Control) is a dynamic file access enhancement mechanism. It resolves DAC interception and sharefs security risks, precisely controlling file access via a kernel permission database, ioctl interfaces and LSM framework. DEC will bind the token ID of the application and the paths it can access. The user-level sandboxmanager module and appspawn module will configure the relevant policies. When the application accesses the control paths under the sharefs file system, DEC checks the: create, read, write, remove, rename, move, access of files by the application. Signed-off-by: staralien <chengxin@servicecenter-harmonytsc.com>
19 lines
631 B
C
19 lines
631 B
C
// SPDX-License-Identifier: GPL-2.0-or-later
|
|
/*
|
|
* Copyright (c) 2026 Huawei Device Co., Ltd.
|
|
*/
|
|
|
|
#ifndef _DEC_UTILS_H
|
|
#define _DEC_UTILS_H
|
|
|
|
#include "dec_common.h"
|
|
|
|
int is_path_valid(const char *path);
|
|
struct trie_node *trie_node_create(const char *component);
|
|
struct trie_node *find_child(struct trie_node *node, const char *component);
|
|
struct trie_node *insert_child(struct trie_node *parent, const char *component);
|
|
void trie_node_destroy(struct trie_node *node);
|
|
int split_path_to_component_list(const char *path, struct list_head *comp_list);
|
|
void free_component_list(struct list_head *comp_list);
|
|
|
|
#endif /* _DEC_UTILS_H */ |