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
b61757b3
Unverified
Commit
b61757b3
authored
Mar 26, 2021
by
Christian Brauner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
log: dont create log file for fuzz builds
Fixes: #3730 Fixes:
https://github.com/google/oss-fuzz/issues/5509
Signed-off-by:
Christian Brauner
<
christian.brauner@ubuntu.com
>
parent
e9eaf130
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
log.c
src/lxc/log.c
+3
-3
No files found.
src/lxc/log.c
View file @
b61757b3
...
...
@@ -513,8 +513,9 @@ static int build_dir(const char *name)
static
int
log_open
(
const
char
*
name
)
{
int
newfd
=
-
EBADF
;
#ifndef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
__do_close
int
fd
=
-
EBADF
;
int
newfd
;
fd
=
lxc_unpriv
(
open
(
name
,
O_CREAT
|
O_WRONLY
|
O_APPEND
|
O_CLOEXEC
,
0660
));
if
(
fd
<
0
)
...
...
@@ -526,7 +527,7 @@ static int log_open(const char *name)
newfd
=
fcntl
(
fd
,
F_DUPFD_CLOEXEC
,
STDERR_FILENO
);
if
(
newfd
<
0
)
return
log_error_errno
(
-
errno
,
errno
,
"Failed to dup log fd %d"
,
fd
);
#endif
/* !FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
return
newfd
;
}
...
...
@@ -821,7 +822,6 @@ int lxc_log_set_file(int *fd, const char *fname)
*
fd
=
log_open
(
fname
);
if
(
*
fd
<
0
)
return
-
errno
;
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