Tony Young
c55dc8cb12
Add an extra log_fd argument to specify an FD to log to.
...
In some situations, setting --log to /proc/self/fd/# is not sufficient to log out to a different FD. For instance, if a master process passes its stderr to the child nsjail process as fd 3, the nsjail child may not always be able to log to /proc/self/fd/3, e.g. if the master process is running under systemd, whose /proc/self/fd/2 is actually a socket and not a pipe. However, having nsjail write to fd 3 directly is fine and there's no other good way to handle this situation.
2017-06-11 22:12:18 +00:00
Robert Swiecki
8e39afa25f
config: more options in the config #5
2017-05-26 15:22:59 +02:00
Robert Swiecki
08de9db57c
config: more options in the config #4
2017-05-26 14:08:09 +02:00
Robert Swiecki
a8c3e1cf0b
log: make struct static/const
2017-05-21 19:47:41 +02:00
Robert Swiecki
c4c0d24e7c
Print out logs no matter what the setting of -v/-q
2017-02-15 18:59:02 +01:00
Robert Swiecki
9a4dbc1146
log: logging globals should not be 'per-thread'
2017-02-14 21:55:42 +01:00
Robert Swiecki
478d2b3789
cmdline: provide both -v/verbose and -q/quiet for logging
2017-02-14 21:54:02 +01:00
Robert Swiecki
341832d755
Duplicate logging fd, so it can be used from child process
2017-02-11 20:33:54 +01:00
Robert Swiecki
9a3c53e9a9
Print time with INFO
2016-10-21 16:49:50 +02:00
Robert Swiecki
d0a3edd67f
log: don't print function name with INFO logs
2016-10-17 15:49:20 +02:00
Robert Swiecki
2a8faeba7a
Make use of subprocClone, plus remove use of syscall(__NR_getpid)
2016-10-15 02:42:01 +02:00
Robert Swiecki
a30e2f107c
Make indent
2016-10-12 00:59:10 +02:00
Stephen Röttger
115c297958
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.
2016-09-24 12:04:40 +02:00
Robert Swiecki
6e25d47eba
Cover interruptible syscalls with TEMP_FAILURE_RETRY
2016-05-09 15:16:26 +02:00
Robert Swiecki
f17c13645c
Remove old log semantics
2016-03-15 20:45:20 +01:00
Jagger
da4fc22eab
indent 100
2015-08-15 20:10:07 +02:00
Jagger
701825970a
Implementation of MODE_STANDALONE_EXECVE
2015-08-15 16:02:38 +02:00
Robert Swiecki
ee68cd9d30
Log function names
2015-05-15 16:42:56 +02:00
Robert Swiecki
69622c17ae
Logs from the child process (namespaced) are proxied to the parent
...
process
2015-05-15 16:02:15 +02:00
Robert Swiecki
0ca35aa942
Initial import
2015-05-14 23:44:48 +02:00