summaryrefslogtreecommitdiffstats
path: root/xup
diff options
context:
space:
mode:
authorJay Sorg <jay.sorg@gmail.com>2013-10-01 22:42:12 -0700
committerJay Sorg <jay.sorg@gmail.com>2013-10-01 22:42:12 -0700
commitb598e258a43dc3ca6f3dcc37ceb6a2a6c18227d1 (patch)
tree8860215afea0ca3c35e03fb9b86d33a1e3b83187 /xup
parentcd93db2c98425645c9c79fece04617c4d82184c3 (diff)
downloadxrdp-proprietary-b598e258a43dc3ca6f3dcc37ceb6a2a6c18227d1.tar.gz
xrdp-proprietary-b598e258a43dc3ca6f3dcc37ceb6a2a6c18227d1.zip
add pid logging
Diffstat (limited to 'xup')
-rw-r--r--xup/xup.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/xup/xup.c b/xup/xup.c
index 7c68cbcf..e2e32de7 100644
--- a/xup/xup.c
+++ b/xup/xup.c
@@ -137,6 +137,28 @@ lib_mod_start(struct mod *mod, int w, int h, int bpp)
}
/******************************************************************************/
+static int APP_CC
+lib_mod_log_peer(struct mod *mod)
+{
+ int my_pid;
+ int pid;
+ int uid;
+ int gid;
+
+ my_pid = g_get_pid();
+ if (g_sck_get_peer_cred(mod->sck, &pid, &uid, &gid) == 0)
+ {
+ g_writeln("lib_mod_connect: xrdp pid %d", my_pid);
+ g_writeln(" X11rdp pid %d, uid %d gid %d", pid, uid, gid);
+ }
+ else
+ {
+ g_writeln("lib_mod_connect: g_sck_get_peer_cred failed");
+ }
+ return 0;
+}
+
+/******************************************************************************/
/* return error */
int DEFAULT_CC
lib_mod_connect(struct mod *mod)
@@ -254,6 +276,14 @@ lib_mod_connect(struct mod *mod)
if (error == 0)
{
+ if (use_uds)
+ {
+ lib_mod_log_peer(mod);
+ }
+ }
+
+ if (error == 0)
+ {
/* send version message */
init_stream(s, 8192);
s_push_layer(s, iso_hdr, 4);