Refactor xrdp_listen to allow for privilege drop

- xrdp_listen.c is refactored so we can create the
  listening socket(s) before dropping privileges.
- The code which reads startup params from xrdp.ini
  is moved from xrdp_listen.c to xrdp.c, so it
  is only called once if we test the listen before
  starting the daemon.
This commit is contained in:
matt335672
2024-02-27 11:53:34 +00:00
parent 17a56567d2
commit ddff9ebb32
4 changed files with 195 additions and 182 deletions
+5 -2
View File
@@ -122,8 +122,11 @@ tc_mutex_delete(tbus mutex)
pthread_mutex_t *lmutex;
lmutex = (pthread_mutex_t *)mutex;
pthread_mutex_destroy(lmutex);
g_free(lmutex);
if (lmutex != NULL)
{
pthread_mutex_destroy(lmutex);
g_free(lmutex);
}
#endif
}