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
aeff7df6
Unverified
Commit
aeff7df6
authored
Apr 12, 2021
by
Stéphane Graber
Committed by
GitHub
Apr 12, 2021
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3779 from brauner/2021-04-12/attach_fixes
attach: fixes
parents
d32dcd01
09a83db5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
9 deletions
+4
-9
attach.c
src/lxc/attach.c
+4
-6
rexec.c
src/lxc/rexec.c
+0
-3
No files found.
src/lxc/attach.c
View file @
aeff7df6
...
...
@@ -534,9 +534,6 @@ static int __prepare_namespaces_pidfd(struct attach_context *ctx)
for
(
int
i
=
0
;
i
<
LXC_NS_MAX
;
i
++
)
{
int
ret
;
if
(
!
(
ctx
->
ns_inherited
&
ns_info
[
i
].
clone_flag
))
continue
;
ret
=
same_nsfd
(
ctx
->
dfd_self_pid
,
ctx
->
dfd_init_pid
,
ns_info
[
i
].
proc_path
);
...
...
@@ -545,10 +542,11 @@ static int __prepare_namespaces_pidfd(struct attach_context *ctx)
__fallthrough
;
case
1
:
ctx
->
ns_inherited
&=
~
ns_info
[
i
].
clone_flag
;
break
;
TRACE
(
"Shared %s namespace doesn't need attach"
,
ns_info
[
i
].
proc_name
);
continue
;
case
0
:
TRACE
(
"
Shared
%s namespace needs attach"
,
ns_info
[
i
].
proc_name
);
break
;
TRACE
(
"
Different
%s namespace needs attach"
,
ns_info
[
i
].
proc_name
);
continue
;
}
return
syserror
(
"Failed to determine whether %s namespace is shared"
,
...
...
src/lxc/rexec.c
View file @
aeff7df6
...
...
@@ -162,9 +162,6 @@ static void lxc_rexec_as_memfd(char **argv, char **envp, const char *memfd_name)
if
(
execfd
<
0
)
return
;
ret
=
close_range
(
STDERR_FILENO
+
1
,
MAX_FILENO
,
CLOSE_RANGE_CLOEXEC
);
if
(
ret
&&
(
errno
!=
ENOSYS
&&
errno
!=
EINVAL
))
fprintf
(
stderr
,
"%m - Failed to mark all file descriptors as close-on-exec
\n
"
);
fexecve
(
execfd
,
argv
,
envp
);
}
...
...
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