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_v1.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_v1.c')
| -rw-r--r-- | sesman/scp_v1.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/sesman/scp_v1.c b/sesman/scp_v1.c index 60f82112..607aeca5 100644 --- a/sesman/scp_v1.c +++ b/sesman/scp_v1.c @@ -33,6 +33,8 @@ //#include "libscp_types.h" #include "libscp.h" +#include "libraptorsmiface.h" + extern struct config_sesman *g_cfg; /* in sesman.c */ static void parseCommonStates(enum SCP_SERVER_STATES_E e, const char *f); @@ -109,6 +111,13 @@ scp_v1_process(struct SCP_CONNECTION *c, struct SCP_SESSION *s) /* list disconnected sessions */ slist = session_get_byuser(s->username, &scount, SESMAN_SESSION_STATUS_DISCONNECTED); + // RAPTOR session management + pid_t serverpid = raptor_sm_get_pid_for_username(s->username); + if (serverpid < 0) { + // Session NOT already running + scount = 0; + } + if (scount == 0) { /* no disconnected sessions - start a new one */ |
