MCPcopy Create free account
hub / github.com/DBCDK/morph / writeSudoPassword

Function writeSudoPassword

ssh/ssh.go:234–243  ·  view source on GitHub ↗
(cmd *exec.Cmd, sudoPasswd string)

Source from the content-addressed store, hash-verified

232}
233
234func writeSudoPassword(cmd *exec.Cmd, sudoPasswd string) (err error) {
235 stdin, err := cmd.StdinPipe()
236 if err != nil {
237 return err
238 }
239 io.WriteString(stdin, sudoPasswd+"\n")
240 stdin.Close()
241
242 return nil
243}
244
245func (ctx *SSHContext) ActivateConfiguration(host Host, configuration string, action string) error {
246

Callers 1

SudoCmdContextMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected