Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Tor
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Container Registry
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
The Tor Project
Core
Tor
Commits
97330ced
Commit
97330ced
authored
9 years ago
by
Nick Mathewson
Browse files
Options
Downloads
Patches
Plain Diff
Fix sandbox use with systemd. bug 16212.
parent
8ca3773f
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
changes/bug16212
+5
-0
5 additions, 0 deletions
changes/bug16212
src/common/sandbox.c
+10
-0
10 additions, 0 deletions
src/common/sandbox.c
with
15 additions
and
0 deletions
changes/bug16212
0 → 100644
+
5
−
0
View file @
97330ced
o Minor bugfixes (sandbox, systemd):
- Allow systemd connections to work with the Linux seccomp2 sandbox
code. Fixes bug 16212; bugfix on 0.2.6.2-alpha.
Patch by Peter Palfrader.
This diff is collapsed.
Click to expand it.
src/common/sandbox.c
+
10
−
0
View file @
97330ced
...
...
@@ -170,6 +170,7 @@ static int filter_nopar_gen[] = {
SCMP_SYS
(
read
),
SCMP_SYS
(
rt_sigreturn
),
SCMP_SYS
(
sched_getaffinity
),
SCMP_SYS
(
sendmsg
),
SCMP_SYS
(
set_robust_list
),
#ifdef __NR_sigreturn
SCMP_SYS
(
sigreturn
),
...
...
@@ -547,6 +548,15 @@ sb_socket(scmp_filter_ctx ctx, sandbox_cfg_t *filter)
SCMP_CMP
(
0
,
SCMP_CMP_EQ
,
PF_UNIX
),
SCMP_CMP_MASKED
(
1
,
SOCK_CLOEXEC
|
SOCK_NONBLOCK
,
SOCK_STREAM
),
SCMP_CMP
(
2
,
SCMP_CMP_EQ
,
0
));
if
(
rc
)
return
rc
;
rc
=
seccomp_rule_add_3
(
ctx
,
SCMP_ACT_ALLOW
,
SCMP_SYS
(
socket
),
SCMP_CMP
(
0
,
SCMP_CMP_EQ
,
PF_UNIX
),
SCMP_CMP_MASKED
(
1
,
SOCK_CLOEXEC
|
SOCK_NONBLOCK
,
SOCK_DGRAM
),
SCMP_CMP
(
2
,
SCMP_CMP_EQ
,
0
));
if
(
rc
)
return
rc
;
rc
=
seccomp_rule_add_3
(
ctx
,
SCMP_ACT_ALLOW
,
SCMP_SYS
(
socket
),
SCMP_CMP
(
0
,
SCMP_CMP_EQ
,
PF_NETLINK
),
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment