mirror of
https://github.com/NixOS/nix
synced 2025-07-10 04:43:53 +02:00
Merge pull request #8589 from jfroche/sign-paths-as-allowed-user
Allow to sign path as unprivileged user
This commit is contained in:
commit
a0c617348b
3 changed files with 18 additions and 2 deletions
|
@ -75,5 +75,20 @@
|
|||
su --login bob -c '(! nix-store --verify --repair 2>&1)' | tee diag 1>&2
|
||||
grep -F "you are not privileged to repair paths" diag
|
||||
""")
|
||||
|
||||
machine.succeed("""
|
||||
set -x
|
||||
su --login mallory -c '
|
||||
nix-store --generate-binary-cache-key cache1.example.org sk1 pk1
|
||||
(! nix store sign --key-file sk1 ${pathFour} 2>&1)' | tee diag 1>&2
|
||||
grep -F "cannot open connection to remote store 'daemon'" diag
|
||||
""")
|
||||
|
||||
machine.succeed("""
|
||||
su --login bob -c '
|
||||
nix-store --generate-binary-cache-key cache1.example.org sk1 pk1
|
||||
nix store sign --key-file sk1 ${pathFour}
|
||||
'
|
||||
""")
|
||||
'';
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue