|
Line
Link Here
|
|
The code tries to load libslurm.so even if precedent dlopen calls |
|
The code tries to load libslurm.so even if precedent dlopen calls |
| 1 |
succeeded. The code is structured so that we have to "return;" as |
1 |
succeeded. The code is structured so that we have to "return;" as |
| 2 |
soon as a dlopen succeeds. |
2 |
soon as a dlopen succeeds. |
| 3 |
-- a/contribs/pam/pam_slurm.c |
3 |
++ b/contribs/pam/pam_slurm.c |
|
Lines 422-428
Link Here
|
| 422 |
SLURM_API_REVISION, SLURM_API_AGE) >= |
422 |
SLURM_API_REVISION, SLURM_API_AGE) >= |
| 423 |
sizeof(libslurmname) ) { |
423 |
sizeof(libslurmname) ) { |
| 424 |
_log_msg (LOG_ERR, "Unable to write libslurmname\n"); |
424 |
_log_msg (LOG_ERR, "Unable to write libslurmname\n"); |
| 425 |
} else if (!(slurm_h = dlopen(libslurmname, RTLD_NOW|RTLD_GLOBAL))) { |
425 |
} else if (slurm_h = dlopen(libslurmname, RTLD_NOW|RTLD_GLOBAL)) { |
|
|
426 |
return; |
| 427 |
} else { |
| 426 |
_log_msg (LOG_INFO, "Unable to dlopen %s: %s\n", |
428 |
_log_msg (LOG_INFO, "Unable to dlopen %s: %s\n", |
| 427 |
libslurmname, dlerror ()); |
429 |
libslurmname, dlerror ()); |
| 428 |
} |
430 |
} |
|
Lines 430-436
Link Here
|
| 430 |
if (snprintf(libslurmname, sizeof(libslurmname), "libslurm.so.%d", |
432 |
if (snprintf(libslurmname, sizeof(libslurmname), "libslurm.so.%d", |
| 431 |
SLURM_API_CURRENT) >= sizeof(libslurmname) ) { |
433 |
SLURM_API_CURRENT) >= sizeof(libslurmname) ) { |
| 432 |
_log_msg (LOG_ERR, "Unable to write libslurmname\n"); |
434 |
_log_msg (LOG_ERR, "Unable to write libslurmname\n"); |
| 433 |
} else if (!(slurm_h = dlopen(libslurmname, RTLD_NOW|RTLD_GLOBAL))) { |
435 |
} else if (slurm_h = dlopen(libslurmname, RTLD_NOW|RTLD_GLOBAL)) { |
|
|
436 |
return; |
| 437 |
} else { |
| 434 |
_log_msg (LOG_INFO, "Unable to dlopen %s: %s\n", |
438 |
_log_msg (LOG_INFO, "Unable to dlopen %s: %s\n", |
| 435 |
libslurmname, dlerror ()); |
439 |
libslurmname, dlerror ()); |
| 436 |
} |
440 |
} |