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
commit1337c11c623acf4a3a967985e29f03f0c66c2812 (patch)
tree5907056eb87afa7c68320a3d7e3193219e61a6d8 /src
parentd2358d6e2b75eb26f7dd61172a77331bfc5ea5f8 (diff)
downloadlibpam-x2go-1337c11c623acf4a3a967985e29f03f0c66c2812.tar.gz
libpam-x2go-1337c11c623acf4a3a967985e29f03f0c66c2812.tar.bz2
libpam-x2go-1337c11c623acf4a3a967985e29f03f0c66c2812.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;