<refsynopsisdiv>
<cmdsynopsis>
<command>lxc-attach</command>
- <arg choice="req">-n <replaceable>name</replaceable></arg>
- <arg choice="opt">-a <replaceable>arch</replaceable></arg>
- <arg choice="opt">-e</arg>
- <arg choice="opt">-s <replaceable>namespaces</replaceable></arg>
- <arg choice="opt">-R</arg>
+ <arg choice="req">-n, --name <replaceable>name</replaceable></arg>
+ <arg choice="opt">-f, --rcfile <replaceable>config_file</replaceable></arg>
+ <arg choice="opt">-a, --arch <replaceable>arch</replaceable></arg>
+ <arg choice="opt">-e, --elevated-privileges <replaceable>privileges</replaceable></arg>
+ <arg choice="opt">-s, --namespaces <replaceable>namespaces</replaceable></arg>
+ <arg choice="opt">-R, --remount-sys-proc</arg>
<arg choice="opt">--keep-env</arg>
<arg choice="opt">--clear-env</arg>
+ <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">-- <replaceable>command</replaceable></arg>
- <arg choice="opt">-L <replaceable>file</replaceable></arg>
</cmdsynopsis>
</refsynopsisdiv>
will not try to allocate a pseudo terminal. Instead it will simply attach
to the containers namespaces and run a shell or the specified command.
-->
- 이전 버전의 <command>lxc-attach</command>는 단순히 컨테이너의 특정 네임스페이스에 붙어, 쉘을 실행하거나 첫 번째 pseudo 터미널 할당 없이 특정 명령어를 실행하였다.
+ 이전 버전의 <command>lxc-attach</command>는 단순히 컨테이너의 특정 네임스페이스 내에서 쉘이나 명령어를 pseudo 터미널 할당 없이 실행하였다.
이는 다른 특권 수준을 갖는 사용자 영역 컨텍스트 간의 전환후 TIOCSTI <command>ioctl</command>를 호출하여 입력을 가로챌 수 있는 취약점이 있다.
- 새로운 버전의 <command>lxc-attach</command>는 쉘이나 명령어를 실행하기 전에, pseudo 터미널 마스터/슬레이브 쌍을 호스트에 할당하고 터미널을 가리키고 있던 표준 입출력 파일 디스크립터들은 슬레이브 pseudo 터미널로 붙인다.
- 터미널을 가리키고 있던 표준 입출력 파일 디스크립터가 아예 없었다면, <command>lxc-attach</command>는 pseudo 터미널 할당을 시도하지 않음에 주의해야 한다. 단순히 컨테이너 네임스페이스에 붙어 쉘이나 지정한 명령어만 실행할 뿐이다.
+ 새로운 버전의 <command>lxc-attach</command>는 쉘이나 명령어를 실행하기 전, 호스트에서 pseudo 터미널 마스터/슬레이브 쌍을 할당하고, 터미널을 가리키고 있던 표준 입출력 파일 디스크립터들을 pseudo 터미널의 슬레이브로 연결한다.
+ 터미널을 가리키고 있던 표준 입출력 파일 디스크립터가 아예 없었다면, <command>lxc-attach</command>는 pseudo 터미널 할당을 시도하지 않음에 주의해야 한다. 단순히 컨테이너 네임스페이스 내부에서 쉘이나 지정한 명령어를 실행할 뿐이다.
</para>
</refsect1>
<variablelist>
+ <varlistentry>
+ <term>
+ <option>-f, --rcfile <replaceable>config_file</replaceable></option>
+ </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>
+
<varlistentry>
<term>
<option>-a, --arch <replaceable>arch</replaceable></option>
<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>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>
This option will be ignored if one tries to attach to the
mount namespace anyway.
-->
- 만약 마운트 네임스페이스에 attach하려고 한다면, 이 옵션은 무시된다.
+ 만약 마운트 네임스페이스에 연결하려고 한다면, 이 옵션은 무시된다.
</para>
</listitem>
</varlistentry>
please use this option to be future-proof. In addition to
current environment variables, container=lxc will be set.
-->
- 현재의 환경변수를 attachë\90 í\94\84ë¡\9cê·¸ë\9e¨ì\97\90ë\8f\84 ê·¸ë\8c\80ë¡\9c ì \81ì\9a©í\95\9cë\8b¤. ì\9d´ê²\83ì\9d\80 í\98\84ì\9e¬ 기본 ë\8f\99ì\9e\91ì\9d´ì§\80ë§\8c (ë²\84ì \84 0.9ì\97\90ì\84\9c), í\96¥í\9b\84ì\97\90 충ë¶\84í\9e\88 ë°\94ë\80\94 ì\88\98ë\8f\84 ì\9e\88ë\8b¤. ì\99\9cë\83\90í\95\98ë©´, ì\9d´ê²\83ì\9d\80 컨í\85\8cì\9d´ë\84\88ì\97\90ê²\8c ë°\94ë\9e\8cì§\81í\95\98ì§\80 ì\95\8aì\9d\80 ì \95보를 ë\84\98겨ì¤\84 ì\88\98 ì\9e\88ë\8a\94 ì\9c\84í\97\98ì\84±ì\9d´ ì\9e\88기 ë\95\8c문ì\9d´ë\8b¤. ë\94°ë\9d¼ì\84\9c ì\9d´ 기ë\8a¥ì\97\90 ì\9d\98ì¡´í\95\98ê³ ì\9e\88ë\8b¤ë©´, í\96¥í\9b\84ì\97\90ë\8f\84 ì\9d´ë¥¼ ë³´ì\9e¥í\95 ì\88\98 ì\9e\88ë\8f\84ë¡\9d ì\9d´ ì\98µì\85\98ì\9d\84 ì\82¬ì\9a©í\95\98ë\8a\94 ê²\83ì\9d´ ì¢\8bë\8b¤. ë\98\90í\95\9c í\98\84ì\9e¬ í\99\98ê²½ ë³\80ì\88\98ì\99\80 ë\8d\94ë¶\88ì\96´, container=lxcë\8f\84 ì\84¤ì \95ë\90\9cë\8b¤.
+ 현재의 환경변수를 ì\8b¤í\96\89í\95 í\94\84ë¡\9cê·¸ë\9e¨ì\97\90ë\8f\84 ê·¸ë\8c\80ë¡\9c ì \81ì\9a©í\95\9cë\8b¤. ì\9d´ê²\83ì\9d\80 í\98\84ì\9e¬ 기본 ë\8f\99ì\9e\91ì\9d´ì§\80ë§\8c (ë²\84ì \84 0.9ì\97\90ì\84\9c), í\96¥í\9b\84ì\97\90 충ë¶\84í\9e\88 ë°\94ë\80\94 ì\88\98ë\8f\84 ì\9e\88ë\8b¤. ì\99\9cë\83\90í\95\98ë©´, ì\9d´ê²\83ì\9d\80 컨í\85\8cì\9d´ë\84\88ì\97\90ê²\8c ë°\94ë\9e\8cì§\81í\95\98ì§\80 ì\95\8aì\9d\80 ì \95보를 ë\84\98겨ì¤\84 ì\88\98 ì\9e\88ë\8a\94 ì\9c\84í\97\98ì\84±ì\9d´ ì\9e\88기 ë\95\8c문ì\9d´ë\8b¤. ë\94°ë\9d¼ì\84\9c ì\9d´ 기ë\8a¥ì\97\90 ì\9d\98ì¡´í\95\98ê³ ì\9e\88ë\8b¤ë©´, í\96¥í\9b\84ì\97\90ë\8f\84 ì\9d´ë¥¼ ë³´ì\9e¥í\95 ì\88\98 ì\9e\88ë\8f\84ë¡\9d ì\9d´ ì\98µì\85\98ì\9d\84 ì\82¬ì\9a©í\95\98ë\8a\94 ê²\83ì\9d´ ì¢\8bë\8b¤. ë\98\90í\95\9c í\98\84ì\9e¬ í\99\98ê²½ ë³\80ì\88\98ì\99\80 ë\8d\94ë¶\88ì\96´, container=lxcë\8f\84 ì\84¤ì \95ë\90\9cë\8b¤.
</para>
</listitem>
</varlistentry>
container=lxc will be the only environment with which the
attached program starts.
-->
- attach하기 전에 모든 환경변수를 지운다.
- 이를 통해 바람직하지 않은 환경변수 누출을 막을 수 있다. container=lxc 만이 attach된 프로그램이 실행되기 전에 설정되는 유일한 환경변수이다.
+ 프로그램을 실행하기 전에 모든 환경변수를 지운다.
+ 이를 통해 바람직하지 않은 환경변수 누출을 막을 수 있다. container=lxc 만이 프로그램이 실행되기 전에 설정되는 유일한 환경변수이다.
</para>
</listitem>
</varlistentry>
</para>
</listitem>
</varlistentry>
+ <varlistentry>
+ <term>
+ <option>-v, --set-var <replaceable>variable</replaceable></option>
+ </term>
+ <listitem>
+ <para>
+ <!--
+ Set an additional environment variable that is seen by the
+ attached program in the container. It is specified in the
+ form of "VAR=VALUE", and can be specified multiple times.
+ -->
+ 컨테이너 내에서 실행되는 프로그램이 볼 수 있는 환경변수를 추가한다.
+ 이는 "VAR=VALUE" 형태로 지정되며, 여러 번 지정할 수 있다.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term>
+ <option>--keep-var <replaceable>variable</replaceable></option>
+ </term>
+ <listitem>
+ <para>
+ <!--
+ Keep a specified environment variable. It can only be
+ specified in conjunction
+ with <replaceable>\-\-clear-env</replaceable>, and can be
+ specified multiple times.
+ -->
+ <replaceable>\-\-clear-env</replaceable>와 함께 사용되며, 지정한 환경변수를 지우지 않고 그대로 유지한다. 여러 번 지정할 수 있다.
+ </para>
+ </listitem>
+ </varlistentry>
</variablelist>
Attaching to user namespaces is supported by kernel 3.8 or higher
with enabling user namespace.
-->
- ì\82¬ì\9a©ì\9e\90 ë\84¤ì\9e\84ì\8a¤í\8e\98ì\9d´ì\8a¤ì\97\90 attachí\95\98기 ì\9c\84í\95´ì\84\9cë\8a\94 커ë\84\90 ë²\84ì \84ì\9d´ 3.8 ì\9d´ì\83\81ì\9d´ì\96´ì\95¼ í\95\98ê³ ì\82¬ì\9a©ì\9e\90 ë\84¤ì\9e\84ì\8a¤í\8e\98ì\9d´ì\8a¤ê°\80 í\99\9cì\84±í\99\94ë\90\98ì\96´ì\95¼ í\95\9cë\8b¤.
+ ì\82¬ì\9a©ì\9e\90 ë\84¤ì\9e\84ì\8a¤í\8e\98ì\9d´ì\8a¤ì\99\80 ì\97°ê²°ë\90\98기 ì\9c\84í\95´ì\84\9cë\8a\94 커ë\84\90 ë²\84ì \84ì\9d´ 3.8 ì\9d´ì\83\81ì\9d´ì\96´ì\95¼ í\95\98ê³ ì\82¬ì\9a©ì\9e\90 ë\84¤ì\9e\84ì\8a¤í\8e\98ì\9d´ì\8a¤ê°\80 í\99\9cì\84±í\99\94ë\90\98ì\96´ì\95¼ í\95\9cë\8b¤.
</para>
</refsect1>
<replaceable>/sys</replaceable>.
-->
리눅스의 <replaceable>/proc</replaceable>와 <replaceable>/sys</replaceable> 파일시스템은 네임스페이스의해 영향받는 몇가지 정보들을 포함하고 있다. 예를 들어 <replaceable>/proc</replaceable>의 프로세스 id로 된 폴더들이나 <replaceable>/sys/class/net</replaceable>의 네트워크 인터페이스 정보 등이다.
-의사파일시스템을 마운트하는 프로세스의 네임스페이스가 여기에 어떤 정보를 표시할지 결정하는 것이지, <replaceable>/proc</replaceable> 또는 <replaceable>/sys</replaceable>에 접근하는 프로세스의 네임스페이스가 결정하는 것은 <emphasis>아니다.</emphasis>
+pseudo 파일시스템을 마운트하는 프로세스의 네임스페이스가 여기에 어떤 정보를 표시할지 결정하는 것이지, <replaceable>/proc</replaceable> 또는 <replaceable>/sys</replaceable>에 접근하는 프로세스의 네임스페이스가 결정하는 것은 <emphasis>아니다.</emphasis>
</para>
<para>
<!--