kernel/manager/ksud: Add switch functionality to sulog
Signed-off-by: ShirkNeko <109797057+ShirkNeko@users.noreply.github.com>
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user