added sudo prefix for unlock command
This commit is contained in:
2
main.go
2
main.go
@@ -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)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user