manager: Default selinux context should be "u:r:su:s0"

This commit is contained in:
weishu
2023-06-06 16:37:14 +08:00
parent 53be8612c8
commit a58e929205
2 changed files with 9 additions and 1 deletions

View File

@@ -87,7 +87,7 @@ object Natives {
val gid: Int = 0, val gid: Int = 0,
val groups: List<Int> = mutableListOf(), val groups: List<Int> = mutableListOf(),
val capabilities: List<Int> = mutableListOf(), val capabilities: List<Int> = mutableListOf(),
val context: String = "su", val context: String = "u:r:su:s0",
val namespace: Int = Namespace.Inherited.ordinal, val namespace: Int = Namespace.Inherited.ordinal,
val nonRootUseDefault: Boolean = true, val nonRootUseDefault: Boolean = true,

View File

@@ -162,10 +162,18 @@ fun RootProfileConfig(
} }
ListItem(headlineContent = { ListItem(headlineContent = {
val keyboardController = LocalSoftwareKeyboardController.current
OutlinedTextField( OutlinedTextField(
modifier = Modifier.fillMaxWidth(), modifier = Modifier.fillMaxWidth(),
label = { Text("SELinux context") }, label = { Text("SELinux context") },
value = profile.context, value = profile.context,
keyboardOptions = KeyboardOptions(
keyboardType = KeyboardType.Ascii,
imeAction = ImeAction.Done,
),
keyboardActions = KeyboardActions(onDone = {
keyboardController?.hide()
}),
onValueChange = { onValueChange = {
onProfileChange(profile.copy(context = it, rootUseDefault = false)) onProfileChange(profile.copy(context = it, rootUseDefault = false))
} }