add kdialog for kubuntu key escrow (#24405)
This commit is contained in:
@@ -64,7 +64,16 @@ func runWithOutput(path string, opts eopts) (output []byte, exitCode int, err er
|
||||
}
|
||||
}
|
||||
|
||||
cmd := exec.Command("sudo", args...)
|
||||
// Prefix with "timeout" and "sudo" if applicable
|
||||
var cmdArgs []string
|
||||
if opts.timeout > 0 {
|
||||
cmdArgs = append(cmdArgs, "timeout", fmt.Sprintf("%ds", int(opts.timeout.Seconds())))
|
||||
}
|
||||
cmdArgs = append(cmdArgs, "sudo")
|
||||
cmdArgs = append(cmdArgs, args...)
|
||||
|
||||
cmd := exec.Command(cmdArgs[0], cmdArgs[1:]...) // #nosec G204
|
||||
|
||||
log.Printf("cmd=%s", cmd.String())
|
||||
|
||||
output, err = cmd.Output()
|
||||
|
||||
Reference in New Issue
Block a user