Execute "login -f root" when gocage console
This commit is contained in:
parent
35b75ee7fb
commit
d16a2d6789
@ -33,7 +33,8 @@ func shellJail(jail *Jail) error {
|
||||
|
||||
jid := strconv.Itoa(jail.JID)
|
||||
|
||||
err := syscall.Exec("/usr/sbin/jexec", []string{"jexec", jid, "/bin/csh"}, os.Environ())
|
||||
//err := syscall.Exec("/usr/sbin/jexec", []string{"jexec", jid, "/bin/csh"}, os.Environ())
|
||||
err := syscall.Exec("/usr/sbin/jexec", []string{"jexec", jid, "login", "-f", "root"}, os.Environ())
|
||||
|
||||
// We should never get here, as syscall.Exec replace the gocage binary execution with jexec
|
||||
// This means the moment syscall.Exec fires, gocage execution halt.
|
||||
|
Loading…
Reference in New Issue
Block a user