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
339efad9
Unverified
Commit
339efad9
authored
Jun 03, 2017
by
Christian Brauner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
conf: non-functional changes
Signed-off-by:
Christian Brauner
<
christian.brauner@ubuntu.com
>
parent
77803ee7
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
5 deletions
+5
-5
conf.c
src/lxc/conf.c
+2
-2
conf.h
src/lxc/conf.h
+1
-1
lxccontainer.c
src/lxc/lxccontainer.c
+2
-2
No files found.
src/lxc/conf.c
View file @
339efad9
...
@@ -3618,7 +3618,7 @@ int mapped_hostid(unsigned id, struct lxc_conf *conf, enum idtype idtype)
...
@@ -3618,7 +3618,7 @@ int mapped_hostid(unsigned id, struct lxc_conf *conf, enum idtype idtype)
return
-
1
;
return
-
1
;
}
}
int
find_unmapped_ns
u
id
(
struct
lxc_conf
*
conf
,
enum
idtype
idtype
)
int
find_unmapped_nsid
(
struct
lxc_conf
*
conf
,
enum
idtype
idtype
)
{
{
struct
lxc_list
*
it
;
struct
lxc_list
*
it
;
struct
id_map
*
map
;
struct
id_map
*
map
;
...
@@ -4684,7 +4684,7 @@ static int run_userns_fn(void *data)
...
@@ -4684,7 +4684,7 @@ static int run_userns_fn(void *data)
return
d
->
fn
(
d
->
arg
);
return
d
->
fn
(
d
->
arg
);
}
}
static
struct
id_map
*
mapped_hostid_entry
(
unsigned
id
,
struct
lxc_conf
*
conf
,
static
struct
id_map
*
mapped_hostid_entry
(
struct
lxc_conf
*
conf
,
unsigned
id
,
enum
idtype
idtype
)
enum
idtype
idtype
)
{
{
struct
lxc_list
*
it
;
struct
lxc_list
*
it
;
...
...
src/lxc/conf.h
View file @
339efad9
...
@@ -469,7 +469,7 @@ extern int setup_resource_limits(struct lxc_list *limits, pid_t pid);
...
@@ -469,7 +469,7 @@ extern int setup_resource_limits(struct lxc_list *limits, pid_t pid);
extern
void
lxc_restore_phys_nics_to_netns
(
int
netnsfd
,
struct
lxc_conf
*
conf
);
extern
void
lxc_restore_phys_nics_to_netns
(
int
netnsfd
,
struct
lxc_conf
*
conf
);
extern
int
find_unmapped_ns
u
id
(
struct
lxc_conf
*
conf
,
enum
idtype
idtype
);
extern
int
find_unmapped_nsid
(
struct
lxc_conf
*
conf
,
enum
idtype
idtype
);
extern
int
mapped_hostid
(
unsigned
id
,
struct
lxc_conf
*
conf
,
enum
idtype
idtype
);
extern
int
mapped_hostid
(
unsigned
id
,
struct
lxc_conf
*
conf
,
enum
idtype
idtype
);
extern
int
chown_mapped_root
(
char
*
path
,
struct
lxc_conf
*
conf
);
extern
int
chown_mapped_root
(
char
*
path
,
struct
lxc_conf
*
conf
);
extern
int
ttys_shift_ids
(
struct
lxc_conf
*
c
);
extern
int
ttys_shift_ids
(
struct
lxc_conf
*
c
);
...
...
src/lxc/lxccontainer.c
View file @
339efad9
...
@@ -1220,7 +1220,7 @@ static bool create_run_template(struct lxc_container *c, char *tpath, bool need_
...
@@ -1220,7 +1220,7 @@ static bool create_run_template(struct lxc_container *c, char *tpath, bool need_
if
(
!
n2
)
if
(
!
n2
)
exit
(
1
);
exit
(
1
);
if
(
hostid_mapped
<
0
)
{
if
(
hostid_mapped
<
0
)
{
hostid_mapped
=
find_unmapped_ns
u
id
(
conf
,
ID_TYPE_UID
);
hostid_mapped
=
find_unmapped_nsid
(
conf
,
ID_TYPE_UID
);
n2
[
n2args
++
]
=
"-m"
;
n2
[
n2args
++
]
=
"-m"
;
if
(
hostid_mapped
<
0
)
{
if
(
hostid_mapped
<
0
)
{
ERROR
(
"Could not find free uid to map"
);
ERROR
(
"Could not find free uid to map"
);
...
@@ -1244,7 +1244,7 @@ static bool create_run_template(struct lxc_container *c, char *tpath, bool need_
...
@@ -1244,7 +1244,7 @@ static bool create_run_template(struct lxc_container *c, char *tpath, bool need_
if
(
!
n2
)
if
(
!
n2
)
exit
(
1
);
exit
(
1
);
if
(
hostgid_mapped
<
0
)
{
if
(
hostgid_mapped
<
0
)
{
hostgid_mapped
=
find_unmapped_ns
u
id
(
conf
,
ID_TYPE_GID
);
hostgid_mapped
=
find_unmapped_nsid
(
conf
,
ID_TYPE_GID
);
n2
[
n2args
++
]
=
"-m"
;
n2
[
n2args
++
]
=
"-m"
;
if
(
hostgid_mapped
<
0
)
{
if
(
hostgid_mapped
<
0
)
{
ERROR
(
"Could not find free uid to map"
);
ERROR
(
"Could not find free uid to map"
);
...
...
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