Commit c5004c1d authored by Sylvain Berfini's avatar Sylvain Berfini 🎩
Browse files

Give r/w permissions to ugo for downloaded files

parent f48ed2e0
......@@ -285,6 +285,10 @@ static void belle_sip_file_body_handler_recv_chunk(belle_sip_body_handler_t *bas
int ret;
belle_sip_file_body_handler_t *obj = (belle_sip_file_body_handler_t *)base;
if (obj->filepath == NULL) return;
#ifndef WIN32
/* allow anyone to read and edit the file received */
(void) umask(S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH);
f = fopen(obj->filepath, "ab");
if (f == NULL) return;
ret = fwrite(buf, 1, size, f);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment