feat: add API to get message credentials (#151)

* sdbus-cpp: Add API to get message credentials

Signed-off-by: Alexander Livenets <a.livenets@gmail.com>

* fix: add <sys/types.h> include for gid_t and other types

Co-authored-by: Stanislav Angelovič <angelovic.s@gmail.com>
This commit is contained in:
alivenets
2021-03-12 14:14:23 +01:00
committed by GitHub
parent 3f74512f8e
commit 5e03e78451
6 changed files with 213 additions and 0 deletions

View File

@ -37,6 +37,7 @@
#include <cstdint>
#include <cassert>
#include <functional>
#include <sys/types.h>
// Forward declarations
namespace sdbus {
@ -138,6 +139,14 @@ namespace sdbus {
void seal();
void rewind(bool complete);
pid_t getCredsPid() const;
uid_t getCredsUid() const;
uid_t getCredsEuid() const;
gid_t getCredsGid() const;
gid_t getCredsEgid() const;
std::vector<gid_t> getCredsSupplementaryGids() const;
std::string getSELinuxContext() const;
class Factory;
protected: