Skip to content

Commit

Permalink
Merge pull request #2676 from 2xsec/bugfix
Browse files Browse the repository at this point in the history
doc: Add -u and -g args to Korean lxc-attach(1) and lxc-execute(1)
  • Loading branch information
brauner committed Oct 7, 2018
2 parents 969e23f + 737f522 commit acf67bc
Show file tree
Hide file tree
Showing 4 changed files with 164 additions and 87 deletions.
195 changes: 117 additions & 78 deletions doc/ko/lxc-attach.sgml.in
Expand Up @@ -66,6 +66,8 @@ by Sungbae Yoo <sungbae.yoo at samsung.com>
<arg choice="opt">-L, --pty-log <replaceable>file</replaceable></arg>
<arg choice="opt">-v, --set-var <replaceable>variable</replaceable></arg>
<arg choice="opt">--keep-var <replaceable>variable</replaceable></arg>
<arg choice="opt">-u, --uid <replaceable>uid</replaceable></arg>
<arg choice="opt">-g, --gid <replaceable>gid</replaceable></arg>
<arg choice="opt">-- <replaceable>command</replaceable></arg>
</cmdsynopsis>
</refsynopsisdiv>
Expand Down Expand Up @@ -130,19 +132,19 @@ by Sungbae Yoo <sungbae.yoo at samsung.com>
</term>
<listitem>
<para>
<!--
<!--
Specify the configuration file to configure the virtualization
and isolation functionalities for the container.
-->
컨테이너의 가상화 및 고립 기능들을 설정할 파일을 지정한다.
-->
컨테이너의 가상화 및 고립 기능들을 설정할 파일을 지정한다.
</para>
<para>
<!--
<!--
This configuration file if present will be used even if there is
already a configuration file present in the previously created
container (via lxc-create).
-->
이전에 만들어졌던 컨테이너에 설정 파일이 이미 있더라도, 이 옵션이 지정되어 있다면 해당 파일을 사용한다.
-->
이전에 만들어졌던 컨테이너에 설정 파일이 이미 있더라도, 이 옵션이 지정되어 있다면 해당 파일을 사용한다.
</para>
</listitem>
</varlistentry>
Expand All @@ -153,7 +155,7 @@ by Sungbae Yoo <sungbae.yoo at samsung.com>
</term>
<listitem>
<para>
<!--
<!--
Specify the architecture which the kernel should appear to be
running as to the command executed. This option will accept the
same settings as the <option>lxc.arch</option> option in
Expand All @@ -163,10 +165,10 @@ by Sungbae Yoo <sungbae.yoo at samsung.com>
<manvolnum>5</manvolnum>
</citerefentry>. By default, the current archictecture of the
running container will be used.
-->
명령어를 실행하는 컨테이너의 아키텍처를 지정한다.
이 옵션은 컨테이너의 설정파일에서 지정한 <option>lxc.arch</option> 옵션과 같은 것만 사용할 수 있다.
<citerefentry>
-->
명령어를 실행하는 컨테이너의 아키텍처를 지정한다.
이 옵션은 컨테이너의 설정파일에서 지정한 <option>lxc.arch</option> 옵션과 같은 것만 사용할 수 있다.
<citerefentry>
<refentrytitle><filename>lxc.conf</filename></refentrytitle>
<manvolnum>5</manvolnum>
</citerefentry>를 참조 바란다. 기본값은 실행 중인 컨테이너의 아키텍처이다.
Expand All @@ -176,23 +178,21 @@ by Sungbae Yoo <sungbae.yoo at samsung.com>

