From: Jaemin Ryu Date: Thu, 20 Jul 2017 08:07:36 +0000 (+0900) Subject: Change type of credential access methods to static X-Git-Tag: submit/tizen/20170724.061427^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F33%2F139733%2F1;p=platform%2Fcore%2Fsecurity%2Fklay.git Change type of credential access methods to static 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 --- diff --git a/include/klay/rmi/service.h b/include/klay/rmi/service.h index 77d33d3..ec84554 100644 --- a/include/klay/rmi/service.h +++ b/include/klay/rmi/service.h @@ -172,17 +172,17 @@ public: template 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; }