config: add uid client criteria
This commit is contained in:
parent
9bf79bf23c
commit
587ffc7ee5
13 changed files with 63 additions and 2 deletions
|
|
@ -82,6 +82,7 @@ pub enum ClientCriterionIpc {
|
|||
regex: bool,
|
||||
},
|
||||
Sandboxed,
|
||||
Uid(i32),
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize, Clone, Debug, Hash, Eq, PartialEq)]
|
||||
|
|
|
|||
|
|
@ -1542,6 +1542,7 @@ impl ConfigClient {
|
|||
ClientCriterion::SandboxInstanceId(t) => string!(t, SandboxInstanceId, false),
|
||||
ClientCriterion::SandboxInstanceIdRegex(t) => string!(t, SandboxInstanceId, true),
|
||||
ClientCriterion::Sandboxed => ClientCriterionIpc::Sandboxed,
|
||||
ClientCriterion::Uid(p) => ClientCriterionIpc::Uid(p),
|
||||
};
|
||||
let res = self.send_with_response(&ClientMessage::CreateClientMatcher { criterion });
|
||||
get_response!(
|
||||
|
|
|
|||
|
|
@ -77,6 +77,8 @@ pub enum ClientCriterion<'a> {
|
|||
SandboxInstanceIdRegex(&'a str),
|
||||
/// Matches if the client is sandboxed.
|
||||
Sandboxed,
|
||||
/// Matches the user ID of the client.
|
||||
Uid(i32),
|
||||
}
|
||||
|
||||
impl ClientCriterion<'_> {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue