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
f7591785
Unverified
Commit
f7591785
authored
Mar 19, 2020
by
Christian Brauner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
conf: don't accidently double-mount
Closes #3073. Signed-off-by:
Christian Brauner
<
christian.brauner@ubuntu.com
>
parent
3c9fdb32
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
6 deletions
+3
-6
conf.c
src/lxc/conf.c
+3
-6
No files found.
src/lxc/conf.c
View file @
f7591785
...
@@ -1847,17 +1847,15 @@ static int mount_entry(const char *fsname, const char *target,
...
@@ -1847,17 +1847,15 @@ static int mount_entry(const char *fsname, const char *target,
}
}
if
((
mountflags
&
MS_REMOUNT
)
||
(
mountflags
&
MS_BIND
))
{
if
((
mountflags
&
MS_REMOUNT
)
||
(
mountflags
&
MS_BIND
))
{
unsigned
long
r
q
d_flags
=
0
;
unsigned
long
r
equire
d_flags
=
0
;
DEBUG
(
"Remounting
\"
%s
\"
on
\"
%s
\"
to respect bind or remount options"
,
DEBUG
(
"Remounting
\"
%s
\"
on
\"
%s
\"
to respect bind or remount options"
,
srcpath
?
srcpath
:
"(none)"
,
target
?
target
:
"(none)"
);
srcpath
?
srcpath
:
"(none)"
,
target
?
target
:
"(none)"
);
if
(
mountflags
&
MS_RDONLY
)
if
(
mountflags
&
MS_RDONLY
)
r
q
d_flags
|=
MS_RDONLY
;
r
equire
d_flags
|=
MS_RDONLY
;
#ifdef HAVE_STATVFS
#ifdef HAVE_STATVFS
if
(
srcpath
&&
statvfs
(
srcpath
,
&
sb
)
==
0
)
{
if
(
srcpath
&&
statvfs
(
srcpath
,
&
sb
)
==
0
)
{
unsigned
long
required_flags
=
rqd_flags
;
if
(
sb
.
f_flag
&
MS_NOSUID
)
if
(
sb
.
f_flag
&
MS_NOSUID
)
required_flags
|=
MS_NOSUID
;
required_flags
|=
MS_NOSUID
;
...
@@ -1878,8 +1876,7 @@ static int mount_entry(const char *fsname, const char *target,
...
@@ -1878,8 +1876,7 @@ static int mount_entry(const char *fsname, const char *target,
* mountflags, then skip the remount.
* mountflags, then skip the remount.
*/
*/
if
(
!
(
mountflags
&
MS_REMOUNT
))
{
if
(
!
(
mountflags
&
MS_REMOUNT
))
{
if
(
!
(
required_flags
&
~
mountflags
)
&&
if
(
!
(
required_flags
&
~
mountflags
))
{
rqd_flags
==
0
)
{
DEBUG
(
"Mountflags already were %lu, skipping remount"
,
mountflags
);
DEBUG
(
"Mountflags already were %lu, skipping remount"
,
mountflags
);
goto
skipremount
;
goto
skipremount
;
}
}
...
...
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