Commit Graph

30 Commits

Author SHA1 Message Date
Edênis Freindorfer Azevedo
f8fae86f13
Fix typo on documentation for lxc-{attach,execute}.
According to `[1]`, `lxc-attach` uses `-u,-g` instead of `--u,--g`.
According to `[2]`, `lxc-execute` uses `-u,-g` instead of `--u,--g`.

- [1] https://github.com/lxc/lxc/blob/stable-4.0/src/lxc/tools/lxc_attach.c#L131-L132
- [2] https://github.com/lxc/lxc/blob/stable-4.0/src/lxc/tools/lxc_execute.c#L59-L60

Signed-off-by: Edenis Freindorfer Azevedo <edenisfa@gmail.com>
2021-07-06 22:50:24 -03:00
Josh Soref
a1e0e6df9c spelling: architecture
Signed-off-by: Josh Soref <jsoref@gmail.com>
2018-10-30 06:47:09 +00:00
2xsec
ec4f666f23 doc: fix indent
Signed-off-by: 2xsec <dh48.jeong@samsung.com>
2018-10-07 17:00:50 +09:00
Christian Brauner
084010482f
doc: tweak documentation a little
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-09-24 22:07:34 +02:00
Christian Brauner
ddd51fdb8e
tools/lxc-attach: add -u and -g arguments
This lets users specify uids and gids to switch to.

Closes #2591.

Signed-off-by: Disassembler disassembler@dasm.cz
[christian.brauner@ubuntu.com: adapt coding style + commit message]
2018-09-11 10:54:46 +02:00
Christian Brauner
ba2be1a8a6
attach: move pty allocation into api
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2018-01-09 13:20:23 +01:00
KATOH Yasufumi
03b03982dd doc: Update lxc-attach(1)
* Add undocumented options (-v/--set-var, --keep-var, -f/--rcfile)
* Change order of option in SYNOPSIS (-L that is placed after "command")
* Add long options in SYNOPSIS

Signed-off-by: KATOH Yasufumi <karma@jazz.email.ne.jp>
2016-08-12 17:26:31 +09:00
Stéphane Graber
3f3fd9e2ba Fix typo found by lintian
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2016-06-29 16:56:41 -04:00
Christian Brauner
f43d63bc66 lxc-attach: add logging option to manpage
Signed-off-by: Christian Brauner <christian.brauner@mailbox.org>
2016-04-11 18:14:16 +02:00
Evgeni Golov
e9555a6bc7 fix spelling mistakes spotted by Debian's lintian
Signed-off-by: Evgeni Golov <evgeni@debian.org>
2016-04-03 18:50:16 +02:00
Christian Brauner
759d521b1f lxc-attach: small improvements to manpage
Explain that the pipe symbol needs to be escaped for -e and -s.

Signed-off-by: Christian Brauner <christian.brauner@mailbox.org>
2016-03-02 12:48:38 +01:00
Christian Brauner
478dda766a lxc-attach: rework pty allocation
Previously we implemented two ways to get a pty for lxc-attach:
	1. get a pty in the container
	2. get a pty on the host

Where 1. was the default and 2. was only tried after 1. failed.
For safety and simplicity reasons, we remove 1. and just keep 2. around.

Signed-off-by: Christian Brauner <christian.brauner@mailbox.org>
2016-02-25 19:27:02 +01:00
Christian Brauner
02e5d92b70 update manpages
- add note to lxc-clone manpage that it is superseded by lxc-copy
- add note to lxc-start-ephemeral manpage that it is superseded by lxc-copy
- fix typo in lxc-attach manpage
- fix some of my comments in lxc_ls.c

Signed-off-by: Christian Brauner <christian.brauner@mailbox.org>
2016-02-23 10:26:31 +01:00
Christian Brauner
e986ea3dfa update lxc-attach manpage
- explain rationale behind allocation of pty
- briefly explain how a pty is allocated
- add a short note that describes the changed behavior for lxc-attach when the
  user is not placed in a writeable cgroup at login

Signed-off-by: Christian Brauner <christian.brauner@mailbox.org>
2016-02-22 23:23:58 +01:00
KATOH Yasufumi
a600d021ad doc: Update man pages to the latest information
* lxc-attach(1): Update to the status of kernel 3.8 or higher
* lxc-create(1), lxc-destroy(1): Now lxc-ls don't have "-l" option, so remove
* lxc(7): update description of lxc-ls and lxc-info to current version
* see-also: fix lxc(1) to lxc(7)

Signed-off-by: KATOH Yasufumi <karma@jazz.email.ne.jp>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
2014-01-06 09:51:53 -05:00
Nikola Kotur
4d69b2939c lxc-attach: elevate specific privileges
There are scenarios in which we want to execute process with specific
privileges elevated.

An example for this might be executing a process inside the container
securely, with capabilities dropped, but not in container's cgroup so
that we can have per process restrictions inside single container.

Similar to namespaces, privileges to be elevated can be OR'd:

    lxc-attach --elevated-privileges='CAP|CGROUP' ...

Backward compatibility with previous versions is retained. In case no
privileges are specified behaviour is the same as before: all of them
are elevated.

