platform/upstream/nsjail.git
7 years agocontain: remove unnecessary includes
Robert Swiecki [Sun, 1 Oct 2017 17:08:31 +0000 (19:08 +0200)]
contain: remove unnecessary includes

7 years agouser: comments
Robert Swiecki [Sun, 1 Oct 2017 17:01:36 +0000 (19:01 +0200)]
user: comments

7 years agouser: log message
Robert Swiecki [Sun, 1 Oct 2017 14:13:17 +0000 (16:13 +0200)]
user: log message

7 years agouser: simplify login when running with --disable_clonew_newuser by using prctl(PR_SET...
Robert Swiecki [Sun, 1 Oct 2017 14:11:46 +0000 (16:11 +0200)]
user: simplify login when running with --disable_clonew_newuser by using prctl(PR_SET_SECUREBITS, SECBIT_KEEP_CAPS | SECBIT_NO_SETUID_FIXUP)

7 years agouser: more comments
Robert Swiecki [Sun, 1 Oct 2017 13:54:04 +0000 (15:54 +0200)]
user: more comments

7 years agocaps: more comments
Robert Swiecki [Sun, 1 Oct 2017 03:49:13 +0000 (05:49 +0200)]
caps: more comments

7 years agomount: print error when --disable_clone_newns is used but no --chroot was specified
Robert Swiecki [Sun, 1 Oct 2017 03:47:10 +0000 (05:47 +0200)]
mount: print error when --disable_clone_newns is used but no --chroot was specified

7 years agocaps: call prctl(PR_CAP_AMBIENT, PR_CAP_AMBIENT_CLEAR_ALL) early
Robert Swiecki [Sun, 1 Oct 2017 03:38:26 +0000 (05:38 +0200)]
caps: call prctl(PR_CAP_AMBIENT, PR_CAP_AMBIENT_CLEAR_ALL) early

7 years agoAllow for running with --disable_newuser started as root
Robert Swiecki [Sun, 1 Oct 2017 03:32:07 +0000 (05:32 +0200)]
Allow for running with --disable_newuser started as root

7 years agomount: allow to use --disable_newuser for root users
Robert Swiecki [Sun, 1 Oct 2017 03:16:01 +0000 (05:16 +0200)]
mount: allow to use --disable_newuser for root users

7 years agomount: remount / as private before doing any new mounts
Robert Swiecki [Sun, 1 Oct 2017 02:51:56 +0000 (04:51 +0200)]
mount: remount / as private before doing any new mounts

7 years agoMakefile: correct proto dep, plus some comments in caps.c
Robert Swiecki [Sat, 30 Sep 2017 22:06:36 +0000 (00:06 +0200)]
Makefile: correct proto dep, plus some comments in caps.c

7 years agocaps: define CAP_AUDIT_READ if not defined
Robert Swiecki [Fri, 29 Sep 2017 23:04:35 +0000 (01:04 +0200)]
caps: define CAP_AUDIT_READ if not defined

7 years agocaps: missing static function declarator
Robert Swiecki [Fri, 29 Sep 2017 22:37:06 +0000 (00:37 +0200)]
caps: missing static function declarator

7 years agocaps: refactor the code to make it readable for the --keep_caps case
Robert Swiecki [Fri, 29 Sep 2017 22:36:11 +0000 (00:36 +0200)]
caps: refactor the code to make it readable for the --keep_caps case

7 years agocap: Don't use -libcap anymore, as it had problems with newer capabilities
Robert Swiecki [Fri, 29 Sep 2017 22:05:41 +0000 (00:05 +0200)]
cap: Don't use -libcap anymore, as it had problems with newer capabilities

7 years agocmdline: various fixes of descriptions
Robert Swiecki [Fri, 29 Sep 2017 20:18:16 +0000 (22:18 +0200)]
cmdline: various fixes of descriptions

7 years agocaps: dont' throw warning if CAP_AUDIT_READ is not understood by libcap during reading
Robert Swiecki [Fri, 29 Sep 2017 19:31:22 +0000 (21:31 +0200)]
caps: dont' throw warning if CAP_AUDIT_READ is not understood by libcap during reading

7 years agocmdline: correct description for rlimit_ values
Robert Swiecki [Fri, 29 Sep 2017 12:46:03 +0000 (14:46 +0200)]
cmdline: correct description for rlimit_ values

7 years agocontain: use setrlimit64 instead of syscall(__NR_prlimit64)
Robert Swiecki [Fri, 29 Sep 2017 12:32:39 +0000 (14:32 +0200)]
contain: use setrlimit64 instead of syscall(__NR_prlimit64)

7 years agoMerge pull request #46 from ebadi/master
robertswiecki [Fri, 29 Sep 2017 12:29:24 +0000 (14:29 +0200)]
Merge pull request #46 from ebadi/master

rlimit64 to getrlimit64

7 years agorlimit64 to getrlimit64
Hamid Ebadi [Fri, 29 Sep 2017 12:11:48 +0000 (14:11 +0200)]
rlimit64 to getrlimit64

7 years agoMake it compile (maybe) under uClibc
Robert Swiecki [Fri, 29 Sep 2017 11:07:42 +0000 (13:07 +0200)]
Make it compile (maybe) under uClibc

7 years agoconfigs: format seccomp policies
Robert Swiecki [Wed, 27 Sep 2017 13:49:12 +0000 (15:49 +0200)]
configs: format seccomp policies

7 years agoconfig: make defaults work correctly 1.8
Robert Swiecki [Wed, 27 Sep 2017 13:36:05 +0000 (15:36 +0200)]
config: make defaults work correctly

7 years agoreadme: better cmd-line for docker
Robert Swiecki [Wed, 27 Sep 2017 13:20:36 +0000 (15:20 +0200)]
readme: better cmd-line for docker

7 years agoDockerfile: make it compile with new c++ libprotobuf
Robert Swiecki [Wed, 27 Sep 2017 13:18:30 +0000 (15:18 +0200)]
Dockerfile: make it compile with new c++ libprotobuf

7 years agocmdline: print error after usage and before fatal
Robert Swiecki [Tue, 26 Sep 2017 22:47:57 +0000 (00:47 +0200)]
cmdline: print error after usage and before fatal

7 years agocmdline: configs/ for --config
Robert Swiecki [Tue, 26 Sep 2017 07:30:03 +0000 (09:30 +0200)]
cmdline: configs/ for --config

7 years agomakefile: missing depend on pb.o 1.7
Robert Swiecki [Mon, 25 Sep 2017 18:06:09 +0000 (20:06 +0200)]
makefile: missing depend on pb.o

7 years agomakefile: missing depend on pb.o
Robert Swiecki [Mon, 25 Sep 2017 18:02:07 +0000 (20:02 +0200)]
makefile: missing depend on pb.o

7 years agoindent
Robert Swiecki [Mon, 25 Sep 2017 17:54:06 +0000 (19:54 +0200)]
indent

7 years agonsjail.c: LOG_F -> LOG_W for disable_clone_newuser
Robert Swiecki [Mon, 25 Sep 2017 10:01:44 +0000 (12:01 +0200)]
nsjail.c: LOG_F -> LOG_W for disable_clone_newuser

7 years agonsjail.c: exit() -> LOG_F(
Robert Swiecki [Mon, 25 Sep 2017 10:00:57 +0000 (12:00 +0200)]
nsjail.c: exit() -> LOG_F(

7 years agoMerge pull request #43 from yoshisatoyanagisawa/master
robertswiecki [Mon, 25 Sep 2017 09:59:39 +0000 (11:59 +0200)]
Merge pull request #43 from yoshisatoyanagisawa/master

Use 0xff as nsjail error exit status code.

7 years agoUse 0xff as nsjail error code.
Yoshisato Yanagisawa [Mon, 25 Sep 2017 05:08:22 +0000 (14:08 +0900)]
Use 0xff as nsjail error code.

For ease of distinguishing errors coming from a program executed by
nsjail and errors from nsjail, let me change nsjail error exit
status code to 0xff instead of 1.
I think most of programs use EXIT_FAILURE (i.e. 1) as a default
error exit status code.

7 years agoMerge pull request #42 from ebadi/master
robertswiecki [Mon, 18 Sep 2017 14:57:11 +0000 (16:57 +0200)]
Merge pull request #42 from ebadi/master

Adding the mistakenly removed line to the makefile

7 years agoAdding the mistakenly removed line to the makefile
hamid [Mon, 18 Sep 2017 14:28:13 +0000 (16:28 +0200)]
Adding the mistakenly removed line to the makefile

7 years agoMakefile: -Wno-unused-parameter for older g++
Robert Swiecki [Mon, 18 Sep 2017 10:53:42 +0000 (12:53 +0200)]
Makefile: -Wno-unused-parameter for older g++

7 years agoMakefile: clear -> clean
Robert Swiecki [Sat, 16 Sep 2017 16:10:28 +0000 (18:10 +0200)]
Makefile: clear -> clean

7 years agomakefile: proper deps for protos #2
Robert Swiecki [Sat, 16 Sep 2017 14:43:01 +0000 (16:43 +0200)]
makefile: proper deps for protos #2

7 years agomakefile: proper deps for protos
Robert Swiecki [Sat, 16 Sep 2017 14:39:55 +0000 (16:39 +0200)]
makefile: proper deps for protos

7 years agomakefile: deal with .proto better
Robert Swiecki [Fri, 15 Sep 2017 22:31:53 +0000 (00:31 +0200)]
makefile: deal with .proto better

7 years agoMakefile: remove space
Robert Swiecki [Fri, 15 Sep 2017 16:12:18 +0000 (18:12 +0200)]
Makefile: remove space

7 years agoconfig.cc: macroize utilStrDup
Robert Swiecki [Fri, 15 Sep 2017 14:55:49 +0000 (16:55 +0200)]
config.cc: macroize utilStrDup

7 years agoUpdated kafel
Robert Swiecki [Fri, 15 Sep 2017 10:50:14 +0000 (12:50 +0200)]
Updated kafel

7 years agoMerge branch 'master' of ssh://github.com/google/nsjail
Robert Swiecki [Thu, 14 Sep 2017 19:17:57 +0000 (21:17 +0200)]
Merge branch 'master' of ssh://github.com/google/nsjail

7 years agoconfig: Initial work on converting config.c to c++ protobuf lib
Robert Swiecki [Wed, 13 Sep 2017 20:03:21 +0000 (22:03 +0200)]
config: Initial work on converting config.c to c++ protobuf lib

config: Initial work on converting config.c to c++ protobuf lib #2

config: Initial work on converting config.c to c++ protobuf lib #3

config: Initial work on converting config.c to c++ protobuf lib #4

config: Initial work on converting config.c to c++ protobuf lib #5

config: Initial work on converting config.c to c++ protobuf lib #6

7 years agoAdd manual page.
John Vogel [Sun, 20 Aug 2017 00:10:56 +0000 (20:10 -0400)]
Add manual page.

7 years agoMerge pull request #39 from jvvv/master
robertswiecki [Mon, 21 Aug 2017 23:36:24 +0000 (01:36 +0200)]
Merge pull request #39 from jvvv/master

Add manual page.

7 years agoAdd manual page.
John Vogel [Sun, 20 Aug 2017 00:10:56 +0000 (20:10 -0400)]
Add manual page.

7 years agoreadme 1.6
Robert Swiecki [Sun, 13 Aug 2017 11:05:33 +0000 (13:05 +0200)]
readme

7 years agocaps: Bypass for systems which kernel defines CAP_AUDIT_READ but libcap doesn't under...
Robert Swiecki [Tue, 18 Jul 2017 21:00:04 +0000 (23:00 +0200)]
caps: Bypass for systems which kernel defines CAP_AUDIT_READ but libcap doesn't understand this

7 years agoMerge pull request #34 from disconnect3d/fix-dockerfile-build
robertswiecki [Tue, 18 Jul 2017 19:32:00 +0000 (21:32 +0200)]
Merge pull request #34 from disconnect3d/fix-dockerfile-build

Fix dockerfile: add libcap-dev install

7 years agoFix dockerfile: add libcap-dev install
disconnect3d [Tue, 18 Jul 2017 19:19:23 +0000 (21:19 +0200)]
Fix dockerfile: add libcap-dev install

Before the fix the build ends up somewhere with:
> sys/capability.h: No such file or directory

7 years agoMakefile: add -D_FILE_OFFSET_BITS=64 to CFLAGS
Robert Swiecki [Sat, 15 Jul 2017 13:04:25 +0000 (15:04 +0200)]
Makefile: add -D_FILE_OFFSET_BITS=64 to CFLAGS

7 years agoconfigs/bash: bring back changed euid for bash
Robert Swiecki [Thu, 13 Jul 2017 00:34:18 +0000 (02:34 +0200)]
configs/bash: bring back changed euid for bash

7 years agocmdline: better warning about uid/gid 0
Robert Swiecki [Thu, 13 Jul 2017 00:33:11 +0000 (02:33 +0200)]
cmdline: better warning about uid/gid 0

7 years agoconfigs/apache: spaces to tabs
Robert Swiecki [Fri, 7 Jul 2017 17:12:42 +0000 (19:12 +0200)]
configs/apache: spaces to tabs

7 years agoconfigs/apache: remove cpu limit and unnecessary is_bind
Robert Swiecki [Fri, 7 Jul 2017 17:11:56 +0000 (19:11 +0200)]
configs/apache: remove cpu limit and unnecessary is_bind

7 years agoconfigs/apache: remove ld.so.cache
Robert Swiecki [Fri, 7 Jul 2017 17:06:04 +0000 (19:06 +0200)]
configs/apache: remove ld.so.cache

7 years agocmdline: remove unnecessary bracket 1.5
Robert Swiecki [Fri, 7 Jul 2017 13:05:22 +0000 (15:05 +0200)]
cmdline: remove unnecessary bracket

7 years agonet: un-const'ify array
Robert Swiecki [Fri, 7 Jul 2017 10:14:25 +0000 (12:14 +0200)]
net: un-const'ify array

7 years agonet: const'ify array
Robert Swiecki [Fri, 7 Jul 2017 10:13:24 +0000 (12:13 +0200)]
net: const'ify array

7 years agonet: improve debugging
Robert Swiecki [Fri, 7 Jul 2017 10:10:22 +0000 (12:10 +0200)]
net: improve debugging

7 years agoexamples/apache: sort the entries again
Robert Swiecki [Fri, 7 Jul 2017 10:08:26 +0000 (12:08 +0200)]
examples/apache: sort the entries again

7 years agoexamples/apache: sort includes
Robert Swiecki [Fri, 7 Jul 2017 00:52:05 +0000 (02:52 +0200)]
examples/apache: sort includes

7 years agoexamples/apache: manual formatting of seccomp-bpf policy
Robert Swiecki [Fri, 7 Jul 2017 00:37:33 +0000 (02:37 +0200)]
examples/apache: manual formatting of seccomp-bpf policy

7 years agoexamples/apache: manual formatting of seccomp-bpf policy
Robert Swiecki [Fri, 7 Jul 2017 00:36:23 +0000 (02:36 +0200)]
examples/apache: manual formatting of seccomp-bpf policy

7 years agoexamples/apache: formatting with clang-format
Robert Swiecki [Fri, 7 Jul 2017 00:34:57 +0000 (02:34 +0200)]
examples/apache: formatting with clang-format

7 years agomount: Use MS_BIND when remounting R/O
Robert Swiecki [Thu, 6 Jul 2017 17:39:12 +0000 (19:39 +0200)]
mount: Use MS_BIND when remounting R/O

7 years agocaps: dropping caps from the bounding set
Robert Swiecki [Thu, 6 Jul 2017 12:55:27 +0000 (14:55 +0200)]
caps: dropping caps from the bounding set

7 years agoutil: mroe debugging
Robert Swiecki [Thu, 6 Jul 2017 12:37:10 +0000 (14:37 +0200)]
util: mroe debugging

7 years agocaps: shorter debug messages
Robert Swiecki [Thu, 6 Jul 2017 09:37:41 +0000 (11:37 +0200)]
caps: shorter debug messages

7 years agomake indent
Robert Swiecki [Thu, 6 Jul 2017 09:25:46 +0000 (11:25 +0200)]
make indent

7 years agocaps: simplify cap getting/setting
Robert Swiecki [Thu, 6 Jul 2017 00:21:08 +0000 (02:21 +0200)]
caps: simplify cap getting/setting

7 years agoconfig: bind caps
Robert Swiecki [Wed, 5 Jul 2017 23:12:13 +0000 (01:12 +0200)]
config: bind caps

7 years agocaps: more debugging
Robert Swiecki [Wed, 5 Jul 2017 15:34:56 +0000 (17:34 +0200)]
caps: more debugging

7 years agocaps: just local caps
Robert Swiecki [Wed, 5 Jul 2017 15:29:57 +0000 (17:29 +0200)]
caps: just local caps

7 years agocaps: simplify capability operations
Robert Swiecki [Wed, 5 Jul 2017 13:57:07 +0000 (15:57 +0200)]
caps: simplify capability operations

7 years agocaps: CAP_AUDIT_READ is not defined with Ubuntu 14
Robert Swiecki [Wed, 5 Jul 2017 12:19:51 +0000 (14:19 +0200)]
caps: CAP_AUDIT_READ is not defined with Ubuntu 14

7 years agoMerge branch 'master' of ssh://github.com/google/nsjail
Robert Swiecki [Wed, 5 Jul 2017 11:03:22 +0000 (13:03 +0200)]
Merge branch 'master' of ssh://github.com/google/nsjail

7 years agocaps: move capability-setting code to caps.*
Robert Swiecki [Wed, 5 Jul 2017 11:03:14 +0000 (13:03 +0200)]
caps: move capability-setting code to caps.*

7 years agoMerge pull request #30 from andy0130tw/fix/config-fake-euid
robertswiecki [Mon, 3 Jul 2017 20:53:56 +0000 (22:53 +0200)]
Merge pull request #30 from andy0130tw/fix/config-fake-euid

Add back ERRNO(1337) for example config

7 years agoAdd back ERRNO(1337) for example config
Andy Pan [Mon, 3 Jul 2017 20:26:37 +0000 (04:26 +0800)]
Add back ERRNO(1337) for example config

7 years agomount: allow for non-mandatory symlinks
Robert Swiecki [Sun, 2 Jul 2017 01:39:56 +0000 (03:39 +0200)]
mount: allow for non-mandatory symlinks

mount: allow for non-mandatory symlinks

7 years agoconfig.proto: reflow field numbering to make it sequential
Robert Swiecki [Sat, 1 Jul 2017 22:20:35 +0000 (00:20 +0200)]
config.proto: reflow field numbering to make it sequential

7 years agomake indent
Robert Swiecki [Sat, 1 Jul 2017 20:23:11 +0000 (22:23 +0200)]
make indent

7 years agocmdlink: use different name while printing symlinks/mount points
Robert Swiecki [Wed, 28 Jun 2017 22:38:20 +0000 (00:38 +0200)]
cmdlink: use different name while printing symlinks/mount points

7 years agoAllow to create symlinks
Robert Swiecki [Wed, 28 Jun 2017 22:32:20 +0000 (00:32 +0200)]
Allow to create symlinks

7 years agoconfig: missing bind for is_root_rw
Robert Swiecki [Mon, 26 Jun 2017 18:39:51 +0000 (20:39 +0200)]
config: missing bind for is_root_rw

7 years agoconfig: rename the chrome profile
Robert Swiecki [Thu, 22 Jun 2017 14:12:56 +0000 (16:12 +0200)]
config: rename the chrome profile

7 years agoGet number of CPUs early, as it's read from /proc
Robert Swiecki [Thu, 22 Jun 2017 01:06:53 +0000 (03:06 +0200)]
Get number of CPUs early, as it's read from /proc

7 years agocpu: correct year
Robert Swiecki [Thu, 22 Jun 2017 00:56:10 +0000 (02:56 +0200)]
cpu: correct year

7 years agoremove configs/config1.example
Robert Swiecki [Thu, 22 Jun 2017 00:28:02 +0000 (02:28 +0200)]
remove configs/config1.example

7 years agoconfigs: demo policy for chrome
Robert Swiecki [Wed, 21 Jun 2017 23:37:18 +0000 (01:37 +0200)]
configs: demo policy for chrome

7 years agomount: use /dev/shm first as a tmp dir
Robert Swiecki [Wed, 21 Jun 2017 23:21:09 +0000 (01:21 +0200)]
mount: use /dev/shm first as a tmp dir

7 years agocpu: logging
Robert Swiecki [Wed, 21 Jun 2017 22:42:04 +0000 (00:42 +0200)]
cpu: logging

7 years agomount: use TMPDIR to create a temporary dir
Robert Swiecki [Wed, 21 Jun 2017 22:39:34 +0000 (00:39 +0200)]
mount: use TMPDIR to create a temporary dir

7 years agomount: use TMPDIR to create a temporary dir
Robert Swiecki [Wed, 21 Jun 2017 22:38:49 +0000 (00:38 +0200)]
mount: use TMPDIR to create a temporary dir