kernel/manager/ksud: Add switch functionality to sulog

Signed-off-by: ShirkNeko <109797057+ShirkNeko@users.noreply.github.com>
This commit is contained in:
ShirkNeko
2025-11-16 16:53:55 +08:00
parent c8020b2066
commit c4d8c49e5c
11 changed files with 135 additions and 11 deletions

View File

@@ -231,6 +231,22 @@ bool is_enhanced_security_enabled() {
return value != 0;
}
bool set_sulog_enabled(bool enabled) {
return set_feature(KSU_FEATURE_SULOG, enabled ? 1 : 0);
}
bool is_sulog_enabled() {
uint64_t value = 0;
bool supported = false;
if (!get_feature(KSU_FEATURE_SULOG, &value, &supported)) {
return false;
}
if (!supported) {
return false;
}
return value != 0;
}
void get_full_version(char* buff) {
struct ksu_get_full_version_cmd cmd = {0};
if (ksuctl(KSU_IOCTL_GET_FULL_VERSION, &cmd) == 0) {