Skip to content
Snippets Groups Projects
Commit d491a42d authored by Georg Rath's avatar Georg Rath Committed by Tim Wickberg
Browse files

nss_slurm - fix file descriptor leaks.


Since this happens inside a the user process, this can inadvertently
cause the user's job to die by running out of file descriptors.

Bug 7814.

Co-authored-by: default avatarWilliam Arndt <warndt@lbl.gov>
parent 18279136
No related branches found
No related tags found
No related merge requests found
......@@ -55,6 +55,7 @@ documents those changes that are of interest to users and administrators.
-- Fix scancel --full for proctrack/cgroups.
-- Fix sdiag backfill last and mean queue length stats.
-- Do not remove batch host when resizing/shrinking a batch job.
-- nss_slurm - fix file descriptor leaks.
 
* Changes in Slurm 19.05.2
==========================
......
......@@ -147,8 +147,9 @@ static struct passwd *_pw_internal(int mode, uid_t uid, const char *name)
if (fd < 0)
continue;
if ((pwd = stepd_getpw(fd, stepd->protocol_version,
mode, uid, name)))
pwd = stepd_getpw(fd, stepd->protocol_version, mode, uid, name);
close(fd);
if (pwd)
break;
}
list_iterator_destroy(itr);
......@@ -278,8 +279,10 @@ static struct group **_gr_internal(int mode, gid_t uid, const char *name)
if (fd < 0)
continue;
if ((grps = stepd_getgr(fd, stepd->protocol_version,
mode, uid, name)))
grps = stepd_getgr(fd, stepd->protocol_version, mode, uid,
name);
close(fd);
if (grps)
break;
}
list_iterator_destroy(itr);
......
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