Skip to content
Snippets Groups Projects
Commit fcb261ef authored by Albert Gil's avatar Albert Gil
Browse files

Merge branch 'slurm-19.05' into slurm-20.02

parents d4c4ad1a 6eef5739
No related branches found
No related tags found
No related merge requests found
......@@ -51,10 +51,10 @@ static void pass_its_neighbor(const int rank, const int size)
out_buf.rank = rank;
if (host_env) {
strncpy(out_buf.host, host_env, BUF_SIZE);
strlcpy(out_buf.host, host_env, BUF_SIZE);
} else {
uname(&uts);
strncpy(out_buf.host, uts.nodename, BUF_SIZE);
strlcpy(out_buf.host, uts.nodename, BUF_SIZE);
}
out_buf.host[BUF_SIZE - 1] = '\0';
......
......@@ -49,7 +49,7 @@ static void pass_its_neighbor(const int rank, const int size)
out_buf.rank = rank;
uname(&uts);
strncpy(out_buf.host, uts.nodename, BUF_SIZE);
strlcpy(out_buf.host, uts.nodename, BUF_SIZE);
out_buf.host[BUF_SIZE - 1] = '\0';
MPI_Irecv((void *)&in_buf, sizeof(rank_info_t), MPI_CHAR,
......
......@@ -52,6 +52,7 @@
#include "src/common/gres.h"
#include "src/common/log.h"
#include "src/common/pack.h"
#include "src/common/strlcpy.h"
#include "src/common/xstring.h"
/*
......@@ -81,10 +82,11 @@ int main(int argc, char *argv[])
int core_count, sock_count;
/* Setup slurm.conf and gres.conf test paths */
strcpy(config_dir, argv[2]);
strcpy(config_dir, strcat(config_dir, "/test7.17_configs"));
strcpy(test, strcat(config_dir, argv[3]));
strcpy(slurm_conf, strcat(test, "/slurm.conf"));
strlcpy(config_dir, argv[2], sizeof(config_dir));
strlcpy(config_dir, strcat(config_dir, "/test7.17_configs"),
sizeof(config_dir));
strlcpy(test, strcat(config_dir, argv[3]), sizeof(config_dir));
strlcpy(slurm_conf, strcat(test, "/slurm.conf"), sizeof(slurm_conf));
/* Enable detailed logging for now */
opts.stderr_level = LOG_LEVEL_DEBUG;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment