sbctl icon indicating copy to clipboard operation
sbctl copied to clipboard

sbctl export-enrolled-keys complains about output directory

Open jojoob opened this issue 11 months ago • 4 comments

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.

jojoob avatar Jan 08 '25 10:01 jojoob

Try to disable the sandbox with --disable-landlock

Foxboron avatar Jan 08 '25 11:01 Foxboron

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

jojoob avatar Jan 08 '25 12:01 jojoob

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

Foxboron avatar Jan 08 '25 12:01 Foxboron

Bumping

OoLunar avatar Mar 20 '25 09:03 OoLunar