Create the key on windows too even if the security is lower.
This commit was SVN r12005.
Этот коммит содержится в:
родитель
c2d397ee7d
Коммит
f51e3ec338
@ -64,10 +64,11 @@ int orte_pre_condition_transports(orte_app_context_t **app_context, size_t num_c
|
|||||||
{
|
{
|
||||||
size_t i;
|
size_t i;
|
||||||
char *cs_env;
|
char *cs_env;
|
||||||
int fd_rand;
|
|
||||||
uint64_t unique_key[2];
|
uint64_t unique_key[2];
|
||||||
char string_key[ORTE_TRANSPORT_KEY_LEN + 1]; /* key + null */
|
char string_key[ORTE_TRANSPORT_KEY_LEN + 1]; /* key + null */
|
||||||
|
|
||||||
|
#if !defined(__WINDOWS__)
|
||||||
|
int fd_rand;
|
||||||
size_t bytes_read;
|
size_t bytes_read;
|
||||||
struct stat buf;
|
struct stat buf;
|
||||||
|
|
||||||
@ -89,6 +90,10 @@ int orte_pre_condition_transports(orte_app_context_t **app_context, size_t num_c
|
|||||||
close(fd_rand);
|
close(fd_rand);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
rand_s( &unique_key[0] );
|
||||||
|
rand_s( &unique_key[1] );
|
||||||
|
#endif /* !defined(__WINDOWS__) */
|
||||||
|
|
||||||
sprintf(string_key, ORTE_TRANSPORT_KEY_FMT, (long unsigned)unique_key[0],
|
sprintf(string_key, ORTE_TRANSPORT_KEY_FMT, (long unsigned)unique_key[0],
|
||||||
(long unsigned)unique_key[1]);
|
(long unsigned)unique_key[1]);
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user