diff options
author | Timothy Pearson <tpearson@raptorengineering.com> | 2019-03-02 19:39:52 -0600 |
---|---|---|
committer | Timothy Pearson <tpearson@raptorengineering.com> | 2019-03-02 19:49:22 -0600 |
commit | 315b8914c853078d8bb04a7d16e47d19128ca318 (patch) | |
tree | 5e64fe8ea46443663d287360c5b6b45aea095fb1 /sesman/scp_v0.c | |
parent | 58e06a0aa7db8e0762b31304ead0c3e0df5a7be4 (diff) | |
download | xrdp-proprietary-315b8914c853078d8bb04a7d16e47d19128ca318.tar.gz xrdp-proprietary-315b8914c853078d8bb04a7d16e47d19128ca318.zip |
Second batch of initial commits:
* Add server/group pamming
* Partially fix immediate exit after login
Still will not compile due to libraptorsmiface being too new
Diffstat (limited to 'sesman/scp_v0.c')
-rw-r--r-- | sesman/scp_v0.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/sesman/scp_v0.c b/sesman/scp_v0.c index cc3712cc..13a1bfc8 100644 --- a/sesman/scp_v0.c +++ b/sesman/scp_v0.c @@ -30,6 +30,8 @@ #include "sesman.h" +#include "libraptorsmiface.h" + extern struct config_sesman *g_cfg; /* in sesman.c */ /******************************************************************************/ @@ -79,6 +81,16 @@ scp_v0_process(struct SCP_CONNECTION *c, struct SCP_SESSION *s) s_item = session_get_bydata(s->username, s->width, s->height, s->bpp, s->type, s->client_ip); + // RAPTOR session management + pid_t serverpid = raptor_sm_get_pid_for_username(s->username); + if (serverpid < 0) { + // Session NOT already running + if (s_item != 0) { + log_message( LOG_LEVEL_INFO, "++ [FIXME] scp claimed there was an active session, but the authoritative RAPTOR database disagrees: username %s", s->username); + } + s_item = 0; + } + if (s_item != 0) { display = s_item->display; |