config: add pid client criteria
This commit is contained in:
parent
587ffc7ee5
commit
a952e658da
13 changed files with 55 additions and 1 deletions
|
|
@ -83,6 +83,7 @@ pub enum ClientCriterionIpc {
|
|||
},
|
||||
Sandboxed,
|
||||
Uid(i32),
|
||||
Pid(i32),
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize, Clone, Debug, Hash, Eq, PartialEq)]
|
||||
|
|
|
|||
|
|
@ -1543,6 +1543,7 @@ impl ConfigClient {
|
|||
ClientCriterion::SandboxInstanceIdRegex(t) => string!(t, SandboxInstanceId, true),
|
||||
ClientCriterion::Sandboxed => ClientCriterionIpc::Sandboxed,
|
||||
ClientCriterion::Uid(p) => ClientCriterionIpc::Uid(p),
|
||||
ClientCriterion::Pid(p) => ClientCriterionIpc::Pid(p),
|
||||
};
|
||||
let res = self.send_with_response(&ClientMessage::CreateClientMatcher { criterion });
|
||||
get_response!(
|
||||
|
|
|
|||
|
|
@ -79,6 +79,8 @@ pub enum ClientCriterion<'a> {
|
|||
Sandboxed,
|
||||
/// Matches the user ID of the client.
|
||||
Uid(i32),
|
||||
/// Matches the process ID of the client.
|
||||
Pid(i32),
|
||||
}
|
||||
|
||||
impl ClientCriterion<'_> {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue