attach_options.h File Reference

#include <sys/types.h>
Include dependency graph for attach_options.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  lxc_attach_options_t
struct  lxc_attach_command_t

Defines

#define LXC_ATTACH_LSM   (LXC_ATTACH_LSM_EXEC | LXC_ATTACH_LSM_NOW)
#define LXC_ATTACH_OPTIONS_DEFAULT

Typedefs

typedef int(* lxc_attach_exec_t )(void *payload)

Enumerations

enum  lxc_attach_env_policy_t { LXC_ATTACH_KEEP_ENV, LXC_ATTACH_CLEAR_ENV }
enum  {
  LXC_ATTACH_MOVE_TO_CGROUP = 0x00000001, LXC_ATTACH_DROP_CAPABILITIES = 0x00000002, LXC_ATTACH_SET_PERSONALITY = 0x00000004, LXC_ATTACH_LSM_EXEC = 0x00000008,
  LXC_ATTACH_REMOUNT_PROC_SYS = 0x00010000, LXC_ATTACH_LSM_NOW = 0x00020000, LXC_ATTACH_DEFAULT = 0x0000FFFF
}

Functions

int lxc_attach_run_command (void *payload)
 Run a command in the container.
int lxc_attach_run_shell (void *payload)
 Run a shell command in the container.

Detailed Description

lxc: linux Container library

(C) Copyright IBM Corp. 2007, 2008

Authors: Daniel Lezcano <daniel.lezcano at free.fr>

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA


Define Documentation

#define LXC_ATTACH_LSM   (LXC_ATTACH_LSM_EXEC | LXC_ATTACH_LSM_NOW)

All Linux Security Module flags

#define LXC_ATTACH_OPTIONS_DEFAULT
Value:
{ \
        /* .attach_flags = */   LXC_ATTACH_DEFAULT, \
        /* .namespaces = */     -1, \
        /* .personality = */    -1, \
        /* .initial_cwd = */    NULL, \
        /* .uid = */            (uid_t)-1, \
        /* .gid = */            (gid_t)-1, \
        /* .env_policy = */     LXC_ATTACH_KEEP_ENV, \
        /* .extra_env_vars = */ NULL, \
        /* .extra_keep_env = */ NULL, \
        /* .stdin_fd = */       0, 1, 2 \
    }

Default attach options to use


Typedef Documentation

typedef int(* lxc_attach_exec_t)(void *payload)

LXC attach function type.

Function to run in container.

Parameters:
payload lxc_attach_command_t to run.
Returns:
Function should return 0 on success, and any other value to denote failure.

Enumeration Type Documentation

anonymous enum
Enumerator:
LXC_ATTACH_MOVE_TO_CGROUP 

Move to cgroup.

LXC_ATTACH_DROP_CAPABILITIES 

Drop capabilities.

LXC_ATTACH_SET_PERSONALITY 

Set personality.

LXC_ATTACH_LSM_EXEC 

Execute under a Linux Security Module.

LXC_ATTACH_REMOUNT_PROC_SYS 

Remount /proc filesystem.

LXC_ATTACH_LSM_NOW 

FIXME: unknown.

LXC_ATTACH_DEFAULT 

Mask of flags to apply by default.

LXC environment policy.

Enumerator:
LXC_ATTACH_KEEP_ENV 

Retain the environment.

LXC_ATTACH_CLEAR_ENV 

Clear the environment.


Function Documentation

int lxc_attach_run_command ( void *  payload  ) 

Run a command in the container.

Parameters:
payload lxc_attach_command_t to run.
Returns:
-1 on error, exit code of lxc_attach_command_t program on success.
int lxc_attach_run_shell ( void *  payload  ) 

Run a shell command in the container.

Parameters:
payload Not used.
Returns:
Exit code of shell.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines

Generated on 20 Oct 2017 for LXC by  doxygen 1.6.1