trust-store 2.0.3
Provides a common implementation of a trust store to be used by trusted helpers.
tagged_integer.h File Reference
#include <cstdint>
#include <ostream>
#include <type_traits>
#include <sys/types.h>
Include dependency graph for tagged_integer.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  core::trust::TaggedInteger< Tag, Integer >
 Helper structure for tagging integer types with certain semantics. More...
struct  core::trust::tag::Gid
struct  core::trust::tag::Pid
struct  core::trust::tag::Uid
struct  core::trust::tag::Feature

Namespaces

namespace  core
namespace  core::trust
 Contains functionality for implementing Ubuntu's trust model.
namespace  core::trust::tag

Typedefs

typedef TaggedInteger< tag::Gid, gid_t > core::trust::Gid
 Our internal group id type.
typedef TaggedInteger< tag::Pid, pid_t > core::trust::Pid
 Our internal process id type.
typedef TaggedInteger< tag::Uid, uid_t > core::trust::Uid
 Our internal user id type.
typedef TaggedInteger< tag::Feature, std::uint64_t > core::trust::Feature
 Our internal service-feature type.

Functions

template<typename Tag, typename Integer>
bool core::trust::operator== (const TaggedInteger< Tag, Integer > &lhs, const TaggedInteger< Tag, Integer > &rhs)
 Returns true iff both tagged integer instances are equal.
template<typename Tag, typename Integer>
bool core::trust::operator!= (const TaggedInteger< Tag, Integer > &lhs, const TaggedInteger< Tag, Integer > &rhs)
 Returns true iff both tagged integer instances are not equal.
template<typename Tag, typename Integer>
bool core::trust::operator< (const TaggedInteger< Tag, Integer > &lhs, const TaggedInteger< Tag, Integer > &rhs)
 Returns true iff the left-hand-side integer instance is smaller than the right-hand-side.
template<typename Tag, typename Integer>
std::ostream & core::trust::operator<< (std::ostream &out, const TaggedInteger< Tag, Integer > &ti)
 Pretty prints a tagged integer.