added sudo prefix for unlock command

This commit is contained in:
2026-06-06 11:42:29 +02:00
parent 12854e2eca
commit 6a5a7a7116

View File

@@ -64,7 +64,7 @@ func unlockZFSHandler(w http.ResponseWriter, r *http.Request) {
unlockMutex.Lock() unlockMutex.Lock()
defer unlockMutex.Unlock() defer unlockMutex.Unlock()
cmd := exec.CommandContext(ctx, unlockCommand) cmd := exec.CommandContext(ctx, "sudo", unlockCommand)
cmd.Stdin = strings.NewReader(payload.Passphrase) cmd.Stdin = strings.NewReader(payload.Passphrase)