mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-15 02:03:01 +00:00
21 lines
768 B
Diff
21 lines
768 B
Diff
|
--- a/src/web_client.c.orig
|
||
|
+++ b/src/web_client.c
|
||
|
@@ -331,7 +331,7 @@
|
||
|
buffer_sprintf(w->response.data, "File '%s' does not exist, or is not accessible.", webfilename);
|
||
|
return 404;
|
||
|
}
|
||
|
-
|
||
|
+#if 0
|
||
|
// check if the file is owned by expected user
|
||
|
if(stat.st_uid != web_files_uid()) {
|
||
|
error("%llu: File '%s' is owned by user %u (expected user %u). Access Denied.", w->id, webfilename, stat.st_uid, web_files_uid());
|
||
|
@@ -345,7 +345,7 @@
|
||
|
buffer_sprintf(w->response.data, "Access to file '%s' is not permitted.", webfilename);
|
||
|
return 403;
|
||
|
}
|
||
|
-
|
||
|
+#endif
|
||
|
if((stat.st_mode & S_IFMT) == S_IFDIR) {
|
||
|
snprintfz(webfilename, FILENAME_MAX, "%s/index.html", filename);
|
||
|
return mysendfile(w, webfilename);
|