Merge pull request #6472 from yuwata/journal-gateway-fix
Some journal-gateway and journal-remote related fixes
This commit is contained in:
commit
e362b5a77f
|
@ -1041,7 +1041,7 @@ int main(int argc, char *argv[]) {
|
||||||
MHD_USE_DEBUG |
|
MHD_USE_DEBUG |
|
||||||
MHD_USE_DUAL_STACK |
|
MHD_USE_DUAL_STACK |
|
||||||
MHD_USE_ITC |
|
MHD_USE_ITC |
|
||||||
MHD_USE_POLL |
|
MHD_USE_POLL_INTERNAL_THREAD |
|
||||||
MHD_USE_THREAD_PER_CONNECTION;
|
MHD_USE_THREAD_PER_CONNECTION;
|
||||||
|
|
||||||
if (n > 0)
|
if (n > 0)
|
||||||
|
@ -1053,10 +1053,10 @@ int main(int argc, char *argv[]) {
|
||||||
{MHD_OPTION_HTTPS_MEM_KEY, 0, arg_key_pem};
|
{MHD_OPTION_HTTPS_MEM_KEY, 0, arg_key_pem};
|
||||||
opts[opts_pos++] = (struct MHD_OptionItem)
|
opts[opts_pos++] = (struct MHD_OptionItem)
|
||||||
{MHD_OPTION_HTTPS_MEM_CERT, 0, arg_cert_pem};
|
{MHD_OPTION_HTTPS_MEM_CERT, 0, arg_cert_pem};
|
||||||
flags |= MHD_USE_SSL;
|
flags |= MHD_USE_TLS;
|
||||||
}
|
}
|
||||||
if (arg_trust_pem) {
|
if (arg_trust_pem) {
|
||||||
assert(flags & MHD_USE_SSL);
|
assert(flags & MHD_USE_TLS);
|
||||||
opts[opts_pos++] = (struct MHD_OptionItem)
|
opts[opts_pos++] = (struct MHD_OptionItem)
|
||||||
{MHD_OPTION_HTTPS_MEM_TRUST, 0, arg_trust_pem};
|
{MHD_OPTION_HTTPS_MEM_TRUST, 0, arg_trust_pem};
|
||||||
}
|
}
|
||||||
|
|
|
@ -644,6 +644,7 @@ static int setup_microhttpd_server(RemoteServer *s,
|
||||||
{ MHD_OPTION_END},
|
{ MHD_OPTION_END},
|
||||||
{ MHD_OPTION_END},
|
{ MHD_OPTION_END},
|
||||||
{ MHD_OPTION_END},
|
{ MHD_OPTION_END},
|
||||||
|
{ MHD_OPTION_END},
|
||||||
{ MHD_OPTION_END}};
|
{ MHD_OPTION_END}};
|
||||||
int opts_pos = 4;
|
int opts_pos = 4;
|
||||||
int flags =
|
int flags =
|
||||||
|
@ -663,6 +664,15 @@ static int setup_microhttpd_server(RemoteServer *s,
|
||||||
if (r < 0)
|
if (r < 0)
|
||||||
return log_error_errno(r, "Failed to make fd:%d nonblocking: %m", fd);
|
return log_error_errno(r, "Failed to make fd:%d nonblocking: %m", fd);
|
||||||
|
|
||||||
|
/* MHD_OPTION_STRICT_FOR_CLIENT is introduced in microhttpd 0.9.54,
|
||||||
|
* and MHD_USE_PEDANTIC_CHECKS will be deprecated in future. */
|
||||||
|
#ifdef MHD_USE_PEDANTIC_CHECKS
|
||||||
|
opts[opts_pos++] = (struct MHD_OptionItem)
|
||||||
|
{MHD_OPTION_STRICT_FOR_CLIENT, 1};
|
||||||
|
#else
|
||||||
|
flags |= MHD_USE_PEDANTIC_CHECKS;
|
||||||
|
#endif
|
||||||
|
|
||||||
if (key) {
|
if (key) {
|
||||||
assert(cert);
|
assert(cert);
|
||||||
|
|
||||||
|
@ -671,7 +681,7 @@ static int setup_microhttpd_server(RemoteServer *s,
|
||||||
opts[opts_pos++] = (struct MHD_OptionItem)
|
opts[opts_pos++] = (struct MHD_OptionItem)
|
||||||
{MHD_OPTION_HTTPS_MEM_CERT, 0, (char*) cert};
|
{MHD_OPTION_HTTPS_MEM_CERT, 0, (char*) cert};
|
||||||
|
|
||||||
flags |= MHD_USE_SSL;
|
flags |= MHD_USE_TLS;
|
||||||
|
|
||||||
if (trust)
|
if (trust)
|
||||||
opts[opts_pos++] = (struct MHD_OptionItem)
|
opts[opts_pos++] = (struct MHD_OptionItem)
|
||||||
|
|
|
@ -41,6 +41,16 @@
|
||||||
# define MHD_USE_EPOLL MHD_USE_EPOLL_LINUX_ONLY
|
# define MHD_USE_EPOLL MHD_USE_EPOLL_LINUX_ONLY
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* Renamed in µhttpd 0.9.52 */
|
||||||
|
#ifndef MHD_USE_SSL
|
||||||
|
# define MHD_USE_TLS MHD_USE_SSL
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Renamed in µhttpd 0.9.53 */
|
||||||
|
#ifndef MHD_USE_POLL_INTERNALLY
|
||||||
|
# define MHD_USE_POLL_INTERNAL_THREAD MHD_USE_POLL_INTERNALLY
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Both the old and new names are defines, check for the new one. */
|
/* Both the old and new names are defines, check for the new one. */
|
||||||
|
|
||||||
/* Renamed in µhttpd 0.9.53 */
|
/* Renamed in µhttpd 0.9.53 */
|
||||||
|
|
|
@ -6,7 +6,6 @@
|
||||||
# (at your option) any later version.
|
# (at your option) any later version.
|
||||||
|
|
||||||
m4_ifdef(`HAVE_MICROHTTPD',
|
m4_ifdef(`HAVE_MICROHTTPD',
|
||||||
u systemd-journal-gateway - "systemd Journal Gateway"
|
|
||||||
u systemd-journal-remote - "systemd Journal Remote"
|
u systemd-journal-remote - "systemd Journal Remote"
|
||||||
)m4_dnl
|
)m4_dnl
|
||||||
m4_ifdef(`HAVE_LIBCURL',
|
m4_ifdef(`HAVE_LIBCURL',
|
||||||
|
|
|
@ -15,6 +15,7 @@ ExecStart=@rootlibexecdir@/systemd-journal-gatewayd
|
||||||
User=systemd-journal-gateway
|
User=systemd-journal-gateway
|
||||||
Group=systemd-journal-gateway
|
Group=systemd-journal-gateway
|
||||||
SupplementaryGroups=systemd-journal
|
SupplementaryGroups=systemd-journal
|
||||||
|
DynamicUser=yes
|
||||||
PrivateTmp=yes
|
PrivateTmp=yes
|
||||||
PrivateDevices=yes
|
PrivateDevices=yes
|
||||||
PrivateNetwork=yes
|
PrivateNetwork=yes
|
||||||
|
|
Loading…
Reference in a new issue