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
4484e6f8
Commit
4484e6f8
authored
Jan 04, 2017
by
Stéphane Graber
Committed by
GitHub
Jan 04, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1379 from brauner/2017-01-04/fix_android
tools: only check for O_RDONLY
parents
4d690b8c
37180208
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
5 additions
and
5 deletions
+5
-5
lxc_attach.c
src/lxc/tools/lxc_attach.c
+1
-1
lxc_copy.c
src/lxc/tools/lxc_copy.c
+1
-1
lxc_create.c
src/lxc/tools/lxc_create.c
+1
-1
lxc_snapshot.c
src/lxc/tools/lxc_snapshot.c
+1
-1
lxc_start.c
src/lxc/tools/lxc_start.c
+1
-1
No files found.
src/lxc/tools/lxc_attach.c
View file @
4484e6f8
...
@@ -396,7 +396,7 @@ int main(int argc, char *argv[])
...
@@ -396,7 +396,7 @@ int main(int argc, char *argv[])
lxc_log_options_no_override
();
lxc_log_options_no_override
();
if
(
geteuid
())
{
if
(
geteuid
())
{
if
(
access
(
my_args
.
lxcpath
[
0
],
O_RD
WR
)
<
0
)
{
if
(
access
(
my_args
.
lxcpath
[
0
],
O_RD
ONLY
)
<
0
)
{
if
(
!
my_args
.
quiet
)
if
(
!
my_args
.
quiet
)
fprintf
(
stderr
,
"You lack access to %s
\n
"
,
my_args
.
lxcpath
[
0
]);
fprintf
(
stderr
,
"You lack access to %s
\n
"
,
my_args
.
lxcpath
[
0
]);
exit
(
EXIT_FAILURE
);
exit
(
EXIT_FAILURE
);
...
...
src/lxc/tools/lxc_copy.c
View file @
4484e6f8
...
@@ -184,7 +184,7 @@ int main(int argc, char *argv[])
...
@@ -184,7 +184,7 @@ int main(int argc, char *argv[])
lxc_log_options_no_override
();
lxc_log_options_no_override
();
if
(
geteuid
())
{
if
(
geteuid
())
{
if
(
access
(
my_args
.
lxcpath
[
0
],
O_RD
WR
)
<
0
)
{
if
(
access
(
my_args
.
lxcpath
[
0
],
O_RD
ONLY
)
<
0
)
{
if
(
!
my_args
.
quiet
)
if
(
!
my_args
.
quiet
)
fprintf
(
stderr
,
"You lack access to %s
\n
"
,
my_args
.
lxcpath
[
0
]);
fprintf
(
stderr
,
"You lack access to %s
\n
"
,
my_args
.
lxcpath
[
0
]);
exit
(
ret
);
exit
(
ret
);
...
...
src/lxc/tools/lxc_create.c
View file @
4484e6f8
...
@@ -252,7 +252,7 @@ int main(int argc, char *argv[])
...
@@ -252,7 +252,7 @@ int main(int argc, char *argv[])
if
(
mkdir_p
(
my_args
.
lxcpath
[
0
],
0755
))
{
if
(
mkdir_p
(
my_args
.
lxcpath
[
0
],
0755
))
{
exit
(
EXIT_FAILURE
);
exit
(
EXIT_FAILURE
);
}
}
if
(
access
(
my_args
.
lxcpath
[
0
],
O_RD
WR
)
<
0
)
{
if
(
access
(
my_args
.
lxcpath
[
0
],
O_RD
ONLY
)
<
0
)
{
fprintf
(
stderr
,
"You lack access to %s
\n
"
,
my_args
.
lxcpath
[
0
]);
fprintf
(
stderr
,
"You lack access to %s
\n
"
,
my_args
.
lxcpath
[
0
]);
exit
(
EXIT_FAILURE
);
exit
(
EXIT_FAILURE
);
}
}
...
...
src/lxc/tools/lxc_snapshot.c
View file @
4484e6f8
...
@@ -95,7 +95,7 @@ int main(int argc, char *argv[])
...
@@ -95,7 +95,7 @@ int main(int argc, char *argv[])
lxc_log_options_no_override
();
lxc_log_options_no_override
();
if
(
geteuid
())
{
if
(
geteuid
())
{
if
(
access
(
my_args
.
lxcpath
[
0
],
O_RD
WR
)
<
0
)
{
if
(
access
(
my_args
.
lxcpath
[
0
],
O_RD
ONLY
)
<
0
)
{
fprintf
(
stderr
,
"You lack access to %s
\n
"
,
fprintf
(
stderr
,
"You lack access to %s
\n
"
,
my_args
.
lxcpath
[
0
]);
my_args
.
lxcpath
[
0
]);
exit
(
EXIT_FAILURE
);
exit
(
EXIT_FAILURE
);
...
...
src/lxc/tools/lxc_start.c
View file @
4484e6f8
...
@@ -231,7 +231,7 @@ int main(int argc, char *argv[])
...
@@ -231,7 +231,7 @@ int main(int argc, char *argv[])
exit
(
err
);
exit
(
err
);
lxc_log_options_no_override
();
lxc_log_options_no_override
();
if
(
access
(
my_args
.
lxcpath
[
0
],
O_RD
WR
)
<
0
)
{
if
(
access
(
my_args
.
lxcpath
[
0
],
O_RD
ONLY
)
<
0
)
{
if
(
!
my_args
.
quiet
)
if
(
!
my_args
.
quiet
)
fprintf
(
stderr
,
"You lack access to %s
\n
"
,
my_args
.
lxcpath
[
0
]);
fprintf
(
stderr
,
"You lack access to %s
\n
"
,
my_args
.
lxcpath
[
0
]);
exit
(
err
);
exit
(
err
);
...
...
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