aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2012-09-04 08:31:09 -0500
committerTed Gould <ted@gould.cx>2012-09-04 08:31:09 -0500
commitef777fe87288022872c7ca9ae828a150b1e54577 (patch)
tree5907056eb87afa7c68320a3d7e3193219e61a6d8 /src
parente8f32f2832c26092c613d0029a98034bae106af7 (diff)
downloadlibpam-freerdp2-ef777fe87288022872c7ca9ae828a150b1e54577.tar.gz
libpam-freerdp2-ef777fe87288022872c7ca9ae828a150b1e54577.tar.bz2
libpam-freerdp2-ef777fe87288022872c7ca9ae828a150b1e54577.zip
Using the new function in the open_session function instead of killing directly.
Diffstat (limited to 'src')
-rw-r--r--src/pam-freerdp.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/pam-freerdp.c b/src/pam-freerdp.c
index 17b5996..fde3202 100644
--- a/src/pam-freerdp.c
+++ b/src/pam-freerdp.c
@@ -441,11 +441,6 @@ pid_t session_pid = 0;
PAM_EXTERN int
pam_sm_open_session (pam_handle_t *pamh, int flags, int argc, const char ** argv)
{
- if (session_pid != 0) {
- kill(session_pid, SIGKILL);
- session_pid = 0;
- }
-
char * username = NULL;
char * password = NULL;
char * ruser = NULL;
@@ -467,6 +462,10 @@ pam_sm_open_session (pam_handle_t *pamh, int flags, int argc, const char ** argv
goto done;
}
+ if (session_pid != 0) {
+ unpriveleged_kill(pwdent);
+ }
+
int sessionready[2];
if (pipe(sessionready) != 0) {
retval = PAM_SYSTEM_ERR;