--- ucspi-ipc-0.67.orig/src/ipcclient.c 2005-05-27 23:10:50.000000000 +0300 +++ ucspi-ipc-0.67/src/ipcclient.c 2007-09-01 00:17:28.263737695 +0300 @@ -12,6 +12,7 @@ #include "error.h" #include "strerr.h" #include "pathexec.h" +#include "fmt.h" #define FATAL "ipcclient: fatal: " #define CONNECT "ipcclient: unable to connect to " @@ -39,6 +40,10 @@ int main(int argc,char * const *argv) { const char *x; int s; int trunc; + uid_t remoteeuid; + gid_t remoteegid; + char remoteeuidstr[FMT_ULONG]; + char remoteegidstr[FMT_ULONG]; close(6); close(7); @@ -73,8 +78,16 @@ int main(int argc,char * const *argv) { strerr_warn3(CONNECT,x,": ",&strerr_sys); _exit(111); } - if (verbosity >= 2) - strerr_warn2("ipcclient: connected to ",x,0); + if (verbosity >= 2) { + if (ipc_eid(s,&remoteeuid,&remoteegid) == -1) { + strerr_warn2("ipcclient: connected to ", x, 0); + } else { + remoteeuidstr[fmt_ulong(remoteeuidstr,remoteeuid)] = 0; + remoteegidstr[fmt_ulong(remoteegidstr,remoteegid)] = 0; + strerr_warn6("ipcclient: connected to ", x, + " uid: ", remoteeuidstr, " gid: ", remoteegidstr, 0); + } + } if (!pathexec_env("PROTO","IPC")) nomem();