1
0
Fork 0
forked from wry/wry

wayland: implement wp-security-manager-v1

This commit is contained in:
Julian Orth 2024-04-24 13:00:17 +02:00
parent 886339ff96
commit 1fceffe235
16 changed files with 417 additions and 11 deletions

View file

@ -171,7 +171,7 @@ impl Acceptor {
}
}
async fn accept(fd: Rc<OwnedFd>, state: Rc<State>, caps: ClientCaps) {
async fn accept(fd: Rc<OwnedFd>, state: Rc<State>, effective_caps: ClientCaps) {
loop {
let fd = match state.ring.accept(&fd, c::SOCK_CLOEXEC).await {
Ok(fd) => fd,
@ -181,7 +181,10 @@ async fn accept(fd: Rc<OwnedFd>, state: Rc<State>, caps: ClientCaps) {
}
};
let id = state.clients.id();
if let Err(e) = state.clients.spawn(id, &state, fd, caps) {
if let Err(e) = state
.clients
.spawn(id, &state, fd, effective_caps, ClientCaps::all())
{
log::error!("Could not spawn a client: {}", ErrorFmt(e));
break;
}