platform/upstream/nsjail.git
8 years agoMake it possible to build w/o kafel and nl3 1.3
Robert Swiecki [Mon, 13 Feb 2017 21:59:24 +0000 (22:59 +0100)]
Make it possible to build w/o kafel and nl3

8 years agocontain: capabilities
Robert Swiecki [Sun, 12 Feb 2017 15:54:39 +0000 (16:54 +0100)]
contain: capabilities

8 years agoDuplicate logging fd, so it can be used from child process
Robert Swiecki [Sat, 11 Feb 2017 19:33:54 +0000 (20:33 +0100)]
Duplicate logging fd, so it can be used from child process

8 years agomount: log
Robert Swiecki [Fri, 10 Feb 2017 01:25:50 +0000 (02:25 +0100)]
mount: log

8 years agoInvalid count 2 -> 1
Robert Swiecki [Fri, 10 Feb 2017 01:24:35 +0000 (02:24 +0100)]
Invalid count 2 -> 1

8 years agonewuidmap: partial revert
Robert Swiecki [Thu, 9 Feb 2017 12:37:58 +0000 (13:37 +0100)]
newuidmap: partial revert

8 years agonewuidmap: missing pid
Robert Swiecki [Thu, 9 Feb 2017 12:37:21 +0000 (13:37 +0100)]
newuidmap: missing pid

8 years agocommon: good types for uids
Robert Swiecki [Wed, 8 Feb 2017 22:21:03 +0000 (23:21 +0100)]
common: good types for uids

8 years agoUid/Gid fix
Robert Swiecki [Tue, 7 Feb 2017 23:42:23 +0000 (00:42 +0100)]
Uid/Gid fix

8 years agoAllow to specify multiple uid/gid maps
Robert Swiecki [Tue, 7 Feb 2017 23:36:32 +0000 (00:36 +0100)]
Allow to specify multiple uid/gid maps

8 years agoMore debug logging in user.c
Robert Swiecki [Tue, 7 Feb 2017 17:40:36 +0000 (18:40 +0100)]
More debug logging in user.c

8 years agoInit user-ns setresuid/setresgid before initializing other NSes
Robert Swiecki [Tue, 7 Feb 2017 17:31:50 +0000 (18:31 +0100)]
Init user-ns setresuid/setresgid before initializing other NSes

8 years agocmdline: typo
Robert Swiecki [Sat, 28 Jan 2017 13:25:09 +0000 (14:25 +0100)]
cmdline: typo

8 years agokeep_caps: make effective caps eq to permitted
Robert Swiecki [Mon, 23 Jan 2017 11:02:48 +0000 (12:02 +0100)]
keep_caps: make effective caps eq to permitted

8 years agoSupport for ambient capabilities
Robert Swiecki [Fri, 20 Jan 2017 23:15:03 +0000 (00:15 +0100)]
Support for ambient capabilities

8 years agoseccomp syscall printing: various formats of /proc/<pid>/syscall
Robert Swiecki [Wed, 18 Jan 2017 21:32:27 +0000 (22:32 +0100)]
seccomp syscall printing: various formats of /proc/<pid>/syscall

8 years agoReadme: TOC
Robert Swiecki [Sun, 15 Jan 2017 21:17:14 +0000 (22:17 +0100)]
Readme: TOC

8 years agoMerge branch 'master' of ssh://github.com/google/nsjail
Robert Swiecki [Sun, 15 Jan 2017 21:01:04 +0000 (22:01 +0100)]
Merge branch 'master' of ssh://github.com/google/nsjail

8 years agoReadme: example for kafel/seccomp-bpf
Robert Swiecki [Sun, 15 Jan 2017 21:00:55 +0000 (22:00 +0100)]
Readme: example for kafel/seccomp-bpf

8 years agoRemove bpf-helper as it's not needed since kafel/
Robert Swiecki [Mon, 9 Jan 2017 11:49:30 +0000 (12:49 +0100)]
Remove bpf-helper as it's not needed since kafel/

