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
0125a899
Unverified
Commit
0125a899
authored
Mar 18, 2021
by
Christian Brauner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
conf: tweak parse_lxc_mntopts()
Signed-off-by:
Christian Brauner
<
christian.brauner@ubuntu.com
>
parent
4f0e0186
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
3 deletions
+1
-3
conf.c
src/lxc/conf.c
+1
-3
No files found.
src/lxc/conf.c
View file @
0125a899
...
...
@@ -2123,9 +2123,8 @@ const char *lxc_mount_options_info[LXC_MOUNT_MAX] = {
/* Remove "optional", "create=dir", and "create=file" from mntopt */
int
parse_lxc_mntopts
(
struct
lxc_mount_options
*
opts
,
char
*
mnt_opts
)
{
__do_close
int
fd_userns
=
-
EBADF
;
for
(
size_t
i
=
LXC_MOUNT_CREATE_DIR
;
i
<
LXC_MOUNT_MAX
;
i
++
)
{
__do_close
int
fd_userns
=
-
EBADF
;
const
char
*
opt_name
=
lxc_mount_options_info
[
i
];
size_t
len
;
char
*
idmap_path
,
*
p
,
*
p2
;
...
...
@@ -2159,7 +2158,6 @@ int parse_lxc_mntopts(struct lxc_mount_options *opts, char *mnt_opts)
if
(
is_empty_string
(
opts
->
userns_path
))
return
syserror_set
(
-
EINVAL
,
"Missing idmap path for
\"
idmap=<path>
\"
LXC specific mount option"
);
close_prot_errno_disarm
(
fd_userns
);
fd_userns
=
open
(
opts
->
userns_path
,
O_RDONLY
|
O_NOCTTY
|
O_CLOEXEC
);
if
(
fd_userns
<
0
)
return
syserror
(
"Failed to open user namespace"
);
...
...
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