core: add safe mode config to db

This commit is contained in:
vvb2060
2024-01-06 04:00:37 +08:00
committed by John Wu
parent 72b8d12ee4
commit 02e189a029
5 changed files with 38 additions and 24 deletions
+5 -2
View File
@@ -39,7 +39,8 @@ constexpr const char *DB_SETTING_KEYS[] = {
"multiuser_mode",
"mnt_ns",
"denylist",
"zygisk"
"zygisk",
"safemode",
};
// Settings key indices
@@ -48,7 +49,8 @@ enum {
SU_MULTIUSER_MODE,
SU_MNT_NS,
DENYLIST_CONFIG,
ZYGISK_CONFIG
ZYGISK_CONFIG,
SAFEMODE_CONFIG,
};
// Values for root_access
@@ -124,6 +126,7 @@ using db_row = std::map<std::string_view, std::string_view>;
using db_row_cb = std::function<bool(db_row&)>;
int get_db_settings(db_settings &cfg, int key = -1);
int set_db_settings(int key, int value);
int get_db_strings(db_strings &str, int key = -1);
void rm_db_strings(int key);
void exec_sql(int client);