Go to file
Serge Hallyn 2a59a68183 Switch from use of LXCPATH to a configurable default_lxc_path
Here is a patch to introduce a configurable system-wide
lxcpath.  It seems to work with lxc-create, lxc-start,
and basic python3 lxc usage through the api.

For shell functions, a new /usr/share/lxc/lxc.functions is
introduced which sets some of the basic global variables,
including evaluating the right place for lxc_path.

I have not converted any of the other python code, as I was
not sure where we should keep the common functions (i.e.
for now just default_lxc_path()).

configure.ac: add an option for setting the global config file name.
utils: add a default_lxc_path() function
Use default_lxc_path in .c files
define get_lxc_path() and set_lxc_path() in C api
use get_lxc_path() in lua api
create sh helper for getting default path from config file
fix up scripts to use lxc.functions

Changelog:
  feb6:
	fix lxc_path in lxc.functions
	utils.c: as Dwight pointed out, don't close a NULL fin.
	utils.c: fix the parsing of lxcpath line
	lxc-start: print which rcfile we are using
	commands.c: As Dwight alluded to, the sockname handling was just
	   ridiculous.  Clean that up.
	use Dwight's recommendation for lxc.functions path: $datadir/lxc
	make lxccontainer->get_config_path() return const char *
		Per Dwight's suggestion, much nicer than returning strdup.
  feb6 (v2):
        lxccontainer: set c->config_path before using it.
	convert legacy lxc-ls

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
2013-02-08 10:55:14 -05:00
config Rename /etc/lxc/lxc.conf to /etc/lxc/default.conf. 2013-02-06 10:20:29 -05:00
doc add lua binding for the lxc API 2013-01-28 18:04:08 -05:00
src Switch from use of LXCPATH to a configurable default_lxc_path 2013-02-08 10:55:14 -05:00
templates oracle template: improve compatibility with old ol4, 5 2013-02-06 10:39:14 -05:00
.gitignore templates: initial support for Alpine Linux 2012-12-25 12:59:36 +01:00
AUTHORS Initial revision 2008-08-06 14:32:29 +00:00
autogen.sh lxc: kill libtool 2009-10-22 15:33:40 +02:00
configure.ac Switch from use of LXCPATH to a configurable default_lxc_path 2013-02-08 10:55:14 -05:00
CONTRIBUTING Minor documentation updates 2012-12-06 00:02:36 -05:00
COPYING Minor documentation updates 2012-12-06 00:02:36 -05:00
INSTALL Minor documentation updates 2012-12-06 00:02:36 -05:00
lxc.pc.in fixes for rpmbuild 2011-09-13 15:08:04 +02:00
lxc.spec.in add lua binding for the lxc API 2013-01-28 18:04:08 -05:00
MAINTAINERS fix git location 2012-11-11 03:32:51 +01:00
Makefile.am add lua binding for the lxc API 2013-01-28 18:04:08 -05:00
NEWS Initial revision 2008-08-06 14:32:29 +00:00
README README: fix typo in example script 2012-12-11 11:39:26 -06:00
RELEASE-NOTES Initial revision 2008-08-06 14:32:29 +00:00
runapitests.sh Update for consistent indent 2012-12-06 00:04:27 -05:00
TODO Remove all trailing whitespaces. 2012-11-26 12:08:13 -05:00

Please see the COPYING file for details on copying and usage.
Please refer to the INSTALL file for instructions on how to build.

What is lxc:

  The container technology is actively being pushed into the mainstream linux
  kernel. It provides the resource management through the control groups  aka
  process containers and resource isolation through the namespaces.

  The  linux  containers, lxc, aims to use these new functionalities to pro-
  vide an userspace container object which provides full  resource  isolation
  and resource control for an applications or a system.

  The first objective of this project is to make the life easier for the ker-
  nel developers involved in the containers project and  especially  to  con-
  tinue  working  on  the  Checkpoint/Restart  new features. The lxc is small
  enough to easily manage a container with simple command lines and  complete
  enough to be used for other purposes.

Using lxc:

  Refer the lxc* man pages (generated from doc/* files)

Downloading the current source code:

  Source for the latest released version can always be downloaded from
  http://lxc.sourceforge.net/download/lxc

  You can browse the up to the minute source code and change history online.
  http://lxc.git.sourceforge.net

  For an even more bleeding edge experience, you may want to look at the
  staging branch where all changes aimed at the next release land before
  getting pulled into the master branch.
  http://github.com/lxc/lxc

  For detailed build instruction refer to INSTALL and man lxc man page
  but a short command line should work:
  ./autogen.sh && ./configure && make && sudo make install && sudo lxc-setcap
  preceded by ./autogen.sh if configure do not exist yet.

Getting help:

  when you find you need help, you can check out one of the two
  lxc mailing list archives and register if interested:
  https://lists.sourceforge.net/lists/listinfo/lxc-devel
  https://lists.sourceforge.net/lists/listinfo/lxc-users

Portability:

  lxc  is  still  in  development, so the command syntax and the API can
  change. The version 1.0.0 will be the frozen version.

  lxc is developed and tested on Linux since kernel mainline version 2.6.27
  (without network) and 2.6.29 with network isolation.
  It's compiled with gcc, and should work on most architectures as long as the
  required kernel features are available. This includes (but isn't limited to):
  i686, x86_64, ppc, ppc64, S390, armel and armhf.

AUTHOR
       Daniel Lezcano <daniel.lezcano@free.fr>

Seccomp with LXC
----------------

To restrict a container with seccomp, you must specify a profile which is
basically a whitelist of system calls it may execute.  In the container
config file, add a line like

lxc.seccomp = /var/lib/lxc/q1/seccomp.full

I created a usable (but basically worthless) seccomp.full file using

cat > seccomp.full << EOF
1
whitelist
EOF
for i in `seq 0 300`; do
    echo $i >> seccomp.full
done
for i in `seq 1024 1079`; do
    echo $i >> seccomp.full
done

 -- Serge Hallyn <serge.hallyn@ubuntu.com>  Fri, 27 Jul 2012 15:47:02 +0600