mirror of
https://github.com/clearlinux/uwsgi.git
synced 2026-09-06 05:31:44 +00:00
+1
-1
@@ -374,12 +374,12 @@ char *uwsgi_spool_request(struct wsgi_request *wsgi_req, char *buf, size_t len,
|
||||
|
||||
|
||||
clear:
|
||||
if (filename) free(filename);
|
||||
uwsgi_unlock(uspool->lock);
|
||||
uwsgi_error("uwsgi_spool_request()/write()");
|
||||
if (unlink(filename)) {
|
||||
uwsgi_error("uwsgi_spool_request()/unlink()");
|
||||
}
|
||||
free(filename);
|
||||
// unlock the file too
|
||||
close(fd);
|
||||
return NULL;
|
||||
|
||||
@@ -181,6 +181,7 @@ char *uwsgi_write_pem_to_file(char *name, char *buf, size_t len, char *ext) {
|
||||
uwsgi_log("unable to write pem data in file %s\n", filename);
|
||||
uwsgi_error("uwsgi_write_pem_to_file()/write()");
|
||||
free(filename);
|
||||
close(fd);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -304,6 +305,10 @@ SSL_CTX *uwsgi_ssl_new_server_context(char *name, char *crt, char *key, char *ci
|
||||
SSL_CTX_set_verify_depth(ctx, 1);
|
||||
|
||||
if (uwsgi.ssl_tmp_dir && !uwsgi_starts_with(client_ca, strlen(client_ca), "-----BEGIN ", 11)) {
|
||||
if (!name) {
|
||||
SSL_CTX_free(ctx);
|
||||
return NULL;
|
||||
}
|
||||
client_ca = uwsgi_write_pem_to_file(name, client_ca, strlen(client_ca), ".ca");
|
||||
if (!client_ca) {
|
||||
SSL_CTX_free(ctx);
|
||||
|
||||
@@ -29,6 +29,10 @@ static ssize_t uwsgi_pipe_logger(struct uwsgi_logger *ul, char *message, size_t
|
||||
else {
|
||||
// child
|
||||
setsid();
|
||||
if (setsid() < 0) {
|
||||
uwsgi_error("setsid()");
|
||||
exit(1);
|
||||
}
|
||||
close(pipefd[1]);
|
||||
dup2(pipefd[0], STDIN_FILENO);
|
||||
close(pipefd[0]);
|
||||
|
||||
Reference in New Issue
Block a user