summaryrefslogtreecommitdiffstats
path: root/sesman/scp_v0.c
diff options
context:
space:
mode:
authorJay Sorg <jay.sorg@gmail.com>2017-03-20 18:59:44 -0700
committerjsorg71 <jay.sorg@gmail.com>2017-03-21 21:56:28 -0700
commit4b8a33e087ee9cf5556b40b717cd7e8ff243b3c3 (patch)
tree939bf7325777d0acb5b57e64cf41696ea65a4621 /sesman/scp_v0.c
parent43899b7e0c30cde282ef72f6431029c04c8ab242 (diff)
downloadxrdp-proprietary-4b8a33e087ee9cf5556b40b717cd7e8ff243b3c3.tar.gz
xrdp-proprietary-4b8a33e087ee9cf5556b40b717cd7e8ff243b3c3.zip
sesman: move auth/pam calls to main process
Diffstat (limited to 'sesman/scp_v0.c')
-rw-r--r--sesman/scp_v0.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/sesman/scp_v0.c b/sesman/scp_v0.c
index a1c919e2..de00068b 100644
--- a/sesman/scp_v0.c
+++ b/sesman/scp_v0.c
@@ -40,6 +40,7 @@ scp_v0_process(struct SCP_CONNECTION *c, struct SCP_SESSION *s)
tbus data;
struct session_item *s_item;
int errorcode = 0;
+ bool_t do_auth_end = 1;
data = auth_userpass(s->username, s->password, &errorcode);
@@ -135,6 +136,9 @@ scp_v0_process(struct SCP_CONNECTION *c, struct SCP_SESSION *s)
log_message(LOG_LEVEL_INFO, "starting Xorg session...");
display = session_start(data, SESMAN_SESSION_TYPE_XORG, c, s);
}
+ /* if the session started up ok, auth_end will be called on
+ sig child */
+ do_auth_end = display == 0;
}
else
{
@@ -155,5 +159,8 @@ scp_v0_process(struct SCP_CONNECTION *c, struct SCP_SESSION *s)
{
scp_v0s_deny_connection(c);
}
- auth_end(data);
+ if (do_auth_end)
+ {
+ auth_end(data);
+ }
}