Add Credential::getClientID() providing the smack label 93/116893/1
authorMu-Woong Lee <muwoong.lee@samsung.com>
Thu, 2 Mar 2017 01:23:59 +0000 (10:23 +0900)
committerMu-Woong Lee <muwoong.lee@samsung.com>
Thu, 2 Mar 2017 01:23:59 +0000 (10:23 +0900)
Change-Id: I225520578f87817d362efaf9eb76eaf3bb88392e
Signed-off-by: Mu-Woong Lee <muwoong.lee@samsung.com>
include/Credential.h
src/server/Credential.cpp

index 9475371..ffc4991 100644 (file)
@@ -31,6 +31,7 @@ namespace ctx {
                bool hasPrivilege(const char* privil) const;
 
                uid_t getUid() const;
+               std::string getClientId() const;
                bool isSystem() const;
 
                static bool isSystemUid(uid_t uid);
index b8af51b..b3ab4c6 100644 (file)
@@ -138,6 +138,11 @@ uid_t Credential::getUid() const
        return __uid;
 }
 
+std::string Credential::getClientId() const
+{
+       return __clientId ? __clientId : "";
+}
+
 bool Credential::isSystem() const
 {
        return isSystemUid(__uid);