Avoid attempt to download {lib,src}/debug

The associated cache directories in /var/cache/debuginfo/{lib,src}
already exist, and the tar for / is not created on the server, so avoid
downloading it altogether.
This commit is contained in:
Patrick McCarty
2015-09-29 12:25:13 -07:00
parent b51f835219
commit de08f0ebd5
+8
View File
@@ -191,6 +191,14 @@ static void *server_thread(void *arg)
*path = 0;
path++;
/* GDB and elfutils both stat /usr/lib/debug directly when looking up
* debuginfo, so avoid the download for "/.tar"; the associated cache
* directories already exist by this point.
*/
if (strlen(path) == 1 && strcmp(path, "/") == 0) {
close(fd);
return NULL;
}
if (strstr(path, "..") || strstr(prefix, "..") || strstr(path, "'") || strstr(path, ";")) {
close(fd);