8 years agocmdline: usage
Robert Swiecki [Sat, 10 Dec 2016 19:47:20 +0000 (20:47 +0100)]
cmdline: usage

8 years agocmdline: usage
Robert Swiecki [Sat, 10 Dec 2016 16:17:01 +0000 (17:17 +0100)]
cmdline: usage

8 years agocmdline: use of --chroot
Robert Swiecki [Sat, 10 Dec 2016 16:11:55 +0000 (17:11 +0100)]
cmdline: use of --chroot

8 years agosubproc: logging
Robert Swiecki [Sun, 20 Nov 2016 22:55:44 +0000 (23:55 +0100)]
subproc: logging

8 years agonet: log msg
Robert Swiecki [Sun, 20 Nov 2016 22:41:05 +0000 (23:41 +0100)]
net: log msg

8 years agoMakefile: Make it possible to disable kafel and libnl3 from envvar
Robert Swiecki [Sun, 20 Nov 2016 22:37:38 +0000 (23:37 +0100)]
Makefile: Make it possible to disable kafel and libnl3 from envvar

8 years agosetjmp/longjmp: don't use stack-based jmp_buf, use TLS one
Robert Swiecki [Thu, 3 Nov 2016 02:53:52 +0000 (03:53 +0100)]
setjmp/longjmp: don't use stack-based jmp_buf, use TLS one

8 years agoPrint time with INFO
Robert Swiecki [Fri, 21 Oct 2016 14:49:50 +0000 (16:49 +0200)]
Print time with INFO

8 years agoMake it compile w/o libnl3
Robert Swiecki [Tue, 18 Oct 2016 11:54:27 +0000 (13:54 +0200)]
Make it compile w/o libnl3

8 years agoUse subprocClone instead of syscall(__NR_clone)
Robert Swiecki [Tue, 18 Oct 2016 07:47:15 +0000 (09:47 +0200)]
Use subprocClone instead of syscall(__NR_clone)

8 years agoComment type + make indent
Robert Swiecki [Mon, 17 Oct 2016 20:53:31 +0000 (22:53 +0200)]
Comment type + make indent

8 years agoLess use of USE_KAFEL
Robert Swiecki [Mon, 17 Oct 2016 16:17:08 +0000 (18:17 +0200)]
Less use of USE_KAFEL

8 years agoMissing USE_KAFEL defines
Robert Swiecki [Mon, 17 Oct 2016 16:09:05 +0000 (18:09 +0200)]
Missing USE_KAFEL defines

8 years agolog: don't print function name with INFO logs
Robert Swiecki [Mon, 17 Oct 2016 13:49:20 +0000 (15:49 +0200)]
log: don't print function name with INFO logs

8 years agosubproc: comments
Robert Swiecki [Mon, 17 Oct 2016 13:47:50 +0000 (15:47 +0200)]
subproc: comments

8 years agoTypo: subproccloneFunc -> subprocCloneFunc
Robert Swiecki [Sat, 15 Oct 2016 00:58:42 +0000 (02:58 +0200)]
Typo: subproccloneFunc -> subprocCloneFunc

8 years agoMake use of subprocClone, plus remove use of syscall(__NR_getpid)
Robert Swiecki [Sat, 15 Oct 2016 00:42:01 +0000 (02:42 +0200)]
Make use of subprocClone, plus remove use of syscall(__NR_getpid)

8 years agoAllow to use kafel_string
Robert Swiecki [Wed, 12 Oct 2016 01:52:08 +0000 (03:52 +0200)]
Allow to use kafel_string

8 years agoSlight rework of kafel use
Robert Swiecki [Wed, 12 Oct 2016 01:15:33 +0000 (03:15 +0200)]
Slight rework of kafel use

8 years agoUse common subprocSystem for executing commands
Robert Swiecki [Wed, 12 Oct 2016 00:01:12 +0000 (02:01 +0200)]
Use common subprocSystem for executing commands

