This commit is contained in:
yo 2023-07-23 15:10:11 +02:00
parent 09b807c78e
commit 853bf5fb10

View File

@ -30,10 +30,9 @@ func shellJail(jail *Jail) error {
if false == jail.Running {
return errors.New("Jail is not running")
}
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, "login", "-f", "root"}, os.Environ())
// We should never get here, as syscall.Exec replace the gocage binary execution with jexec
@ -41,6 +40,6 @@ func shellJail(jail *Jail) error {
if err != nil {
log.Printf("Exec returned %v\n", err)
}
return nil
}