Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
Tor
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
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
Benjamin J. Thompson
Tor
Commits
71612f00
Commit
71612f00
authored
11 years ago
by
Cristian Toader
Browse files
Options
Downloads
Patches
Plain Diff
fixed openssl open syscall, fixed sandbox_getaddrinfo
parent
36aeca0e
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/common/sandbox.c
+12
-8
12 additions, 8 deletions
src/common/sandbox.c
with
12 additions
and
8 deletions
src/common/sandbox.c
+
12
−
8
View file @
71612f00
...
...
@@ -264,13 +264,13 @@ sb_open(scmp_filter_ctx ctx, sandbox_cfg_t *filter)
}
// problem: required by getaddrinfo
//
rc = seccomp_rule_add(ctx, SCMP_ACT_
ALLOW
, SCMP_SYS(open), 1,
//
SCMP_CMP(1, SCMP_CMP_EQ, O_RDONLY|O_CLOEXEC));
//
if (rc != 0) {
//
log_err(LD_BUG,"(Sandbox) failed to add open syscall, received libseccomp "
//
"error %d", rc);
//
return rc;
//
}
rc
=
seccomp_rule_add
(
ctx
,
SCMP_ACT_
ERRNO
(
1
)
,
SCMP_SYS
(
open
),
1
,
SCMP_CMP
(
1
,
SCMP_CMP_EQ
,
O_RDONLY
|
O_CLOEXEC
));
if
(
rc
!=
0
)
{
log_err
(
LD_BUG
,
"(Sandbox) failed to add open syscall, received libseccomp "
"error %d"
,
rc
);
return
rc
;
}
return
0
;
}
...
...
@@ -872,6 +872,10 @@ int sandbox_getaddrinfo(const char *name, struct addrinfo **res)
return
-
2
;
}
*
res
=
NULL
;
*
res
=
(
struct
addrinfo
*
)
malloc
(
sizeof
(
struct
addrinfo
));
if
(
!
res
)
{
return
-
2
;
}
if
(
gethostname
(
hname
,
sizeof
(
hname
))
<
0
)
{
return
-
1
;
...
...
@@ -882,7 +886,7 @@ int sandbox_getaddrinfo(const char *name, struct addrinfo **res)
return
-
1
;
}
*
res
=
sb_addr_info
;
memcpy
(
*
res
,
sb_addr_info
,
sizeof
(
struct
addrinfo
))
;
return
0
;
}
...
...
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