|
|
Message-ID: <8c02f7e54d6c950eb731e124c9cfcc15@smtp.hushmail.com>
Date: Tue, 7 May 2013 01:30:09 +0200
From: magnum <john.magnum@...hmail.com>
To: "john-dev@...ts.openwall.com" <john-dev@...ts.openwall.com>
Subject: OMP fallback for non-systemwide build
Solar,
I experimented a little with this:
diff --git a/src/john.c b/src/john.c
index b8357ae..6fd1668 100644
--- a/src/john.c
+++ b/src/john.c
@@ -465,8 +465,13 @@ static void john_omp_init(void)
static void john_omp_fallback(char **argv) {
if (!getenv("JOHN_NO_OMP_FALLBACK") && john_omp_threads_new <= 1) {
rec_done(-2);
+#ifdef JOHN_SYSTEMWIDE_EXEC
#define OMP_FALLBACK_PATHNAME JOHN_SYSTEMWIDE_EXEC "/" OMP_FALLBACK_BINARY
execv(OMP_FALLBACK_PATHNAME, argv);
+#else
+#define OMP_FALLBACK_PATHNAME "$JOHN/" OMP_FALLBACK_BINARY
+ execv(path_expand(OMP_FALLBACK_PATHNAME), argv);
+#endif
perror("execv: " OMP_FALLBACK_PATHNAME);
}
}
...but for it to work, I also needed to do this:
@@ -967,11 +972,10 @@ static void john_init(char *name, int argc, char **argv)
#endif
if (!make_check) {
+ path_init(argv);
#ifdef HAVE_JOHN_OMP_FALLBACK
john_omp_fallback(argv);
#endif
-
- path_init(argv);
}
status_init(NULL, 1);
It does work like a champ. Could that relocation of path_init() pose a problem?
magnum
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.