Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: What is the equivalent of writing input into devices.allow? #260

Open
allfro opened this issue Nov 15, 2022 · 1 comment
Open
Labels

Comments

@allfro
Copy link

allfro commented Nov 15, 2022

Hi there,

Apologies if this question is in the wrong place. I am trying to write a docker plugin which adds entries into devices.allow. I've successfully made it work using cgroup v1 by simply writing to the file exposed under /sys/fs/devices/docker/<cid>/devices.allow. However, in newer versions of Linux using cgroup v2, that option is no longer feasible. What is the equivalent in cgroup v2? How do I add an entry to the equivalent of devices.allow using this library?

Thanks in advance!

@dcantah
Copy link
Member

dcantah commented Jan 4, 2023

@allfro Fairly sure it'd be through the generic Update method on the Manager.

func (c *Manager) Update(resources *Resources) error {

Resources has a Device field that is a slice of OCI runtime spec LinuxDeviceCgroup's that has an Allow field

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants