Skip to content
Open
2 changes: 1 addition & 1 deletion .github/workflows/builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ jobs:
mv ../lxc_* out/

- name: Upload resulting build
uses: actions/upload-artifact@v6
uses: actions/upload-artifact@v7
continue-on-error: true
with:
name: ${{ matrix.os }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/fuzzing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
sanitizer: ${{ matrix.sanitizer }}

- name: Upload Crash
uses: actions/upload-artifact@v6
uses: actions/upload-artifact@v7
if: failure() && steps.build.outcome == 'success'
with:
name: ${{ matrix.sanitizer }}-artifacts
Expand Down
2 changes: 2 additions & 0 deletions doc/ja/lxc-create.sgml.in
Original file line number Diff line number Diff line change
Expand Up @@ -185,10 +185,12 @@
You can specify the following options :
<replaceable>&#045;&#045;rbdname RBDNAME</replaceable> will create a blockdevice named RBDNAME rather than the default, which is the container name.
<replaceable>&#045;&#045;rbdpool POOL</replaceable> will create the blockdevice in the pool named POOL, rather than the default, which is 'lxc'.
<replaceable>\-\-rbduser RBDUSER</replaceable> will specify the ceph user RBDUSER creating the blockdevice, rather than the default, which is 'admin'.
-->
backingstore が 'rbd' の場合、<filename>ceph.conf</filename> に有効な設定がされており、<filename>ceph.client.admin.keyring</filename> が定義されている必要があります。
<replaceable>--rbdname RBDNAME</replaceable> を指定すると、RBDNAME という名前のブロックデバイスを作成します。このオプションを指定しない場合のデフォルトのブロックデバイス名はコンテナ名です。
<replaceable>--rbdpool POOL</replaceable> を指定すると、POOL という名前のプール内にブロックデバイスを作成します。このオプションを指定しない場合のデフォルトのプール名は 'lxc' です。
<replaceable>--rbduser RBDUSER</replaceable> を指定すると、RBDUSER という ceph ユーザを指定してブロックデバイスを作成します。このオプションを指定しない場合のデフォルトのユーザ名は 'admin' です。
</para>
<para>
<!--
Expand Down
18 changes: 18 additions & 0 deletions doc/ja/lxc.sgml.in
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,24 @@ rootfs
で説明しています。
</refsect2>

<refsect2>
<title><!-- Unprivileged containers -->非特権コンテナ</title>
<para>
<!--
Unprivileged LXC containers run without root host-level privileges in a
user namespace, mapping container UID 0 to a non-root host ID, which
strictly limits the accessible devices and filesystems of the
container. In order to mount a rootfs in an unprivileged container, the
mapped host user must have execute permissions for all directories
along the path to and including the rootfs. Additionally, all files and
directories under the rootfs must be owned by the correct user ID and
group ID. The correct user ID and group ID are the host IDs mapped to
the container root(UID 0) in lxc.idmap.
-->
非特権 LXC コンテナは、ユーザ名前空間内で root のホストレベルの特権がない状態で実行されます。コンテナの UID 0 は、root ではないホストの ID にマッピングされ、コンテナのアクセス可能なデバイスとファイルシステムが厳密に制限されます。非特権コンテナ内で rootfs をマウントするためには、マッピングされたホストのユーザが、rootfs ディレクトリ自身を含む、rootfs までのパス上にあるすべてのディレクトリに対して実行権限を持っている必要があります。さらに、rootfs 以下のすべてのファイルとディレクトリは、正しいユーザ ID とグループ ID が所有している必要があります。正しいユーザ ID とグループ ID とは、lxc.idmap でコンテナの root(UID 0)にマッピングされているホストの ID です。
</para>
</refsect2>

<refsect2>
<title><!-- Creating / Destroying containers -->コンテナの作成と削除</title>
<para>
Expand Down
12 changes: 6 additions & 6 deletions src/lxc/utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -600,13 +600,13 @@ int run_script_argv(const char *name, unsigned int hook_version,

if (hook_version == 0) {
size += strlen(hookname);
size++;
size += 3;

size += strlen(name);
size++;
size += 3;

size += strlen(section);
size++;
size += 3;

if (size > INT_MAX)
return -EFBIG;
Expand All @@ -617,7 +617,7 @@ int run_script_argv(const char *name, unsigned int hook_version,
return -ENOMEM;

if (hook_version == 0)
buf_pos = strnprintf(buffer, size, "exec %s %s %s %s", script, name, section, hookname);
buf_pos = strnprintf(buffer, size, "exec %s '%s' '%s' '%s'", script, name, section, hookname);
else
buf_pos = strnprintf(buffer, size, "exec %s", script);
if (buf_pos < 0)
Expand Down Expand Up @@ -706,13 +706,13 @@ int run_script(const char *name, const char *section, const char *script, ...)
size += strlen(script);
size += strlen(name);
size += strlen(section);
size += 4;
size += 8;

if (size > INT_MAX)
return -1;

buffer = must_realloc(NULL, size);
ret = strnprintf(buffer, size, "exec %s %s %s", script, name, section);
ret = strnprintf(buffer, size, "exec %s '%s' '%s'", script, name, section);
if (ret < 0)
return -1;

Expand Down