diff --git a/include/shared.h b/include/shared.h index 9cd39e225..8b1b206f3 100644 --- a/include/shared.h +++ b/include/shared.h @@ -1925,7 +1925,7 @@ void truecrypt_crc32 (char *file, unsigned char keytab[64]); char *get_exec_path (); char *get_install_dir (const char *progname); char *get_profile_dir (const char *homedir); -char *get_session_dir (const char *profile_dir, const char *session); +char *get_session_dir (const char *profile_dir); uint get_vliw_by_compute_capability (const uint major, const uint minor); uint get_vliw_by_device_name (const char *device_name); diff --git a/src/oclHashcat.c b/src/oclHashcat.c index ce1f0d642..d29ae99df 100644 --- a/src/oclHashcat.c +++ b/src/oclHashcat.c @@ -5333,7 +5333,7 @@ int main (int argc, char **argv) const char *homedir = pw->pw_dir; profile_dir = get_profile_dir (homedir); - session_dir = get_session_dir (profile_dir, session); + session_dir = get_session_dir (profile_dir); shared_dir = strdup (SHARED_FOLDER); mkdir (profile_dir, 0700); diff --git a/src/shared.c b/src/shared.c index 108031c64..7e65de3a9 100644 --- a/src/shared.c +++ b/src/shared.c @@ -4132,11 +4132,13 @@ char *get_profile_dir (const char *homedir) return profile_dir; } -char *get_session_dir (const char *profile_dir, const char *session) +char *get_session_dir (const char *profile_dir) { - char *session_dir = (char *) mymalloc (strlen (profile_dir) + 1 + strlen (session) + 1); + #define SESSIONS_FOLDER "sessions" - sprintf (session_dir, "%s/%s", profile_dir, session); + char *session_dir = (char *) mymalloc (strlen (profile_dir) + 1 + strlen (SESSIONS_FOLDER) + 1); + + sprintf (session_dir, "%s/%s", profile_dir, SESSIONS_FOLDER); return session_dir; }