Change type of credential access methods to static 33/139733/1 submit/tizen/20170724.061427 submit/tizen/20170724.094119
authorJaemin Ryu <jm77.ryu@samsung.com>
Thu, 20 Jul 2017 08:07:36 +0000 (17:07 +0900)
committerJaemin Ryu <jm77.ryu@samsung.com>
Thu, 20 Jul 2017 08:07:36 +0000 (17:07 +0900)
With this commit, IPC handler can access peer credentials with out
rmi::Service instance.

Note: Peer credentials are maintained in static thread local storage.

Change-Id: Iec7ff64297180c86a4f7eb118b160b6e53740c2c
Signed-off-by: Jaemin Ryu <jm77.ryu@samsung.com>
include/klay/rmi/service.h

index 77d33d3b2b0ce95b3a9b189359602a4fb89696ce..ec84554e70b2a31b401c88cd5ba1c0e7cb703d76 100644 (file)
@@ -172,17 +172,17 @@ public:
        template <typename... Args>
        void notify(const std::string& name, Args&&... args);
 
-       pid_t getPeerPid() const
+       static pid_t getPeerPid()
        {
                return processingContext.credentials.pid;
        }
 
-       uid_t getPeerUid() const
+       static uid_t getPeerUid()
        {
                return processingContext.credentials.uid;
        }
 
-       gid_t getPeerGid() const
+       static gid_t getPeerGid()
        {
                return processingContext.credentials.gid;
        }