зеркало из https://github.com/mozilla/mig-sandbox.git
Add MPL license headers and contributor credits
This commit is contained in:
Родитель
c4e8756e84
Коммит
a55aeb09db
10
Makefile
10
Makefile
|
@ -1,10 +1,16 @@
|
|||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
OS := $(shell uname -s| tr '[:upper:]' '[:lower:]')
|
||||
#
|
||||
# Contributors:
|
||||
# Alexandru Tudorica <tudalex@gmail.com>
|
||||
# vladimirdiaconescu <vladimirdiaconescu@users.noreply.github.com>
|
||||
# Teodora Baluta <teobaluta@gmail.com>
|
||||
|
||||
OS := $(shell uname -s| tr '[:upper:]' '[:lower:]')
|
||||
ARCH := amd64
|
||||
|
||||
GO := GOOS=$(OS) GOARCH=$(ARCH) GO15VENDOREXPERIMENT=1 go
|
||||
GO := GOOS=$(OS) GOARCH=$(ARCH) GO15VENDOREXPERIMENT=1 go
|
||||
GOGETTER := GOPATH=$(shell pwd)/.tmpdeps go get -d
|
||||
|
||||
all: build
|
||||
|
|
|
@ -1,4 +1,12 @@
|
|||
// +build !linux
|
||||
// This Source Code Form is subject to the terms of the Mozilla Public
|
||||
// License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
//
|
||||
// Contributors:
|
||||
// Alexandru Tudorica <tudalex@gmail.com>
|
||||
// vladimirdiaconescu <vladimirdiaconescu@users.noreply.github.com>
|
||||
// Teodora Baluta <teobaluta@gmail.com>
|
||||
|
||||
package sandbox
|
||||
|
||||
|
|
|
@ -1,4 +1,13 @@
|
|||
// +build linux
|
||||
// This Source Code Form is subject to the terms of the Mozilla Public
|
||||
// License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
//
|
||||
// Contributors:
|
||||
// Alexandru Tudorica <tudalex@gmail.com>
|
||||
// vladimirdiaconescu <vladimirdiaconescu@users.noreply.github.com>
|
||||
// Teodora Baluta <teobaluta@gmail.com>
|
||||
|
||||
|
||||
package sandbox
|
||||
|
||||
|
|
|
@ -1,4 +1,12 @@
|
|||
// +build linux
|
||||
// This Source Code Form is subject to the terms of the Mozilla Public
|
||||
// License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
//
|
||||
// Contributors:
|
||||
// Alexandru Tudorica <tudalex@gmail.com>
|
||||
// vladimirdiaconescu <vladimirdiaconescu@users.noreply.github.com>
|
||||
// Teodora Baluta <teobaluta@gmail.com>
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
@ -10,7 +18,7 @@
|
|||
struct sigaction old_action;
|
||||
|
||||
void handler(int signum, siginfo_t *info, void *context) {
|
||||
//TODO: Put this in a nice formatted json error
|
||||
//TODO: Put this in a nice formatted json error
|
||||
fprintf(stderr,"Jail violation caused by syscall %s. Code %d\n", syscall_mappings[info->si_syscall], info->si_syscall);
|
||||
//fprintf(stderr,"Code %d\n", info->si_syscall);
|
||||
exit(1);
|
||||
|
|
|
@ -1,3 +1,10 @@
|
|||
// This Source Code Form is subject to the terms of the Mozilla Public
|
||||
// License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
//
|
||||
// Contributors:
|
||||
// Alexandru Tudorica <tudalex@gmail.com>
|
||||
// vladimirdiaconescu <vladimirdiaconescu@users.noreply.github.com>
|
||||
// Teodora Baluta <teobaluta@gmail.com>
|
||||
|
||||
void install_sighandler();
|
||||
|
||||
|
|
|
@ -1,3 +1,12 @@
|
|||
// This Source Code Form is subject to the terms of the Mozilla Public
|
||||
// License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
//
|
||||
// Contributors:
|
||||
// Alexandru Tudorica <tudalex@gmail.com>
|
||||
// vladimirdiaconescu <vladimirdiaconescu@users.noreply.github.com>
|
||||
// Teodora Baluta <teobaluta@gmail.com>
|
||||
|
||||
const char * const syscall_mappings[] = { "restart_syscall",
|
||||
"exit",
|
||||
"fork",
|
||||
|
|
|
@ -1,4 +1,12 @@
|
|||
#!/usr/bin/env python
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
#
|
||||
# Contributors:
|
||||
# Alexandru Tudorica <tudalex@gmail.com>
|
||||
# vladimirdiaconescu <vladimirdiaconescu@users.noreply.github.com>
|
||||
# Teodora Baluta <teobaluta@gmail.com>
|
||||
|
||||
import subprocess
|
||||
|
||||
|
@ -52,4 +60,3 @@ print "};\n"
|
|||
#from pprint import pformat
|
||||
#print "package main\n"
|
||||
#print "var idToSyscall = map[int]string" + pformat(mappings).replace("'",'"')
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче