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
6778323d
Unverified
Commit
6778323d
authored
Oct 15, 2020
by
Christian Brauner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
seccomp: improve default notification sending
Signed-off-by:
Christian Brauner
<
christian.brauner@ubuntu.com
>
parent
95cc56cd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
seccomp.c
src/lxc/seccomp.c
+8
-2
No files found.
src/lxc/seccomp.c
View file @
6778323d
...
@@ -1347,9 +1347,14 @@ static void seccomp_notify_default_answer(int fd, struct seccomp_notif *req,
...
@@ -1347,9 +1347,14 @@ static void seccomp_notify_default_answer(int fd, struct seccomp_notif *req,
{
{
resp
->
id
=
req
->
id
;
resp
->
id
=
req
->
id
;
resp
->
error
=
-
ENOSYS
;
resp
->
error
=
-
ENOSYS
;
resp
->
val
=
0
;
resp
->
flags
=
0
;
if
(
seccomp_notify_respond
(
fd
,
resp
))
if
(
seccomp_notify_respond
(
fd
,
resp
))
SYSERROR
(
"Failed to send default message to seccomp"
);
SYSERROR
(
"Failed to send default message to seccomp notification with id(%llu)"
,
resp
->
id
);
else
TRACE
(
"Sent default response for seccomp notification with id(%llu)"
,
resp
->
id
);
memset
(
resp
,
0
,
handler
->
conf
->
seccomp
.
notifier
.
sizes
.
seccomp_notif_resp
);
}
}
#endif
#endif
...
@@ -1385,7 +1390,7 @@ int seccomp_notify_handler(int fd, uint32_t events, void *data,
...
@@ -1385,7 +1390,7 @@ int seccomp_notify_handler(int fd, uint32_t events, void *data,
return
log_trace
(
0
,
"Removing seccomp notifier fd %d"
,
fd
);
return
log_trace
(
0
,
"Removing seccomp notifier fd %d"
,
fd
);
}
}
memset
(
req
,
0
,
sizeof
(
*
req
)
);
memset
(
req
,
0
,
conf
->
seccomp
.
notifier
.
sizes
.
seccomp_notif
);
ret
=
seccomp_notify_receive
(
fd
,
req
);
ret
=
seccomp_notify_receive
(
fd
,
req
);
if
(
ret
)
{
if
(
ret
)
{
SYSERROR
(
"Failed to read seccomp notification"
);
SYSERROR
(
"Failed to read seccomp notification"
);
...
@@ -1516,6 +1521,7 @@ retry:
...
@@ -1516,6 +1521,7 @@ retry:
SYSERROR
(
"Failed to send seccomp notification"
);
SYSERROR
(
"Failed to send seccomp notification"
);
else
else
TRACE
(
"Sent response for seccomp notification with id(%llu)"
,
resp
->
id
);
TRACE
(
"Sent response for seccomp notification with id(%llu)"
,
resp
->
id
);
memset
(
resp
,
0
,
conf
->
seccomp
.
notifier
.
sizes
.
seccomp_notif_resp
);
out:
out:
#endif
#endif
...
...
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