config: allow matching on client tag
This commit is contained in:
parent
596909cd25
commit
8b19315f50
13 changed files with 76 additions and 8 deletions
|
|
@ -99,6 +99,7 @@ pub enum ClientCriterionStringField {
|
|||
SandboxInstanceId,
|
||||
Comm,
|
||||
Exe,
|
||||
Tag,
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize, Clone, Debug, Hash, Eq, PartialEq)]
|
||||
|
|
|
|||
|
|
@ -1764,6 +1764,8 @@ impl ConfigClient {
|
|||
ClientCriterion::CommRegex(t) => string!(t, Comm, true),
|
||||
ClientCriterion::Exe(t) => string!(t, Exe, false),
|
||||
ClientCriterion::ExeRegex(t) => string!(t, Exe, true),
|
||||
ClientCriterion::Tag(t) => string!(t, Tag, false),
|
||||
ClientCriterion::TagRegex(t) => string!(t, Tag, true),
|
||||
};
|
||||
let res = self.send_with_response(&ClientMessage::CreateClientMatcher { criterion });
|
||||
get_response!(
|
||||
|
|
|
|||
|
|
@ -91,6 +91,10 @@ pub enum ClientCriterion<'a> {
|
|||
Exe(&'a str),
|
||||
/// Matches the `/proc/pid/exe` of the client with a regular expression.
|
||||
ExeRegex(&'a str),
|
||||
/// Matches the tag of the client verbatim.
|
||||
Tag(&'a str),
|
||||
/// Matches the tag of the client with a regular expression.
|
||||
TagRegex(&'a str),
|
||||
}
|
||||
|
||||
impl ClientCriterion<'_> {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue