2xsec
9fc949fb95
tools: lxc-create: share internal API symbols
...
Signed-off-by: 2xsec <dh48.jeong@samsung.com>
2018-07-02 11:13:31 +02:00
2xsec
964c8811f6
tools: lxc-snapshot: share internal API symbols
...
Signed-off-by: 2xsec <dh48.jeong@samsung.com>
2018-07-02 11:13:31 +02:00
2xsec
1831d754e1
tools: lxc-checkpoint: fix log name
...
Signed-off-by: 2xsec <dh48.jeong@samsung.com>
2018-07-02 11:13:30 +02:00
2xsec
f32f864dbc
tools: lxc-checkpoint: share internal API symbols
...
Signed-off-by: 2xsec <dh48.jeong@samsung.com>
2018-07-02 11:13:29 +02:00
2xsec
a182977321
tools: lxc-unshare: share internal API symbols
...
Signed-off-by: 2xsec <dh48.jeong@samsung.com>
2018-07-02 11:13:28 +02:00
2xsec
4b809d1fbb
tools: lxc-top: share internal API symbols
...
Signed-off-by: 2xsec <dh48.jeong@samsung.com>
2018-07-02 11:13:28 +02:00
2xsec
3779d0ba7c
tools: lxc-copy: share internal API symbols
...
Signed-off-by: 2xsec <dh48.jeong@samsung.com>
2018-07-02 11:13:27 +02:00
2xsec
8c765289d8
tools: lxc-execute: share internal API symbols
...
Signed-off-by: 2xsec <dh48.jeong@samsung.com>
2018-07-02 11:13:26 +02:00
2xsec
77fe0837b2
tools: lxc-device: share internal API symbols
...
Signed-off-by: 2xsec <dh48.jeong@samsung.com>
2018-07-02 11:13:26 +02:00
2xsec
a72ffe6b14
tools: lxc-destroy: share internal API symbols
...
Signed-off-by: 2xsec <dh48.jeong@samsung.com>
2018-07-02 11:13:25 +02:00
2xsec
bc46bee3cb
tools: lxc-console: share internal API symbols
...
Signed-off-by: 2xsec <dh48.jeong@samsung.com>
2018-07-02 11:13:24 +02:00
2xsec
d33cb9b392
tools: lxc-config: share internal API symbols
...
Signed-off-by: 2xsec <dh48.jeong@samsung.com>
2018-07-02 11:13:23 +02:00
2xsec
ffaa8484ec
tools: lxc-ls: share internal API symbols
...
Signed-off-by: 2xsec <dh48.jeong@samsung.com>
2018-07-02 11:13:23 +02:00
2xsec
5d68915f11
tools: lxc-info: share internal API symbols
...
Signed-off-by: 2xsec <dh48.jeong@samsung.com>
2018-07-02 11:13:22 +02:00
2xsec
135f6264c6
utils: code cleanups
...
Signed-off-by: 2xsec <dh48.jeong@samsung.com>
2018-07-02 11:13:21 +02:00
2xsec
e17f2390c4
tools: lxc-autostart: share internal API symbols
...
Signed-off-by: 2xsec <dh48.jeong@samsung.com>
2018-07-02 11:13:20 +02:00
2xsec
34d478f4b6
tools: lxc-attach: share internal API symbols
...
Signed-off-by: 2xsec <dh48.jeong@samsung.com>
2018-07-02 11:13:20 +02:00
2xsec
a1e7f69ad0
tools: lxc-cgroup: share internal API symbols
...
Signed-off-by: 2xsec <dh48.jeong@samsung.com>
2018-07-02 11:13:19 +02:00
2xsec
42b05b04b2
tools: lxc-wait: share internal API symbols
...
Signed-off-by: 2xsec <dh48.jeong@samsung.com>
2018-07-02 11:13:18 +02:00
2xsec
c6edd61815
tools: lxc-unfreeze: share internal API symbols
...
Signed-off-by: 2xsec <dh48.jeong@samsung.com>
2018-07-02 11:13:17 +02:00
2xsec
0998e05300
tools: lxc-freeze: share internal API symbols
...
Signed-off-by: 2xsec <dh48.jeong@samsung.com>
2018-07-02 11:13:17 +02:00
2xsec
09896a3eef
tools: lxc-stop: share internal API symbols
...
Signed-off-by: 2xsec <dh48.jeong@samsung.com>
2018-07-02 11:13:16 +02:00
2xsec
591d987158
tools: lxc-start: share internal API symbols
...
Signed-off-by: 2xsec <dh48.jeong@samsung.com>
2018-07-02 11:13:12 +02:00
Christian Brauner
8d6ee0ca9d
autodev: adapt to changes in Linux 4.18
...
Starting with commit
55956b59df33 ("vfs: Allow userns root to call mknod on owned filesystems.")
Linux will allow mknod() in user namespaces for userns root if CAP_MKNOD is
available.
However, these device nodes are useless since
static struct super_block *alloc_super(struct file_system_type *type, int flags,
struct user_namespace *user_ns)
{
/* <snip> */
if (s->s_user_ns != &init_user_ns)
s->s_iflags |= SB_I_NODEV;
/* <snip> */
}
will set the SB_I_NODEV flag on the filesystem. When a device node created in
non-init userns is open()ed the call chain will hit:
bool may_open_dev(const struct path *path)
{
return !(path->mnt->mnt_flags & MNT_NODEV) &&
!(path->mnt->mnt_sb->s_iflags & SB_I_NODEV);
}
which will cause an EPERM because the device node is located on an fs
owned by non-init-userns and thus doesn't grant access to device nodes due to
SB_I_NODEV.
The solution is straightforward. Unless you're real root you should bind-mount
device nodes.
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-06-29 18:32:20 +02:00
2xsec
58465a0343
tools: cgroup, freeze, unfreeze, wait: change fprintf => lxc_error
...
Signed-off-by: 2xsec <dh48.jeong@samsung.com>
2018-06-27 16:29:10 +02:00
2xsec
e0de0714e7
tools: fix quiet option is not working
...
Signed-off-by: 2xsec <dh48.jeong@samsung.com>
2018-06-27 16:29:09 +02:00
Christian Brauner
15b8bfe54d
log: account for Android's Bionic's strerror_r()
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-06-27 16:29:09 +02:00
duguhaotian
40c2312d8e
clear ONLCR flag for container pty
...
now container pty output log, use \r\n as a newline flag.
This is a windows type, so we need to change it. By clear
ONLCR can reach it.
Signed-off-by: duguhaotian <duguhaotian@gmail.com>
2018-06-27 16:29:08 +02:00
2xsec
28f7180097
log: change ERROR macro using sterror to SYSERROR
...
Signed-off-by: 2xsec <dh48.jeong@samsung.com>
2018-06-27 16:29:07 +02:00
2xsec
17e5707e41
log: remove strerror() from SYSERROR call
...
Signed-off-by: 2xsec <dh48.jeong@samsung.com>
2018-06-27 16:29:06 +02:00
2xsec
23253ca0e6
log: change DEBUG, INFO, TRACE, NOTICE macro using strerror to SYS* macro
...
Signed-off-by: 2xsec <dh48.jeong@samsung.com>
2018-06-27 16:29:05 +02:00
2xsec
2631ae677b
log: change WARN macro using strerror to SYSWARN
...
Signed-off-by: 2xsec <dh48.jeong@samsung.com>
2018-06-27 16:29:04 +02:00
2xsec
2cdf1af2a9
log: add lxc_log_strerror_r macro
...
Let's ensure that we always use the thread-safe strerror_r() function and add
an approriate macro.
Additionally, define SYS*() macros for all log levels. They will use the new
macro and ensure thread-safe retrieval of errno values.
Signed-off-by: 2xsec <dh48.jeong@samsung.com>
[christian.brauner@ubuntu.com: simplify lxc_log_strerror_r macro]
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-06-27 16:29:03 +02:00
2xsec
160ef98f3d
move some comments in lxc.spec.in
...
Signed-off-by: 2xsec <dh48.jeong@samsung.com>
2018-06-27 16:29:02 +02:00
2xsec
e24528ae31
monitor: change exit() => _exit() system call in child process
...
Signed-off-by: 2xsec <dh48.jeong@samsung.com>
2018-06-27 16:29:00 +02:00
Christian Brauner
54b827e0b6
commands: simplify lxc_cmd()
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-06-27 16:28:55 +02:00
Donghwa Jeong
6f94c2d2b1
btrfs: add to check return size of strlcat
...
Signed-off-by: Donghwa Jeong <dh48.jeong@samsung.com>
2018-06-22 13:23:29 +02:00
Donghwa Jeong
e8e3ac45de
confile: strncat => strlcat
...
Signed-off-by: Donghwa Jeong <dh48.jeong@samsung.com>
2018-06-22 13:23:28 +02:00
Donghwa Jeong
8ad6f8aec9
utils: strncat => strlcat
...
Signed-off-by: Donghwa Jeong <dh48.jeong@samsung.com>
2018-06-22 13:23:27 +02:00
Donghwa Jeong
95c654efe2
tool_utils: strncat => strlcat
...
Signed-off-by: Donghwa Jeong <dh48.jeong@samsung.com>
2018-06-22 13:23:27 +02:00
Donghwa Jeong
61bcfcb0e4
pam_cgfs: strncat => strlcat
...
Signed-off-by: Donghwa Jeong <dh48.jeong@samsung.com>
2018-06-22 13:23:26 +02:00
Donghwa Jeong
10b17d914c
conf: strncat => strlcat
...
Signed-off-by: Donghwa Jeong <dh48.jeong@samsung.com>
2018-06-22 13:23:25 +02:00
Donghwa Jeong
8a9de93be7
cgfsng: strncat => strlcat
...
Signed-off-by: Donghwa Jeong <dh48.jeong@samsung.com>
2018-06-22 13:23:24 +02:00
Donghwa Jeong
9c39c3b58b
btrfs: fix wrong buffer size to append string
...
Signed-off-by: Donghwa Jeong <dh48.jeong@samsung.com>
2018-06-22 13:23:24 +02:00
Donghwa Jeong
7ff9fe63e5
secure coding: cgfsng: strncat, strlcpy
...
Signed-off-by: Donghwa Jeong <dh48.jeong@samsung.com>
2018-06-22 13:23:23 +02:00
Donghwa Jeong
1076f93813
secure coding: strcat => strncat
...
Signed-off-by: Donghwa Jeong <dh48.jeong@samsung.com>
2018-06-22 13:23:22 +02:00
Christian Brauner
9bb379ba15
btrfs: s/strncat()/strlcat()/g
...
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-06-22 13:23:22 +02:00
Thomas Hipp
1963c60d9a
templates: Fix busybox template
...
Use `busybox --list`, and exclude the `busybox` applet if necessary.
Signed-off-by: Thomas Hipp <thomas.hipp@canonical.com>
2018-06-22 13:23:21 +02:00
Christian Brauner
3eab4446c1
include: add strlcat() implementation
...
CC: Donghwa Jeong <dh48.jeong@samsung.com>
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-06-22 13:23:20 +02:00
Donghwa Jeong
f6b5182f2e
fix pointer c is dereferenced after checking null
...
Signed-off-by: Donghwa Jeong <dh48.jeong@samsung.com>
2018-06-22 13:23:19 +02:00