mirror of
https://github.com/hashcat/hashcat
synced 2024-11-02 20:39:22 +01:00
OpenCL Runtime: Workaround ROCm OpenCL driver problem trying to write temporary file into readonly folder by setting TMPDIR environment variable
This commit is contained in:
parent
5e0eb288c9
commit
62d5d2dfbb
@ -69,6 +69,7 @@
|
||||
- OpenCL Runtime: Workaround JiT compiler error on AMDGPU driver compiling WPA-EAPOL-PBKDF2 OpenCL kernel
|
||||
- OpenCL Runtime: Workaround JiT compiler error on ROCM 2.3 driver if the 'inline' keyword is used in function declaration
|
||||
- OpenCL Runtime: Workaround memory allocation error on AMD driver on Windows leading to CL_MEM_OBJECT_ALLOCATION_FAILURE
|
||||
- OpenCL Runtime: Workaround ROCm OpenCL driver problem trying to write temporary file into readonly folder by setting TMPDIR
|
||||
- Startup Screen: Provide an estimate of host memory requirements for the requested attack
|
||||
- Tuning Database: Updated hashcat.hctune with new models and refreshed vector width values
|
||||
- WPA/WPA2 cracking: In the potfile, replace password with PMK in order to detect already cracked networks across all WPA modes
|
||||
|
@ -40,7 +40,7 @@ void naive_escape (char *s, size_t s_max, const char key_char, const char escape
|
||||
|
||||
__attribute__ ((format (printf, 2, 3))) int hc_asprintf (char **strp, const char *fmt, ...);
|
||||
|
||||
void setup_environment_variables (void);
|
||||
void setup_environment_variables (const folder_config_t *folder_config);
|
||||
void setup_umask (void);
|
||||
void setup_seeding (const bool rp_gen_seed_chgd, const u32 rp_gen_seed);
|
||||
|
||||
|
@ -1108,7 +1108,7 @@ int hashcat_session_init (hashcat_ctx_t *hashcat_ctx, const char *install_folder
|
||||
* To help users a bit
|
||||
*/
|
||||
|
||||
setup_environment_variables ();
|
||||
setup_environment_variables (hashcat_ctx->folder_config);
|
||||
|
||||
setup_umask ();
|
||||
|
||||
|
14
src/shared.c
14
src/shared.c
@ -7,6 +7,7 @@
|
||||
#include "types.h"
|
||||
#include "convert.h"
|
||||
#include "shared.h"
|
||||
#include "memory.h"
|
||||
|
||||
#if defined (__CYGWIN__)
|
||||
#include <sys/cygwin.h>
|
||||
@ -467,7 +468,7 @@ bool hc_string_is_digit (const char *s)
|
||||
return true;
|
||||
}
|
||||
|
||||
void setup_environment_variables ()
|
||||
void setup_environment_variables (const folder_config_t *folder_config)
|
||||
{
|
||||
char *compute = getenv ("COMPUTE");
|
||||
|
||||
@ -498,6 +499,17 @@ void setup_environment_variables ()
|
||||
putenv ((char *) "POCL_KERNEL_CACHE=0");
|
||||
*/
|
||||
|
||||
if (getenv ("TMPDIR") == NULL)
|
||||
{
|
||||
char *tmpdir = NULL;
|
||||
|
||||
hc_asprintf (&tmpdir, "TMPDIR=%s", folder_config->profile_dir);
|
||||
|
||||
putenv (tmpdir);
|
||||
|
||||
// we can't free tmpdir at this point!
|
||||
}
|
||||
|
||||
if (getenv ("CL_CONFIG_USE_VECTORIZER") == NULL)
|
||||
putenv ((char *) "CL_CONFIG_USE_VECTORIZER=False");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user