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

sbctl export-enrolled-keys complains about output directory #410

Open
jojoob opened this issue Jan 8, 2025 · 3 comments
Open

sbctl export-enrolled-keys complains about output directory #410

jojoob opened this issue Jan 8, 2025 · 3 comments
Labels
bug Something isn't working

Comments

@jojoob
Copy link

jojoob commented Jan 8, 2025

sbctl export-enrolled-keys always complains about the output directory on my machine:

# sbctl export-enrolled-keys --dir /tmp/foo
populating ruleset for "/tmp/foo" with access {execute,write_file,read_file}: open: no such file or directory
# mkdir /tmp/foo
# sbctl export-enrolled-keys --dir /tmp/foo
creating the output directory: directory already exists

Do I miss something or is it broken?

I'm on Arch Linux with sbclt 0.16.

@Foxboron
Copy link
Owner

Foxboron commented Jan 8, 2025

Try to disable the sandbox with --disable-landlock

@jojoob
Copy link
Author

jojoob commented Jan 8, 2025

sbctl export-enrolled-keys --disable-landlock --dir /tmp/foo works! (without creating the output directory before) Thanks @Foxboron 👍

@Foxboron Foxboron added the bug Something isn't working label Jan 8, 2025
@Foxboron
Copy link
Owner

Foxboron commented Jan 8, 2025

The output dir needs filepath.Base and RWDirs for landlock to work.

https://github.com/Foxboron/sbctl/blob/master/cmd/sbctl/export-enrolled-keys.go#L34

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants