summaryrefslogtreecommitdiffstats
path: root/debian/patches/0002-remove-file-serve-restrictions-for-symlinks.patch
diff options
context:
space:
mode:
Diffstat (limited to 'debian/patches/0002-remove-file-serve-restrictions-for-symlinks.patch')
-rw-r--r--debian/patches/0002-remove-file-serve-restrictions-for-symlinks.patch10
1 files changed, 4 insertions, 6 deletions
diff --git a/debian/patches/0002-remove-file-serve-restrictions-for-symlinks.patch b/debian/patches/0002-remove-file-serve-restrictions-for-symlinks.patch
index b1a40b40b..3832543bb 100644
--- a/debian/patches/0002-remove-file-serve-restrictions-for-symlinks.patch
+++ b/debian/patches/0002-remove-file-serve-restrictions-for-symlinks.patch
@@ -6,11 +6,9 @@ Subject: remove file serve restrictions for symlinks
src/web_client.c | 24 ++++++++++++------------
1 file changed, 12 insertions(+), 12 deletions(-)
-diff --git a/src/web_client.c b/src/web_client.c
-index 6ec3e11..6d30205 100644
--- a/src/web_client.c
+++ b/src/web_client.c
-@@ -303,8 +303,8 @@ int mysendfile(struct web_client *w, char *filename) {
+@@ -382,8 +382,8 @@
snprintfz(webfilename, FILENAME_MAX, "%s/%s", netdata_configured_web_dir, filename);
// check if the file exists
@@ -21,7 +19,7 @@ index 6ec3e11..6d30205 100644
debug(D_WEB_CLIENT_ACCESS, "%llu: File '%s' is not found.", w->id, webfilename);
w->response.data->contenttype = CT_TEXT_HTML;
buffer_strcat(w->response.data, "File does not exist, or is not accessible: ");
-@@ -313,8 +313,8 @@ int mysendfile(struct web_client *w, char *filename) {
+@@ -392,8 +392,8 @@
}
// check if the file is owned by expected user
@@ -32,7 +30,7 @@ index 6ec3e11..6d30205 100644
w->response.data->contenttype = CT_TEXT_HTML;
buffer_strcat(w->response.data, "Access to file is not permitted: ");
buffer_strcat_htmlescape(w->response.data, webfilename);
-@@ -322,20 +322,20 @@ int mysendfile(struct web_client *w, char *filename) {
+@@ -401,20 +401,20 @@
}
// check if the file is owned by expected group
@@ -57,7 +55,7 @@ index 6ec3e11..6d30205 100644
error("%llu: File '%s' is not a regular file. Access Denied.", w->id, webfilename);
w->response.data->contenttype = CT_TEXT_HTML;
buffer_strcat(w->response.data, "Access to file is not permitted: ");
-@@ -389,17 +389,17 @@ int mysendfile(struct web_client *w, char *filename) {
+@@ -468,17 +468,17 @@
else if(strstr(filename, ".icns") != NULL) w->response.data->contenttype = CT_IMAGE_ICNS;
else w->response.data->contenttype = CT_APPLICATION_OCTET_STREAM;