add hints task3

main
Nikita Tokarchuk 5 years ago
parent e5d1a96e4b
commit 7565189952
  1. 3
      task3-backend/lib/server.go

@ -103,6 +103,8 @@ func (s *Server) HandleClient(conn net.Conn) {
log.Debugf("connected with id %s", claims.Id)
conn.Write([]byte(`loading\n`))
jailId, err := s.createJail(now, claims)
if err != nil {
return
@ -123,6 +125,7 @@ func (s *Server) HandleClient(conn net.Conn) {
}
greetings := fmt.Sprintf("welcome %s! I have a letter for you, just read it!", claims.Subject)
conn.Write([]byte(fmt.Sprintf(`echo %s`, greetings)))
cmd := fmt.Sprintf(`echo %s 2>&1 | tee msg /dev/console`, greetings)
err = s.execJail(jailId, []string{"sh", "-c", cmd})

Loading…
Cancel
Save