<varlistentry>
<term>
<option>
-e, --elevated-privileges <replaceable>privileges</replaceable>
</option>
<option>-e, --elevated-privileges <replaceable>privileges</replaceable></option>
</term>
<listitem>
<para>
<!--
<!--
Do not drop privileges when running
<replaceable>command</replaceable> inside the container. If
this option is specified, the new process will
<emphasis>not</emphasis> be added to the container's cgroup(s)
and it will not drop its capabilities before executing.
-->
컨테이너 내부에서 <replaceable>command</replaceable>를 실행할 때 privilege를 제거하지 않는다.
만약 이 옵션이 지정되었다면, 새로운 프로세스는 컨테이너의 cgroup에 추가되지 <emphasis>않는다</emphasis>. 그리고 실행 전 capability도 제거하지 않는다.
-->
컨테이너 내부에서 <replaceable>command</replaceable>를 실행할 때 privilege를 제거하지 않는다.
만약 이 옵션이 지정되었다면, 새로운 프로세스는 컨테이너의 cgroup에 추가되지 <emphasis>않는다</emphasis>. 그리고 실행 전 capability도 제거하지 않는다.
</para>
<para>
<para>
<!--
You may specify privileges, in case you do not want to elevate all of
them, as a pipe-separated list, e.g.
Expand All @@ -203,23 +203,25 @@ by Sungbae Yoo <sungbae.yoo at samsung.com>
e.g. <replaceable>CGROUP\|LSM</replaceable> or quoted, e.g.
<replaceable>"CGROUP|LSM"</replaceable>.)
-->
만약 모든 privilege를 얻고 싶지 않을 경우에는 <replaceable>CGROUP|LSM</replaceable>와 같이 파이프(|)로 구분된 리스트를 사용할 수 있다. 허용되는 값은 <replaceable>CGROUP</replaceable>、<replaceable>CAP</replaceable>、<replaceable>LSM</replaceable>이다. 각각 cgroup, capability, MAC label을 나타낸다.
(파이프 기호는 <replaceable>CGROUP\|LSM</replaceable>처럼 \로 처리를 해주거나, <replaceable>"CGROUP|LSM"</replaceable>처럼 따옴표를 붙여야 한다.)
</para>
만약 모든 privilege를 얻고 싶지 않을 경우에는 <replaceable>CGROUP|LSM</replaceable>와 같이 파이프(|)로 구분된 리스트를 사용할 수 있다.
허용되는 값은 <replaceable>CGROUP</replaceable>、<replaceable>CAP</replaceable>、<replaceable>LSM</replaceable>이다. 각각 cgroup, capability, MAC label을 나타낸다.
(파이프 기호는 <replaceable>CGROUP\|LSM</replaceable>처럼 \로 처리를 해주거나, <replaceable>"CGROUP|LSM"</replaceable>처럼 따옴표를 붙여야 한다.)
</para>
<para>
<!--
<!--
<emphasis>Warning:</emphasis> This may leak privileges into the
container if the command starts subprocesses that remain active
after the main process that was attached is terminated. The
(re-)starting of daemons inside the container is problematic,
especially if the daemon starts a lot of subprocesses such as
<command>cron</command> or <command>sshd</command>.
<emphasis>Use with great care.</emphasis>
-->
<emphasis>경고 :</emphasis>
만약 명령어가 attach된 메인프로세스가 종료된 후에, 실행 상태로 남아있는 서브프로세스를 시작하려고 한다면, 컨테이너 내부로 privilege 누수가 발생할 수 있다.
컨테이너 내에서 데몬을 시작(또는 재시작)하는 것은 문제가 될 수 있다. 특히 만약 데몬이 많은 서브프로세스 를 실행하는 경우라면, 예를 들어 <command>cron</command>와 <command>sshd</command>와 같은 경우는 문제가 될 수 있다.
<emphasis>충분한 주의를 기울여서 사용하여야 한다.</emphasis>
-->
<emphasis>경고 :</emphasis>
만약 명령어가 attach된 메인프로세스가 종료된 후에, 실행 상태로 남아있는 서브프로세스를 시작하려고 한다면, 컨테이너 내부로 privilege 누수가 발생할 수 있다.
컨테이너 내에서 데몬을 시작(또는 재시작)하는 것은 문제가 될 수 있다. 특히 만약 데몬이 많은 서브프로세스 를 실행하는 경우라면,
예를 들어 <command>cron</command>와 <command>sshd</command>와 같은 경우는 문제가 될 수 있다.
<emphasis>충분한 주의를 기울여서 사용하여야 한다.</emphasis>
</para>
</listitem>
</varlistentry>
Expand All @@ -230,7 +232,7 @@ by Sungbae Yoo <sungbae.yoo at samsung.com>
</term>
<listitem>
<para>
<!--
<!--
Specify the namespaces to attach to, as a pipe-separated list,
e.g. <replaceable>NETWORK|IPC</replaceable>. Allowed values are
<replaceable>MOUNT</replaceable>, <replaceable>PID</replaceable>,
Expand All @@ -239,19 +241,21 @@ by Sungbae Yoo <sungbae.yoo at samsung.com>
<replaceable>NETWORK</replaceable>. This allows one to change
the context of the process to e.g. the network namespace of the
container while retaining the other namespaces as those of the
host. (The pipe symbol needs to be escaped, e.g.
<replaceable>MOUNT\|PID</replaceable> or quoted, e.g.
<replaceable>"MOUNT|PID"</replaceable>.)
-->
컨테이너의 어떤 네임스페이스와 연결할지 지정한다. <replaceable>NETWORK|IPC</replaceable>와 같이 파이프(|)로 구분된 리스트를 사용할 수 있다. 허용되는 값은 <replaceable>MOUNT</replaceable>, <replaceable>PID</replaceable>, <replaceable>UTSNAME</replaceable>, <replaceable>IPC</replaceable>, <replaceable>USER </replaceable>, <replaceable>NETWORK</replaceable>이다. 이를 사용하여, 컨테이너의 네트워크 네임스페이스를 사용하면서도 다른 네임스페이스는 호스트의 것을 그대로 사용하는 등의 조작이 가능하다.
(파이프 기호는 <replaceable>MOUNT\|PID</replaceable>처럼 \로 처리를 해주거나, <replaceable>"MOUNT|PID"</replaceable>처럼 따옴표를 붙여야 한다.)
host. (The pipe symbol needs to be escaped, e.g.
<replaceable>MOUNT\|PID</replaceable> or quoted, e.g.
<replaceable>"MOUNT|PID"</replaceable>.)
-->
컨테이너의 어떤 네임스페이스와 연결할지 지정한다. <replaceable>NETWORK|IPC</replaceable>와 같이 파이프(|)로 구분된 리스트를 사용할 수 있다.
허용되는 값은 <replaceable>MOUNT</replaceable>, <replaceable>PID</replaceable>, <replaceable>UTSNAME</replaceable>, <replaceable>IPC</replaceable>, <replaceable>USER </replaceable>, <replaceable>NETWORK</replaceable>이다.
이를 사용하여, 컨테이너의 네트워크 네임스페이스를 사용하면서도 다른 네임스페이스는 호스트의 것을 그대로 사용하는 등의 조작이 가능하다.
(파이프 기호는 <replaceable>MOUNT\|PID</replaceable>처럼 \로 처리를 해주거나, <replaceable>"MOUNT|PID"</replaceable>처럼 따옴표를 붙여야 한다.)
</para>
<para>
<!--
<!--
<emphasis>Important:</emphasis> This option implies
<option>&#045;e</option>.
-->
<emphasis>중요 :</emphasis> 이 옵션은 <option>-e</option> 옵션을 포함하고 있다.
-->
<emphasis>중요 :</emphasis> 이 옵션은 <option>-e</option> 옵션을 포함하고 있다.
</para>
</listitem>
</varlistentry>
Expand All @@ -262,29 +266,29 @@ by Sungbae Yoo <sungbae.yoo at samsung.com>
</term>
<listitem>
<para>
<!--
<!--
When using <option>&#045;s</option> and the mount namespace is not
included, this flag will cause <command>lxc-attach</command>
to remount <replaceable>/proc</replaceable> and
<replaceable>/sys</replaceable> to reflect the current other
namespace contexts.
-->
<option>-s</option>를 사용하여 마운트 네임스페이스를 포함하지 않았을 때, 이 플래그는 <command>lxc-attach</command>가 <replaceable>/proc</replaceable>와 <replaceable>/sys</replaceable>를 remount 하게 만든다.
이는 현재와 다른 네임스페이스 컨텍스트를 반영시키기 위함이다.
-->
<option>-s</option>를 사용하여 마운트 네임스페이스를 포함하지 않았을 때, 이 플래그는 <command>lxc-attach</command>가 <replaceable>/proc</replaceable>와 <replaceable>/sys</replaceable>를 remount 하게 만든다.
이는 현재와 다른 네임스페이스 컨텍스트를 반영시키기 위함이다.
</para>
<para>
<!--
<!--
Please see the <emphasis>Notes</emphasis> section for more
details.
-->
좀더 자세한 설명은 <emphasis>주의</emphasis>섹션을 참고하면 된다.
-->
좀더 자세한 설명은 <emphasis>주의</emphasis>섹션을 참고하면 된다.
</para>
<para>
<!--
<!--
This option will be ignored if one tries to attach to the
mount namespace anyway.
-->
만약 마운트 네임스페이스에 연결하려고 한다면, 이 옵션은 무시된다.
-->
만약 마운트 네임스페이스에 연결하려고 한다면, 이 옵션은 무시된다.
</para>
</listitem>
</varlistentry>
Expand All @@ -295,16 +299,18 @@ by Sungbae Yoo <sungbae.yoo at samsung.com>
</term>
<listitem>
<para>
<!--
<!--
Keep the current environment for attached programs. This is
the current default behaviour (as of version 0.9), but is
is likely to change in the future, since this may leak
undesirable information into the container. If you rely on
the environment being available for the attached program,
please use this option to be future-proof. In addition to
current environment variables, container=lxc will be set.
-->
현재의 환경변수를 실행할 프로그램에도 그대로 적용한다. 이것은 현재 기본 동작이지만 (버전 0.9에서), 향후에 충분히 바뀔 수도 있다. 왜냐하면, 이것은 컨테이너에게 바람직하지 않은 정보를 넘겨줄 수 있는 위험성이 있기 때문이다. 따라서 이 기능에 의존하고 있다면, 향후에도 이를 보장할 수 있도록 이 옵션을 사용하는 것이 좋다. 또한 현재 환경 변수와 더불어, container=lxc도 설정된다.
-->
현재의 환경변수를 실행할 프로그램에도 그대로 적용한다. 이것은 현재 기본 동작이지만 (버전 0.9에서), 향후에 충분히 바뀔 수도 있다.
왜냐하면, 이것은 컨테이너에게 바람직하지 않은 정보를 넘겨줄 수 있는 위험성이 있기 때문이다. 따라서 이 기능에 의존하고 있다면, 향후에도 이를 보장할 수 있도록 이 옵션을 사용하는 것이 좋다.
또한 현재 환경 변수와 더불어, container=lxc도 설정된다.
</para>
</listitem>
</varlistentry>
Expand All @@ -315,40 +321,41 @@ by Sungbae Yoo <sungbae.yoo at samsung.com>
</term>
<listitem>
<para>
<!--
<!--
Clear the environment before attaching, so no undesired
environment variables leak into the container. The variable
container=lxc will be the only environment with which the
attached program starts.
-->
프로그램을 실행하기 전에 모든 환경변수를 지운다.
이를 통해 바람직하지 않은 환경변수 누출을 막을 수 있다. container=lxc 만이 프로그램이 실행되기 전에 설정되는 유일한 환경변수이다.
-->
프로그램을 실행하기 전에 모든 환경변수를 지운다.
이를 통해 바람직하지 않은 환경변수 누출을 막을 수 있다. container=lxc 만이 프로그램이 실행되기 전에 설정되는 유일한 환경변수이다.
</para>
</listitem>
</varlistentry>

