raw

package
v0.4.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 13, 2020 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Overview

Raw implements a "raw" sandbox.

The sandbox does NOT prevent against ANY malicious attacks, not even a single shell command. Therefore this is NOT RECOMMENDED to run an online judge with this box UNLESS you ABSOLUTELY TRUST all the users.

That said, it is useful if somehow you want to use this alone when you don't have access to a sandbox like isolate.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Sandbox

type Sandbox struct{}

Sandbox implements worker.Sandbox.

func (*Sandbox) Run

func (s *Sandbox) Run(input *worker.SandboxInput) (*worker.SandboxOutput, error)

Run implements Sandbox.Run

func (*Sandbox) RunFrom

func (s *Sandbox) RunFrom(cwd string, input *worker.SandboxInput) (*worker.SandboxOutput, error)

RunFrom runs the input, assuming that it has write access to "cwd".

Raw sandbox assumes that:

  • MEMORY LIMITS ARE NOT SET. It always reports a memory usage of 0 (it cannot measure them).
  • THE PROGRAM DOES NOT MESS WITH THE COMPUTER. LMAO
  • The folder will be thrown away later.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL