mirror of
https://github.com/pentoo/pentoo-overlay
synced 2025-12-17 13:53:29 +01:00
Closes: https://bugs.gentoo.org/769860 Pretty much I imported the debian patchset from https://salsa.debian.org/pkg-security-team/dirb/-/tree/debian/master/debian/patches Testing shows it builds and runs, I added a helpful symlink to the default wordlist location
28 lines
977 B
Diff
28 lines
977 B
Diff
Description: Avoid infinite recursion when HOME=/
|
|
We do this by ensuring that HOME=/root when HOME=/.
|
|
Author: Raphaël Hertzog <buxy@kali.org>
|
|
Forwarded: not-needed
|
|
Bug-Kali: https://bugs.kali.org/view.php?id=2387
|
|
|
|
diff --git a/src/resume.c b/src/resume.c
|
|
index 553d461..b52df43 100644
|
|
--- a/src/resume.c
|
|
+++ b/src/resume.c
|
|
@@ -35,6 +35,8 @@ void dump(void) {
|
|
// Comprobamos si existe el directorio y sino intentamos crealo
|
|
|
|
home = getenv("HOME");
|
|
+ if (strcmp(home, "/") == 0)
|
|
+ home = "/root";
|
|
asprintf(&dumppath,"%s/%s", home, DUMP_DIR);
|
|
asprintf(&optionspath, "%s/%s", home, OPTIONS_DUMP);
|
|
asprintf(&wordlistpath, "%s/%s", home, WORDLIST_DUMP);
|
|
@@ -106,6 +108,8 @@ void resume(void) {
|
|
|
|
resuming=1;
|
|
home = getenv("HOME");
|
|
+ if (strcmp(home, "/") == 0)
|
|
+ home = "/root";
|
|
asprintf(&dumppath,"%s/%s",home,DUMP_DIR);
|
|
asprintf(&optionspath, "%s/%s",home,OPTIONS_DUMP);
|
|
asprintf(&wordlistpath, "%s/%s",home,WORDLIST_DUMP);
|