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
a9910d89
Commit
a9910d89
authored
11 years ago
by
Cristian Toader
Browse files
Options
Downloads
Patches
Plain Diff
finalised fix on libevent open string issue
parent
c09b11b6
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/common/sandbox.c
+0
-9
0 additions, 9 deletions
src/common/sandbox.c
src/or/dns.c
+9
-3
9 additions, 3 deletions
src/or/dns.c
with
9 additions
and
12 deletions
src/common/sandbox.c
+
0
−
9
View file @
a9910d89
...
...
@@ -261,15 +261,6 @@ sb_open(scmp_filter_ctx ctx, sandbox_cfg_t *filter)
}
}
// todo remove when libevent fix
rc
=
seccomp_rule_add
(
ctx
,
SCMP_ACT_ALLOW
,
SCMP_SYS
(
open
),
1
,
SCMP_CMP
(
1
,
SCMP_CMP_EQ
,
O_RDONLY
|
O_LARGEFILE
|
O_CLOEXEC
));
if
(
rc
!=
0
)
{
log_err
(
LD_BUG
,
"(Sandbox) failed to add open syscall, received libseccomp "
"error %d"
,
rc
);
return
rc
;
}
// 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
));
...
...
This diff is collapsed.
Click to expand it.
src/or/dns.c
+
9
−
3
View file @
a9910d89
...
...
@@ -1444,13 +1444,14 @@ configure_nameservers(int force)
const
or_options_t
*
options
;
const
char
*
conf_fname
;
struct
stat
st
;
int
r
;
int
r
,
flags
;
options
=
get_options
();
conf_fname
=
options
->
ServerDNSResolvConfFile
;
#ifndef _WIN32
if
(
!
conf_fname
)
conf_fname
=
"/etc/resolv.conf"
;
#endif
flags
=
DNS_OPTIONS_ALL
;
if
(
!
the_evdns_base
)
{
if
(
!
(
the_evdns_base
=
evdns_base_new
(
tor_libevent_get_base
(),
0
)))
{
...
...
@@ -1492,9 +1493,14 @@ configure_nameservers(int force)
evdns_base_search_clear
(
the_evdns_base
);
evdns_base_clear_nameservers_and_suspend
(
the_evdns_base
);
}
if
(
flags
&
DNS_OPTION_HOSTSFILE
)
{
flags
^=
DNS_OPTION_HOSTSFILE
;
evdns_base_load_hosts
(
the_evdns_base
,
sandbox_intern_string
(
"/etc/resolv.conf"
));
}
log_info
(
LD_EXIT
,
"Parsing resolver configuration in '%s'"
,
conf_fname
);
if
((
r
=
evdns_base_resolv_conf_parse
(
the_evdns_base
,
DNS_OPTIONS_ALL
,
conf_fname
)))
{
if
((
r
=
evdns_base_resolv_conf_parse
(
the_evdns_base
,
flags
,
sandbox_intern_string
(
conf_fname
)))
)
{
log_warn
(
LD_EXIT
,
"Unable to parse '%s', or no nameservers in '%s' (%d)"
,
conf_fname
,
conf_fname
,
r
);
goto
err
;
...
...
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