Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
lxc
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
lxc
Commits
e60242ad
Commit
e60242ad
authored
Feb 23, 2016
by
Stéphane Graber
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #841 from brauner/2016-02-22/manpage_update
update manpages
parents
b450a79d
02e5d92b
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
27 additions
and
20 deletions
+27
-20
lxc-attach.sgml.in
doc/lxc-attach.sgml.in
+1
-1
lxc-clone.sgml.in
doc/lxc-clone.sgml.in
+7
-0
lxc-start-ephemeral.sgml.in
doc/lxc-start-ephemeral.sgml.in
+8
-0
lxc_ls.c
src/lxc/lxc_ls.c
+11
-19
No files found.
doc/lxc-attach.sgml.in
View file @
e60242ad
...
...
@@ -83,7 +83,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
specified namespaces of a container and ran a shell or the specified
command without allocating a pseudo terminal. This made them vulnerable to
input faking via a TIOCSTI <command>ioctl</command> call after switching
between userspace execution contexts with different privilege
l
levels. Newer
between userspace execution contexts with different privilege levels. Newer
versions of <command>lxc-attach</command> will try to allocate a pseudo
terminal master/slave pair and attach any standard file descriptors which
refer to a terminal to the slave side of the pseudo terminal before
...
...
doc/lxc-clone.sgml.in
View file @
e60242ad
...
...
@@ -275,6 +275,13 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
</para>
</refsect1>
<refsect1>
<title>Notes</title>
<para>
<command>lxc-clone</command> is superseded by <command>lxc-copy</command>.
</para>
</refsect1>
&seealso;
<refsect1>
...
...
doc/lxc-start-ephemeral.sgml.in
View file @
e60242ad
...
...
@@ -227,6 +227,14 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
</variablelist>
</refsect1>
<refsect1>
<title>Notes</title>
<para>
<command>lxc-start-ephemeral</command> is superseded by
<command>lxc-copy</command>.
</para>
</refsect1>
&seealso;
<refsect1>
...
...
src/lxc/lxc_ls.c
View file @
e60242ad
...
...
@@ -94,13 +94,6 @@ static void ls_field_width(const struct ls *l, const size_t size,
struct
lengths
*
lht
);
static
void
ls_free
(
struct
ls
*
l
,
size_t
size
);
static
void
ls_free_arr
(
char
**
arr
,
size_t
size
);
/*
* This is a very lenient function. It tries to gather as much information about
* a container as it can thereby skipping over possible failures (e.g. failed
* non-fatal strdup() or malloc() failures in functions it calls etc.). It will
* only bail if the minimum amount of information (name and state of the
* container) cannot be retrieved.
*/
static
int
ls_get
(
struct
ls
**
m
,
size_t
*
size
,
const
struct
lxc_arguments
*
args
,
const
char
*
basepath
,
const
char
*
parent
,
unsigned
int
lvl
,
char
**
lockpath
,
size_t
len_lockpath
,
char
**
grps_must
,
...
...
@@ -490,7 +483,7 @@ static int ls_get(struct ls **m, size_t *size, const struct lxc_arguments *args,
if
(
args
->
ls_nesting
&&
running
)
{
struct
wrapargs
wargs
=
(
struct
wrapargs
){.
args
=
NULL
};
/* Open a socket so that the child can communicate with us. */
check
=
socketpair
(
P
F_LOCAL
,
SOCK_STREAM
|
SOCK_CLOEXEC
,
0
,
wargs
.
pipefd
);
check
=
socketpair
(
A
F_LOCAL
,
SOCK_STREAM
|
SOCK_CLOEXEC
,
0
,
wargs
.
pipefd
);
if
(
check
==
-
1
)
goto
put_and_next
;
...
...
@@ -508,7 +501,7 @@ static int ls_get(struct ls **m, size_t *size, const struct lxc_arguments *args,
aopt
.
env_policy
=
LXC_ATTACH_CLEAR_ENV
;
/* fork(): Attach to the namespace of the container and
* run ls_get() in it which is called in
*
ls_get_wrapper(). */
* run ls_get() in it which is called in ls_get_wrapper(). */
check
=
c
->
attach
(
c
,
ls_get_wrapper
,
&
wargs
,
&
aopt
,
&
out
);
/* close the socket */
close
(
wargs
.
pipefd
[
1
]);
...
...
@@ -667,9 +660,9 @@ static double ls_get_swap(struct lxc_container *c)
if
(
!
swap
)
goto
out
;
swap
=
1
+
swap
+
4
+
1
;
//
'\n' + tmp + swap
+ ' '
swap
=
1
+
swap
+
4
+
1
;
//
start_of_swap_value = '\n' + strlen(swap)
+ ' '
char
*
tmp
=
strchr
(
swap
,
'\n'
);
char
*
tmp
=
strchr
(
swap
,
'\n'
);
// find end of swap value
if
(
!
tmp
)
goto
out
;
...
...
@@ -923,11 +916,11 @@ static int my_parser(struct lxc_arguments *args, int c, char *arg)
case
LS_NESTING
:
/* In case strtoul() receives a string that represents a
* negative number it will return ULONG_MAX - the number that
*
string represents if the number the string represents is <
*
ULONG_MAX and ULONG_MAX otherwise. But it will consider this
*
valid input and not set errno. So we check manually if the
*
first character of num_string == '-'. Otherwise the default
* level remains set. */
*
the string represents if the number the string represents is
*
< ULONG_MAX and ULONG_MAX otherwise. But it will consider
*
this valid input and not set errno. So we check manually if
*
the first character of num_string == '-'. Otherwise the
*
default
level remains set. */
if
(
arg
&&
!
(
*
arg
==
'-'
))
{
errno
=
0
;
m
=
strtoul
(
arg
,
&
invalid
,
0
);
...
...
@@ -962,8 +955,7 @@ static int ls_get_wrapper(void *wrap)
close
(
wargs
->
pipefd
[
0
]);
/* &(char *){NULL} is no magic. It's just a compound literal which
* avoids having a pointless variable in main() that serves no purpose
* here. */
* allows us to avoid keeping a pointless variable around. */
ls_get
(
&
m
,
&
len
,
wargs
->
args
,
""
,
wargs
->
parent
,
wargs
->
nestlvl
,
&
(
char
*
){
NULL
},
0
,
wargs
->
grps_must
,
wargs
->
grps_must_len
);
if
(
!
m
)
goto
out
;
...
...
@@ -992,7 +984,7 @@ static int ls_remove_lock(const char *path, const char *name,
{
/* Avoid doing unnecessary work if we can. */
if
(
recalc
)
{
size_t
newlen
=
strlen
(
path
)
+
strlen
(
name
)
+
strlen
(
RUNTIME_PATH
)
+
/* /
+lxc+/+lock+/+/
= */
11
+
1
;
size_t
newlen
=
strlen
(
path
)
+
strlen
(
name
)
+
strlen
(
RUNTIME_PATH
)
+
/* /
+ lxc + / + lock + / + /
= */
11
+
1
;
if
(
newlen
>
*
len_lockpath
)
{
char
*
tmp
=
realloc
(
*
lockpath
,
newlen
*
2
);
if
(
!
tmp
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment