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
37fcb9bc
Unverified
Commit
37fcb9bc
authored
Apr 09, 2020
by
Christian Brauner
Committed by
Stéphane Graber
Apr 09, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
conf: use macros all around in lxc_map_ids()
Signed-off-by:
Christian Brauner
<
christian.brauner@ubuntu.com
>
parent
3b7f02fa
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
12 deletions
+3
-12
conf.c
src/lxc/conf.c
+3
-12
No files found.
src/lxc/conf.c
View file @
37fcb9bc
...
...
@@ -2679,19 +2679,10 @@ int lxc_map_ids(struct lxc_list *idmap, pid_t pid)
struct
id_map
*
map
;
struct
lxc_list
*
iterator
;
enum
idtype
type
;
/* strlen("new@idmap") = 9
* +
* strlen(" ") = 1
* +
* INTTYPE_TO_STRLEN(uint32_t)
* +
* strlen(" ") = 1
*
* We add some additional space to make sure that we really have
* LXC_IDMAPLEN bytes available for our the {g,u]id mapping.
*/
int
ret
=
0
,
gidmap
=
0
,
uidmap
=
0
;
char
mapbuf
[
9
+
1
+
INTTYPE_TO_STRLEN
(
uint32_t
)
+
1
+
LXC_IDMAPLEN
]
=
{
0
};
char
mapbuf
[
STRLITERALLEN
(
"new@idmap"
)
+
STRLITERALLEN
(
" "
)
+
INTTYPE_TO_STRLEN
(
pid_t
)
+
STRLITERALLEN
(
" "
)
+
LXC_IDMAPLEN
]
=
{
0
};
bool
had_entry
=
false
,
use_shadow
=
false
;
int
hostuid
,
hostgid
;
...
...
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