Skip to content

portal: Allow passing device permissions to subsandbox#6123

Merged
swick merged 2 commits intoflatpak:mainfrom
JakobDev:deviceportal
Nov 20, 2025
Merged

portal: Allow passing device permissions to subsandbox#6123
swick merged 2 commits intoflatpak:mainfrom
JakobDev:deviceportal

Conversation

@JakobDev
Copy link
Contributor

This allows to pass all device permissions to a subsandbox

@GeorgesStavracas GeorgesStavracas added this to the 1.18 milestone Apr 30, 2025
@GeorgesStavracas
Copy link
Member

I think you'll need to update the portal XML comments as well

@swick
Copy link
Collaborator

swick commented Nov 18, 2025

Added the documentation and fixed some indentation so it actually gets generated. Going to merge in a few days.

@swick
Copy link
Collaborator

swick commented Nov 19, 2025

Thanks, should be all fixed.

@JakobDev
Copy link
Contributor Author

Sorry, I forgot about this PR.

After taking another look at this, maybe we should add it as a new option in the options dict instead as a sandbox flag. The problem I see with the flag, it's a 32bit bitmask. That means we have only 32 different boolean options. If we add new permissions using the flag we might run out of available options.

@swick
Copy link
Collaborator

swick commented Nov 19, 2025

I think it's fine. If we run out we can add a sandbox-flags-ext or something to the vardict.

@swick swick added this pull request to the merge queue Nov 20, 2025
Merged via the queue into flatpak:main with commit 9b51edf Nov 20, 2025
10 checks passed
@JakobDev
Copy link
Contributor Author

If we run out we can add a sandbox-flags-ext or something to the vardict.

That sounds a bit weird but OK.

IMHO there shouldn't be a bitmask in the beginning. These should be all keys in the vardict. The current system has a few problems. But we can't really drop it. I might open a Issue about it for further discussion.

I will create a PR for the flatpak-spawn cli to add the new flags when I have time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants