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
ad38dca1
Unverified
Commit
ad38dca1
authored
Apr 28, 2018
by
Christian Brauner
Committed by
GitHub
Apr 28, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2279 from kunkku/create-umask
do_lxcapi_create: set umask
parents
61068d39
51f0f73b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
lxccontainer.c
src/lxc/lxccontainer.c
+4
-0
No files found.
src/lxc/lxccontainer.c
View file @
ad38dca1
...
@@ -1698,6 +1698,7 @@ static bool do_lxcapi_create(struct lxc_container *c, const char *t,
...
@@ -1698,6 +1698,7 @@ static bool do_lxcapi_create(struct lxc_container *c, const char *t,
int
flags
,
char
*
const
argv
[])
int
flags
,
char
*
const
argv
[])
{
{
int
partial_fd
;
int
partial_fd
;
mode_t
mask
;
pid_t
pid
;
pid_t
pid
;
bool
ret
=
false
;
bool
ret
=
false
;
char
*
tpath
=
NULL
;
char
*
tpath
=
NULL
;
...
@@ -1770,6 +1771,8 @@ static bool do_lxcapi_create(struct lxc_container *c, const char *t,
...
@@ -1770,6 +1771,8 @@ static bool do_lxcapi_create(struct lxc_container *c, const char *t,
/* No need to get disk lock bc we have the partial lock. */
/* No need to get disk lock bc we have the partial lock. */
mask
=
umask
(
0022
);
/* Create the storage.
/* Create the storage.
* Note we can't do this in the same task as we use to execute the
* Note we can't do this in the same task as we use to execute the
* template because of the way zfs works.
* template because of the way zfs works.
...
@@ -1830,6 +1833,7 @@ static bool do_lxcapi_create(struct lxc_container *c, const char *t,
...
@@ -1830,6 +1833,7 @@ static bool do_lxcapi_create(struct lxc_container *c, const char *t,
ret
=
load_config_locked
(
c
,
c
->
configfile
);
ret
=
load_config_locked
(
c
,
c
->
configfile
);
out_unlock
:
out_unlock
:
umask
(
mask
);
if
(
partial_fd
>=
0
)
if
(
partial_fd
>=
0
)
remove_partial
(
c
,
partial_fd
);
remove_partial
(
c
,
partial_fd
);
out
:
out
:
...
...
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