Skip to content
Snippets Groups Projects
Commit 13bc1671 authored by Mark Grondona's avatar Mark Grondona
Browse files

o src/slurmd/job.c : fix bug in batch job startup.

 o src/common/slurm_cred.c : assert non-null credential on get_signature
   operation
parent 04425eca
No related branches found
No related tags found
No related merge requests found
......@@ -461,11 +461,13 @@ slurm_cred_revoke(slurm_cred_ctx_t ctx, uint32_t jobid)
int
slurm_cred_get_signature(slurm_cred_t cred, char **datap, int *datalen)
{
xassert(datap != NULL);
xassert(cred != NULL);
xassert(datap != NULL);
xassert(datalen != NULL);
*datap = cred->signature;
*datalen = cred->siglen;
return SLURM_SUCCESS;
}
......
......@@ -336,6 +336,18 @@ srun_info_create(slurm_cred_t cred, slurm_addr *resp_addr, slurm_addr *ioaddr)
struct srun_info *srun = xmalloc(sizeof(*srun));
srun_key_t *key = xmalloc(sizeof(*key ));
srun->key = key;
srun->ofname = NULL;
srun->efname = NULL;
srun->ifname = NULL;
/*
* If no credential was provided, return the empty
* srun info object. (This is used, for example, when
* creating a batch job structure)
*/
if (!cred) return srun;
slurm_cred_get_signature(cred, &data, &len);
len = len > SLURM_IO_KEY_SIZE ? SLURM_IO_KEY_SIZE : len;
......@@ -348,8 +360,6 @@ srun_info_create(slurm_cred_t cred, slurm_addr *resp_addr, slurm_addr *ioaddr)
SLURM_IO_KEY_SIZE - len );
}
srun->key = key;
if (ioaddr != NULL)
srun->ioaddr = *ioaddr;
if (resp_addr != NULL)
......
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