mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-28 14:23:30 +01:00
Make sure sandbox-related getaddrinfo() functions always exist.
This commit is contained in:
parent
e420154ce7
commit
eaff47352a
@ -421,4 +421,13 @@ tor_make_getaddrinfo_cache_active(void)
|
|||||||
{
|
{
|
||||||
sandbox_getaddrinfo_is_active = 1;
|
sandbox_getaddrinfo_is_active = 1;
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
void
|
||||||
|
sandbox_disable_getaddrinfo_cache(void)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
void
|
||||||
|
tor_make_getaddrinfo_cache_active(void)
|
||||||
|
{
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -42,7 +42,6 @@ int tor_getaddrinfo(const char *name, const char *servname,
|
|||||||
struct addrinfo **res);
|
struct addrinfo **res);
|
||||||
void tor_freeaddrinfo(struct addrinfo *addrinfo);
|
void tor_freeaddrinfo(struct addrinfo *addrinfo);
|
||||||
void tor_free_getaddrinfo_cache(void);
|
void tor_free_getaddrinfo_cache(void);
|
||||||
void tor_make_getaddrinfo_cache_active(void);
|
|
||||||
#else /* !(defined(USE_SANDBOX_GETADDRINFO)) */
|
#else /* !(defined(USE_SANDBOX_GETADDRINFO)) */
|
||||||
#define tor_getaddrinfo(name, servname, hints, res) \
|
#define tor_getaddrinfo(name, servname, hints, res) \
|
||||||
getaddrinfo((name),(servname), (hints),(res))
|
getaddrinfo((name),(servname), (hints),(res))
|
||||||
@ -54,5 +53,6 @@ void tor_make_getaddrinfo_cache_active(void);
|
|||||||
#endif /* defined(USE_SANDBOX_GETADDRINFO) */
|
#endif /* defined(USE_SANDBOX_GETADDRINFO) */
|
||||||
|
|
||||||
void sandbox_disable_getaddrinfo_cache(void);
|
void sandbox_disable_getaddrinfo_cache(void);
|
||||||
|
void tor_make_getaddrinfo_cache_active(void);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -1798,9 +1798,4 @@ sandbox_is_active(void)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
sandbox_disable_getaddrinfo_cache(void)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif /* !defined(USE_LIBSECCOMP) */
|
#endif /* !defined(USE_LIBSECCOMP) */
|
||||||
|
Loading…
Reference in New Issue
Block a user