summaryrefslogtreecommitdiffstats
path: root/include/sysutils
diff options
context:
space:
mode:
Diffstat (limited to 'include/sysutils')
-rw-r--r--include/sysutils/SocketClient.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/sysutils/SocketClient.h b/include/sysutils/SocketClient.h
index 469dd9d08..e7fb17756 100644
--- a/include/sysutils/SocketClient.h
+++ b/include/sysutils/SocketClient.h
@@ -4,16 +4,29 @@
#include "../../../frameworks/base/include/utils/List.h"
#include <pthread.h>
+#include <sys/types.h>
class SocketClient {
int mSocket;
pthread_mutex_t mWriteMutex;
+ /* Peer process ID */
+ pid_t mPid;
+
+ /* Peer user ID */
+ uid_t mUid;
+
+ /* Peer group ID */
+ gid_t mGid;
+
public:
SocketClient(int sock);
virtual ~SocketClient() {}
int getSocket() { return mSocket; }
+ pid_t getPid() const { return mPid; }
+ uid_t getUid() const { return mUid; }
+ gid_t getGid() const { return mGid; }
int sendMsg(int code, const char *msg, bool addErrno);
int sendMsg(const char *msg);