Signed-off-by: Nikola Kotur <kotnick@gmail.com>
Acked-By: Christian Seiler <christian@iwakd.de>
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
2013-11-20 10:54:47 -06:00
Stéphane Graber
36b33520f6
Fix typos identified by lintian
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2013-10-20 00:34:07 -04:00
Stéphane Graber
250b1eec71
licensing: Add missing headers and FSF address
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2013-09-03 14:33:03 -04:00
Dwight Engen
7f95145833 fix building docs
Commit 69fe23ff added checking for the older docbook2man back into
configure, but this breaks building the docs on at least Oracle Linux and
Fedora when docbook2X is not installed as docbook2man will be found but the
docs don't actually build with that tool.

This change makes it so the docs can be built with either the older
docbook2man or the newer 2X tools by using configure to set the dtd
string to an appropriate value depending on use of docbook2man or
db2x_docbook2man.

Also fixed a small error in lxc-destroy.sgml.in that was noticed
by the old tools.

Signed-off-by: Dwight Engen <dwight.engen@oracle.com>
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
2013-04-30 08:19:37 -05:00
Christian Seiler
799f96fdd8 lxc-attach: Implement --clear-env and --keep-env
This patch introduces the --clear-env and --keep-env options for
lxc-attach, that allows the user to specify whether the environment
should be passed on inside the container or not.

This is to be expanded upon in later versions, this patch only
introduces the most basic functionality.

Signed-off-by: Christian Seiler <christian@iwakd.de>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
2013-04-01 10:05:30 -04:00
Daniel Lezcano
9afe19d634 Change author email address
Signed-off-by: Daniel Lezcano <daniel.lezcano@free.fr>
2013-03-19 11:19:13 +01:00
Peter Simons
aa8d013ec5 Update documentation to Docbook 4.5
The package 'docbook-tools' [1] required to format Docbook 3.0 into man pages
has been obsoleted a long time ago and can no longer be downloaded from its
former homepage. Recent versions of that package -- now called 'docbook2X' --,
cannot deal with that old markup format anymore (and don't support the '-w all'
command line switch either). To remedy these issues, all SGML files have been
updated to Docbook 4.5 so that recent versions of docbook2man can process them.

[1] http://sources.redhat.com/docbook-tools/
[2] http://docbook2x.sourceforge.net/

Signed-off-by: Peter Simons <simons@cryp.to>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
2012-11-12 15:20:39 -05:00
Stéphane Graber
f282a2f4b8 Revert "Update documentation to Docbook 4.5"
This reverts commit 9a84044bc97098821cce2721ea40a1368f17a091.

The changes made the branch to fail to build on Ubuntu/Debian, so
reverting the commits and re-opening the pull request.

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2012-11-12 13:18:32 -05:00
Peter Simons
75d0acd48f Update documentation to Docbook 4.5
The package 'docbook-tools' [1] required to format Docbook 3.0 into man pages
has been obsoleted a long time ago and can no longer be downloaded from its
former homepage. Recent versions of that package -- now called 'docbook2X' --,
cannot deal with that old markup format anymore (and don't support the '-w all'
command line switch either). To remedy these issues, all SGML files have been
updated to Docbook 4.5 so that recent versions of docbook2man can process them.

[1] http://sources.redhat.com/docbook-tools/
[2] http://docbook2x.sourceforge.net/

Signed-off-by: Peter Simons <simons@cryp.to>
2012-11-12 13:18:32 -05:00
Dwight Engen
037ba55cbe fix minor spelling error
Signed-off-by: Dwight Engen <dwight.engen@oracle.com>
2012-11-12 13:18:32 -05:00
Christian Seiler
7a0b0b5672 lxc-attach: Add -R option to remount /sys and /proc when only partially attaching
When attaching to only some namespaces of the container but not the mount
namespace, the contents of /sys and /proc of the host system do not properly
reflect the context of the container's pid and/or network namespaces, and
possibly others.

The introduced -R option adds the possibility to additionally unshare the
mount namespace (when it is not being attached) and remount /sys and /proc
in order for those filesystems to properly reflect the container's context
even when only attaching to some of the namespaces.

Signed-off-by: Christian Seiler <christian@iwakd.de>
Acked-by: Serge Hallyn <serge.hallyn@canonical.com>
Cc: Daniel Lezcano <daniel.lezcano@free.fr>
2012-11-12 13:16:16 -05:00
Christian Seiler
e13eeea2db lxc-attach: Add -s option to select namespaces to attach to
This patch allows the user to select any list of namespaces (network, pid,
mount, uts, ipc, user) that lxc-attach should use when attaching to the
container; all other namespaces will not be attached to.

This allows the user to for example attach to just the network namespace and
use the host's (and not the container's) network tools to reconfigure the
network of the container.

Signed-off-by: Christian Seiler <christian@iwakd.de>
Cc: Daniel Lezcano <daniel.lezcano@free.fr>
Acked-by: Serge Hallyn <serge.hallyn@canonical.com>
2012-11-12 13:15:17 -05:00
Dwight Engen
b4578c5b38 lxc-doc-synopsis-args
I was getting raw nroff ".SH DESCRIPTION" in my man pages. This fixes
the synopsis cmd args so that doesn't happen. Added replaceable to a few
arguments.

Signed-off-by: Dwight Engen <dwight.engen@oracle.com>
2012-10-25 10:32:37 +02:00
Daniel Lezcano
baf977694a fix lxc-attach.sgml.in spurious variable list
Signed-off-by: Daniel Lezcano <daniel.lezcano@free.fr>
2012-03-02 00:02:42 +01:00
Christian Seiler
49ee6cdcbf Add man page for lxc-attach
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
2012-02-23 09:57:14 +01:00