mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-07-18 01:13:56 +00:00
genpolicy: add easy way to allow CloseStdinRequest
For example, Kata CI's k8s-copy-file.bats transfers files between the Host and the Guest using "kubectl exec", and that results in CloseStdinRequest being called from the Host. Signed-off-by: Dan Mihai <dmihai@microsoft.com>
This commit is contained in:
parent
8401adb113
commit
dab567bdfa
@ -299,6 +299,7 @@
|
|||||||
"commands": [],
|
"commands": [],
|
||||||
"regex": []
|
"regex": []
|
||||||
},
|
},
|
||||||
|
"CloseStdinRequest": false,
|
||||||
"ReadStreamRequest": false,
|
"ReadStreamRequest": false,
|
||||||
"WriteStreamRequest": false
|
"WriteStreamRequest": false
|
||||||
}
|
}
|
||||||
|
@ -1143,6 +1143,10 @@ ExecProcessRequest {
|
|||||||
print("ExecProcessRequest 3: true")
|
print("ExecProcessRequest 3: true")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CloseStdinRequest {
|
||||||
|
policy_data.request_defaults.CloseStdinRequest == true
|
||||||
|
}
|
||||||
|
|
||||||
ReadStreamRequest {
|
ReadStreamRequest {
|
||||||
policy_data.request_defaults.ReadStreamRequest == true
|
policy_data.request_defaults.ReadStreamRequest == true
|
||||||
}
|
}
|
||||||
|
@ -324,6 +324,9 @@ pub struct RequestDefaults {
|
|||||||
/// Commands allowed to be executed by the Host in all Guest containers.
|
/// Commands allowed to be executed by the Host in all Guest containers.
|
||||||
pub ExecProcessRequest: ExecProcessRequestDefaults,
|
pub ExecProcessRequest: ExecProcessRequestDefaults,
|
||||||
|
|
||||||
|
/// Allow the Host to close stdin for a container. Typically used with WriteStreamRequest.
|
||||||
|
pub CloseStdinRequest: bool,
|
||||||
|
|
||||||
/// Allow Host reading from Guest containers stdout and stderr.
|
/// Allow Host reading from Guest containers stdout and stderr.
|
||||||
pub ReadStreamRequest: bool,
|
pub ReadStreamRequest: bool,
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user