8 years agoMake indent
Robert Swiecki [Tue, 11 Oct 2016 22:59:10 +0000 (00:59 +0200)]
Make indent

8 years agoMerge pull request #10 from sroettger/pivot_root_only
robertswiecki [Fri, 30 Sep 2016 14:41:25 +0000 (16:41 +0200)]
Merge pull request #10 from sroettger/pivot_root_only

Option to skip chroot (for nested user namespaces)

8 years agoDon't mount over / if pivot_root_only is enabled
Stephen Röttger [Sun, 25 Sep 2016 13:48:58 +0000 (15:48 +0200)]
Don't mount over / if pivot_root_only is enabled

The intention behind pivot_root_only is to support nested user
namespaces. However, if we bind mount over /, which happens by default,
the kernel will deny CLONE_NEWUSER.

8 years agoremove /old_root on --pivot_root_only
Stephen Röttger [Sun, 25 Sep 2016 12:48:39 +0000 (14:48 +0200)]
remove /old_root on --pivot_root_only

8 years agoNew option pivot_root_only to support nested namespaces
Stephen Röttger [Sun, 25 Sep 2016 07:30:08 +0000 (09:30 +0200)]
New option pivot_root_only to support nested namespaces

If pivot_root_only is setthe chroot in the job setup will be skipped.

8 years agoMerge pull request #9 from sroettger/newuidmap
robertswiecki [Fri, 30 Sep 2016 14:03:33 +0000 (16:03 +0200)]
Merge pull request #9 from sroettger/newuidmap

Support more complex uid and gid mappings

8 years agoSupport more complex uid and gid mappings
Stephen Röttger [Sun, 25 Sep 2016 12:30:19 +0000 (14:30 +0200)]
Support more complex uid and gid mappings

Introduces the new options uid_mapping and gid_mapping that specify
arbitrary custom mappings. If these options are used, nsjail will
use newuidmap/newgidmap to write the map files.

8 years agoMerge pull request #8 from sroettger/no_no_new_privs
robertswiecki [Fri, 30 Sep 2016 13:27:07 +0000 (15:27 +0200)]
Merge pull request #8 from sroettger/no_no_new_privs

new flag to skip no_new_privs: --disable_no_new_privs

8 years agoMerge pull request #7 from sroettger/proc_fd_2_fix
robertswiecki [Fri, 30 Sep 2016 13:26:24 +0000 (15:26 +0200)]
Merge pull request #7 from sroettger/proc_fd_2_fix

Don't try to open /proc/self/fd/2 as we might not have permission

8 years agonew flag to skip no_new_privs: --disable_no_new_privs
Stephen Röttger [Sun, 25 Sep 2016 13:56:28 +0000 (15:56 +0200)]
new flag to skip no_new_privs: --disable_no_new_privs

8 years agoseccomp_policy cmdline
Jagger [Fri, 30 Sep 2016 09:57:11 +0000 (11:57 +0200)]
seccomp_policy cmdline

8 years agoMerge pull request #6 from happyCoder92/master
robertswiecki [Thu, 29 Sep 2016 16:13:06 +0000 (18:13 +0200)]
Merge pull request #6 from happyCoder92/master

Kafel support

8 years agoKafel support
Wiktor Garbacz [Tue, 13 Sep 2016 10:10:15 +0000 (12:10 +0200)]
Kafel support

8 years agoDon't try to open /proc/self/fd/2 as we might not have permission
Stephen Röttger [Sat, 24 Sep 2016 10:02:14 +0000 (12:02 +0200)]
Don't try to open /proc/self/fd/2 as we might not have permission

The terminal behind fd 2 might be owned by root and can't be opened by the user.
This happens e.g. if you ssh to a server as root and su to the user.

8 years agoUse O_CLOEXEC when possible to avoid leaking FDs 1.2
Jagger [Sat, 10 Sep 2016 01:20:32 +0000 (03:20 +0200)]
Use O_CLOEXEC when possible to avoid leaking FDs

