summaryrefslogtreecommitdiff
path: root/pam_script_ses_close
diff options
context:
space:
mode:
authorDave Olson <olson@cumulusnetworks.com>2017-06-21 20:00:05 -0700
committerDave Olson <olson@cumulusnetworks.com>2017-06-21 20:00:05 -0700
commit061334771b143b7f47caccba8525be6e041a252f (patch)
tree20d8460b8cd1abfad513a3c3dcb661046d067522 /pam_script_ses_close
parent5c6df6ac03f04f195c6f3bb9fe8b1725428de129 (diff)
downloadlibnss-mapuser-061334771b143b7f47caccba8525be6e041a252f.tar.gz
libnss-mapuser-061334771b143b7f47caccba8525be6e041a252f.zip
Fix problem with sudo, su, etc. in pam_script scripts
The flat file was overwritten on su, sudo, etc. Fixed that. The flat file was removed on exit from su, sudo, etc. I've temporarily worked around that by not cleaning up. Need to do a better job, but this will let testing continue.
Diffstat (limited to 'pam_script_ses_close')
-rwxr-xr-xpam_script_ses_close6
1 files changed, 5 insertions, 1 deletions
diff --git a/pam_script_ses_close b/pam_script_ses_close
index a59664c..a806d2c 100755
--- a/pam_script_ses_close
+++ b/pam_script_ses_close
@@ -55,8 +55,12 @@ file=$dbdir/$sess
[ "$auid" != "$fauid" -o "$sess" != "$fsess" ] &&
logger -t $0 "Session $sess mismatch auid $auid,$fauid session $sess,$fsess"
- rm -f $file
+ #OLSON rm -f $file
}
+# OLSON, probably need to gc all files on exit from any, because
+# original PID is always gone, but we don't want to remove on exit
+# from su, sudo, etc.
+
# always succeed, this should not cause sessions shutdown errors
exit 0