<varlistentry>
<term>
<option>-L, --pty-log <replaceable>file</replaceable></option>
</term>
<listitem>
<para>
<!--
Specify a file where the output of <command>lxc-attach</command> will be
logged.
-->
<command>lxc-attach</command>의 출력을 기록할 파일을 지정한다.
</para>
<para>
<!--
<emphasis>Important:</emphasis> When a standard file descriptor
does not refer to a pty output produced on it will not be logged.
-->
<emphasis>중요:</emphasis> 표준 입출력 파일 디스크립터가 pty를 참조하지 않으면, 기록되지 않는다.
</para>
</listitem>
<term>
<option>-L, --pty-log <replaceable>file</replaceable></option>
</term>
<listitem>
<para>
<!--
Specify a file where the output of <command>lxc-attach</command> will be
logged.
-->
<command>lxc-attach</command>의 출력을 기록할 파일을 지정한다.
</para>
<para>
<!--
<emphasis>Important:</emphasis> When a standard file descriptor
does not refer to a pty output produced on it will not be logged.
-->
<emphasis>중요:</emphasis> 표준 입출력 파일 디스크립터가 pty를 참조하지 않으면, 기록되지 않는다.
</para>
</listitem>
</varlistentry>
<varlistentry>

<varlistentry>
<term>
<option>-v, --set-var <replaceable>variable</replaceable></option>
</term>
Expand All @@ -359,8 +366,8 @@ by Sungbae Yoo <sungbae.yoo at samsung.com>
attached program in the container. It is specified in the
form of "VAR=VALUE", and can be specified multiple times.
-->
컨테이너 내에서 실행되는 프로그램이 볼 수 있는 환경변수를 추가한다.
이는 "VAR=VALUE" 형태로 지정되며, 여러 번 지정할 수 있다.
컨테이너 내에서 실행되는 프로그램이 볼 수 있는 환경변수를 추가한다.
이는 "VAR=VALUE" 형태로 지정되며, 여러 번 지정할 수 있다.
</para>
</listitem>
</varlistentry>
Expand All @@ -377,7 +384,39 @@ by Sungbae Yoo <sungbae.yoo at samsung.com>
with <replaceable>\-\-clear-env</replaceable>, and can be
specified multiple times.
-->
<replaceable>\-\-clear-env</replaceable>와 함께 사용되며, 지정한 환경변수를 지우지 않고 그대로 유지한다. 여러 번 지정할 수 있다.
<replaceable>\-\-clear-env</replaceable>와 함께 사용되며, 지정한 환경변수를 지우지 않고 그대로 유지한다. 여러 번 지정할 수 있다.
</para>
</listitem>
</varlistentry>

<varlistentry>
<term>
<option>--u, --uid <replaceable>uid</replaceable></option>
</term>
<listitem>
<para>
<!--
Executes the <replaceable>command</replaceable> with user ID
<replaceable>uid</replaceable> inside the container.
-->
지정된 사용자 ID <replaceable>uid</replaceable>로 <replaceable>command</replaceable>를
container 내부에 실행한다.
</para>
</listitem>
</varlistentry>

<varlistentry>
<term>
<option>--g, --gid <replaceable>gid</replaceable></option>
</term>
<listitem>
<para>
<!--
Executes the <replaceable>command</replaceable> with group ID
<replaceable>gid</replaceable> inside the container.
-->
지정된 그룹 ID <replaceable>gid</replaceable>로 <replaceable>command</replaceable>를
container 내부에 실행한다.
</para>
</listitem>
</varlistentry>
Expand Down

0 comments on commit acf67bc

Please sign in to comment.