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
03700cab
Unverified
Commit
03700cab
authored
Feb 28, 2018
by
Christian Brauner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
terminal: lxc_terminal_map_ids()
Signed-off-by:
Christian Brauner
<
christian.brauner@ubuntu.com
>
parent
d049f0e9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
6 deletions
+5
-6
terminal.c
src/lxc/terminal.c
+5
-6
No files found.
src/lxc/terminal.c
View file @
03700cab
...
...
@@ -1188,24 +1188,23 @@ void lxc_terminal_conf_free(struct lxc_terminal *terminal)
lxc_ringbuf_release
(
&
terminal
->
ringbuf
);
}
int
lxc_terminal_map_ids
(
struct
lxc_conf
*
c
,
struct
lxc_terminal
*
pty
)
int
lxc_terminal_map_ids
(
struct
lxc_conf
*
c
,
struct
lxc_terminal
*
terminal
)
{
int
ret
;
if
(
lxc_list_empty
(
&
c
->
id_map
))
return
0
;
ret
=
strcmp
(
pty
->
name
,
""
);
if
(
ret
==
0
)
if
(
strcmp
(
terminal
->
name
,
""
)
==
0
)
return
0
;
ret
=
chown_mapped_root
(
pty
->
name
,
c
);
ret
=
chown_mapped_root
(
terminal
->
name
,
c
);
if
(
ret
<
0
)
{
ERROR
(
"Failed to chown
\"
%s
\"
"
,
pty
->
name
);
ERROR
(
"Failed to chown
terminal
\"
%s
\"
"
,
terminal
->
name
);
return
-
1
;
}
TRACE
(
"Chowned
\"
%s
\"
"
,
pty
->
name
);
TRACE
(
"Chowned
terminal
\"
%s
\"
"
,
terminal
->
name
);
return
0
;
}
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