Fix for #2387, but need some testing first

pull/2431/head
Jens Steube 4 years ago
parent 891b59fb2f
commit dc9f4e993a

@ -1486,12 +1486,14 @@ bool brain_server_read_hash_dumps (brain_server_dbs_t *brain_server_dbs, const c
{ {
brain_server_dbs->hash_cnt = 0; brain_server_dbs->hash_cnt = 0;
/* temporary disabled due to https://github.com/hashcat/hashcat/issues/2379
if (chdir (path) == -1) if (chdir (path) == -1)
{ {
brain_logging (stderr, 0, "%s: %s\n", path, strerror (errno)); brain_logging (stderr, 0, "%s: %s\n", path, strerror (errno));
return false; return false;
} }
*/
DIR *dirp = opendir (path); DIR *dirp = opendir (path);
@ -1683,12 +1685,14 @@ bool brain_server_read_attack_dumps (brain_server_dbs_t *brain_server_dbs, const
{ {
brain_server_dbs->attack_cnt = 0; brain_server_dbs->attack_cnt = 0;
/* temporary disabled due to https://github.com/hashcat/hashcat/issues/2379
if (chdir (path) == -1) if (chdir (path) == -1)
{ {
brain_logging (stderr, 0, "%s: %s\n", path, strerror (errno)); brain_logging (stderr, 0, "%s: %s\n", path, strerror (errno));
return false; return false;
} }
*/
DIR *dirp = opendir (path); DIR *dirp = opendir (path);

@ -258,6 +258,7 @@ int folder_config_init (hashcat_ctx_t *hashcat_ctx, MAYBE_UNUSED const char *ins
* A workaround is to chdir() to the OpenCL folder, * A workaround is to chdir() to the OpenCL folder,
* then compile the kernels, * then compile the kernels,
* then chdir() back to where we came from so we need to save it first * then chdir() back to where we came from so we need to save it first
* - temporary disabled due to https://github.com/hashcat/hashcat/issues/2379
*/ */
char *cwd = (char *) hcmalloc (HCBUFSIZ_TINY); char *cwd = (char *) hcmalloc (HCBUFSIZ_TINY);
@ -450,6 +451,7 @@ int folder_config_init (hashcat_ctx_t *hashcat_ctx, MAYBE_UNUSED const char *ins
hcfree (cpath); hcfree (cpath);
//if (getenv ("TMP") == NULL) //if (getenv ("TMP") == NULL)
/* temporary disabled due to https://github.com/hashcat/hashcat/issues/2379
if (true) if (true)
{ {
char *tmp; char *tmp;
@ -458,6 +460,7 @@ int folder_config_init (hashcat_ctx_t *hashcat_ctx, MAYBE_UNUSED const char *ins
putenv (tmp); putenv (tmp);
} }
*/
#if defined (_WIN) #if defined (_WIN)

@ -2760,12 +2760,14 @@ int user_options_check_files (hashcat_ctx_t *hashcat_ctx)
* default building options * default building options
*/ */
/* temporary disabled due to https://github.com/hashcat/hashcat/issues/2379
if (chdir (folder_config->cpath_real) == -1) if (chdir (folder_config->cpath_real) == -1)
{ {
event_log_error (hashcat_ctx, "%s: %s", folder_config->cpath_real, strerror (errno)); event_log_error (hashcat_ctx, "%s: %s", folder_config->cpath_real, strerror (errno));
return -1; return -1;
} }
*/
// include check // include check
// this test needs to be done manually because of macOS opencl runtime // this test needs to be done manually because of macOS opencl runtime
@ -2792,9 +2794,13 @@ int user_options_check_files (hashcat_ctx_t *hashcat_ctx)
for (int i = 0; files_names[i] != NULL; i++) for (int i = 0; files_names[i] != NULL; i++)
{ {
if (hc_path_read (files_names[i]) == false) char *temp_filename = NULL;
hc_asprintf (&temp_filename, "%s/%s", folder_config->cpath_real, files_names[i]);
if (hc_path_read (temp_filename) == false)
{ {
event_log_error (hashcat_ctx, "%s: %s", files_names[i], strerror (errno)); event_log_error (hashcat_ctx, "%s: %s", temp_filename, strerror (errno));
return -1; return -1;
} }
@ -2802,6 +2808,7 @@ int user_options_check_files (hashcat_ctx_t *hashcat_ctx)
// return back to the folder we came from initially (workaround) // return back to the folder we came from initially (workaround)
/* temporary disabled due to https://github.com/hashcat/hashcat/issues/2379
#if defined (_WIN) #if defined (_WIN)
if (chdir ("..") == -1) if (chdir ("..") == -1)
{ {
@ -2817,6 +2824,7 @@ int user_options_check_files (hashcat_ctx_t *hashcat_ctx)
return -1; return -1;
} }
#endif #endif
*/
return 0; return 0;
} }

Loading…
Cancel
Save