8 years agoMake MODE_STANDALONE_ONCE the default mode
Jagger [Thu, 18 Aug 2016 19:31:07 +0000 (21:31 +0200)]
Make MODE_STANDALONE_ONCE the default mode

8 years agoThe dir must start with '/'
Jagger [Thu, 18 Aug 2016 19:04:25 +0000 (21:04 +0200)]
The dir must start with '/'

8 years agoRecursive dir creation
Robert Swiecki [Thu, 18 Aug 2016 16:59:06 +0000 (18:59 +0200)]
Recursive dir creation

8 years agoDont mount /proc as RO
Jagger [Tue, 16 Aug 2016 20:42:15 +0000 (22:42 +0200)]
Dont mount /proc as RO

8 years agoDefault chroot is empty now
Jagger [Tue, 16 Aug 2016 20:07:44 +0000 (22:07 +0200)]
Default chroot is empty now

8 years agoUse old NULL mount semantics
Jagger [Tue, 16 Aug 2016 19:12:23 +0000 (21:12 +0200)]
Use old NULL mount semantics

8 years agoNames in mount:
Robert Swiecki [Tue, 16 Aug 2016 17:59:51 +0000 (19:59 +0200)]
Names in mount:

8 years agoDifferent way of mounting things
Robert Swiecki [Tue, 16 Aug 2016 17:54:50 +0000 (19:54 +0200)]
Different way of mounting things

8 years agoRemove -fblocks from Makefile
Robert Swiecki [Fri, 29 Jul 2016 13:49:35 +0000 (15:49 +0200)]
Remove -fblocks from Makefile

8 years agoRemove defer{} calls
Robert Swiecki [Fri, 29 Jul 2016 13:38:22 +0000 (15:38 +0200)]
Remove defer{} calls

8 years agoRemove -lBlocksRuntime
Robert Swiecki [Wed, 27 Jul 2016 12:03:48 +0000 (14:03 +0200)]
Remove -lBlocksRuntime

8 years agoConflicting rlim types
Jagger [Fri, 22 Jul 2016 00:37:24 +0000 (02:37 +0200)]
Conflicting rlim types

8 years agoMake it a bit more standards friendly
Robert Swiecki [Thu, 21 Jul 2016 13:48:47 +0000 (15:48 +0200)]
Make it a bit more standards friendly

8 years agoConflicting enum types
Robert Swiecki [Thu, 21 Jul 2016 13:34:46 +0000 (15:34 +0200)]
Conflicting enum types

8 years agoDon't restart accept
Robert Swiecki [Wed, 22 Jun 2016 12:07:40 +0000 (14:07 +0200)]
Don't restart accept

8 years agoReport failure of setting fcntl(FD_CLOEXEC) as error
Jagger [Mon, 20 Jun 2016 20:59:29 +0000 (22:59 +0200)]
Report failure of setting fcntl(FD_CLOEXEC) as error

8 years agoMerge pull request #5 from sandersdan/cgroup_doc_fixes
robertswiecki [Mon, 20 Jun 2016 20:47:10 +0000 (22:47 +0200)]
Merge pull request #5 from sandersdan/cgroup_doc_fixes

Minor cgroup documentation fixes

8 years agoMinor cgroup documentation fixes.
Dan Sanders [Mon, 20 Jun 2016 19:54:05 +0000 (12:54 -0700)]
Minor cgroup documentation fixes.

8 years agoREADME
Jagger [Sun, 19 Jun 2016 17:43:10 +0000 (19:43 +0200)]
README

8 years agoREADME
Jagger [Sun, 19 Jun 2016 17:41:11 +0000 (19:41 +0200)]
README

8 years agoInit cgroups with -Me
Jagger [Sun, 19 Jun 2016 17:36:56 +0000 (19:36 +0200)]
Init cgroups with -Me

8 years agocmdline help
Jagger [Sun, 19 Jun 2016 17:21:45 +0000 (19:21 +0200)]
cmdline help

