summaryrefslogtreecommitdiff
path: root/nss_mapname.c
diff options
context:
space:
mode:
authorDave Olson <olson@cumulusnetworks.com>2017-06-22 16:42:21 -0700
committerDave Olson <olson@cumulusnetworks.com>2017-06-22 16:50:34 -0700
commitc80f0d55431b4f373d1672b82a4dae46fef3865c (patch)
tree9beef878028d5a3469569705ecac1117e9c2b1e0 /nss_mapname.c
parentb58eeab9d1dadb0b715c150facef383f4ebd83e7 (diff)
downloadlibnss-mapuser-c80f0d55431b4f373d1672b82a4dae46fef3865c.tar.gz
libnss-mapuser-c80f0d55431b4f373d1672b82a4dae46fef3865c.zip
Removed mapfile cleanup workaround, implemented solution
We need to remove the mapping file for the session when it is closing and the close script is called via pam_script, but not remove it when the close is called from ending an sudo session, etc. Check which processes are in the current session, and if any of them are not one of sshd, sudo, login, su, or telnetd, then don't do the cleanup (normally it will be a shell). Cleanup won't happen if the user leaves jobs running when they logout (e.g., via setsid), but that's fairly benign. Even with very long system uptimes, these are small files, and will not be a significant issue. At some future point, we might add garbage collection for any session files found in the dbdir.
Diffstat (limited to 'nss_mapname.c')
0 files changed, 0 insertions, 0 deletions