8 years agoEnable OOM-killer for cgroups
Jagger [Sun, 19 Jun 2016 16:40:16 +0000 (18:40 +0200)]
Enable OOM-killer for cgroups

8 years agoUse cgroups_mem_max to enable memory limits
Jagger [Sun, 19 Jun 2016 16:12:15 +0000 (18:12 +0200)]
Use cgroups_mem_max to enable memory limits

8 years agoUse fname in cgroups
Jagger [Sun, 19 Jun 2016 14:41:26 +0000 (16:41 +0200)]
Use fname in cgroups

8 years agoDisable oom_killer
Jagger [Sun, 19 Jun 2016 14:39:41 +0000 (16:39 +0200)]
Disable oom_killer

8 years agoRemove cgroup before reporting process being finished
Jagger [Sun, 19 Jun 2016 14:02:00 +0000 (16:02 +0200)]
Remove cgroup before reporting process being finished

8 years agoInit cgroups from parent
Jagger [Sun, 19 Jun 2016 13:50:25 +0000 (15:50 +0200)]
Init cgroups from parent

8 years agoCreate sub-cgroups instead of using the parent one
Jagger [Sun, 19 Jun 2016 12:58:18 +0000 (14:58 +0200)]
Create sub-cgroups instead of using the parent one

8 years agoMore use examples
Jagger [Sun, 19 Jun 2016 12:32:27 +0000 (14:32 +0200)]
More use examples

8 years agoUnmount cgroup FS after use
Jagger [Sun, 19 Jun 2016 12:25:41 +0000 (14:25 +0200)]
Unmount cgroup FS after use

8 years agoMore debug for cgroups
Jagger [Sun, 19 Jun 2016 12:05:19 +0000 (14:05 +0200)]
More debug for cgroups

8 years agoMore memory cgroup controls
Jagger [Sun, 19 Jun 2016 11:54:36 +0000 (13:54 +0200)]
More memory cgroup controls

8 years agoRudimentary cgroup support
Jagger [Sun, 19 Jun 2016 10:47:28 +0000 (12:47 +0200)]
Rudimentary cgroup support

8 years agoSupport for CLONE_NEWCGROUP
Jagger [Sun, 19 Jun 2016 09:55:55 +0000 (11:55 +0200)]
Support for CLONE_NEWCGROUP

8 years agoUse NULL as src for mounting proc and tmpfs
Jagger [Sat, 18 Jun 2016 23:35:06 +0000 (01:35 +0200)]
Use NULL as src for mounting proc and tmpfs

8 years ago/proc is ro by defauly
Jagger [Sat, 18 Jun 2016 23:05:31 +0000 (01:05 +0200)]
/proc is ro by defauly

8 years agoBetter logging for closing(fd)
Jagger [Sat, 18 Jun 2016 09:08:35 +0000 (11:08 +0200)]
Better logging for closing(fd)

8 years agocmdline typos
Jagger [Fri, 17 Jun 2016 23:24:57 +0000 (01:24 +0200)]
cmdline typos

8 years agoImplement --pass_fd
Jagger [Fri, 17 Jun 2016 22:46:57 +0000 (00:46 +0200)]
Implement --pass_fd

9 years agoMake it compile with clang
Jagger [Sun, 12 Jun 2016 11:07:40 +0000 (13:07 +0200)]
Make it compile with clang

9 years agoLogs LOG/PLOG
Jagger [Sun, 5 Jun 2016 17:09:14 +0000 (19:09 +0200)]
Logs LOG/PLOG

9 years agoLOG->PLOG
Jagger [Sun, 15 May 2016 00:32:50 +0000 (02:32 +0200)]
LOG->PLOG

9 years agoOrder of includes
Jagger [Sat, 14 May 2016 01:38:15 +0000 (03:38 +0200)]
Order of includes

9 years agoMove PID ns to a separate module
Robert Swiecki [Fri, 13 May 2016 15:07:44 +0000 (17:07 +0200)]
Move PID ns to a separate module