5 #ifndef CVMFS_AUTHZ_AUTHZ_SESSION_H_
6 #define CVMFS_AUTHZ_AUTHZ_SESSION_H_
15 #include "gtest/gtest_prod.h"
49 bool IsMemberOf(
const pid_t pid,
const std::string &membership);
82 return (pid == other.
pid) &&
87 return !(*
this == other);
100 return (
sid == other.
sid) &&
105 return !(*
this == other);
114 key_info.pid = key.
pid;
116 return MurmurHash2(&key_info,
sizeof(key_info), 0x07387a4f);
124 key_info.pid = key.
sid;
126 return MurmurHash2(&key_info,
sizeof(key_info), 0x07387a4f);
137 const SessionKey &session_key,
138 const std::string &membership,
170 #endif // CVMFS_AUTHZ_AUTHZ_SESSION_H_
bool operator==(const PidKey &other) const
SmallHashDynamic< PidKey, SessionKey > pid2session_
pthread_mutex_t lock_pid2session_
bool LookupAuthzData(const PidKey &pid_key, const SessionKey &session_key, const std::string &membership, AuthzData *authz_data)
bool LookupSessionKey(pid_t pid, PidKey *pid_key, SessionKey *session_key)
static const unsigned kPidLifetime
static uint32_t HashSessionKey(const SessionKey &key)
void SweepCreds(uint64_t now)
bool operator!=(const PidKey &other) const
SmallHashDynamic< SessionKey, AuthzData > session2cred_
bool GetPidInfo(pid_t pid, PidKey *pid_key)
AuthzFetcher * authz_fetcher_
AuthzToken * GetTokenCopy(const pid_t pid, const std::string &membership)
struct cvmcache_object_info __attribute__
void SweepPids(uint64_t now)
uint64_t deadline_sweep_creds_
perf::Counter * no_session_
static AuthzSessionManager * Create(AuthzFetcher *authz_fetcher, perf::Statistics *statistics)
static uint32_t HashPidKey(const PidKey &key)
bool IsMemberOf(const pid_t pid, const std::string &membership)
pthread_mutex_t lock_session2cred_
bool operator==(const SessionKey &other) const
FRIEND_TEST(T_AuthzSession, GetPidInfo)
bool operator!=(const SessionKey &other) const
static const unsigned kSweepInterval
uint64_t deadline_sweep_pids_
uint32_t MurmurHash2(const void *key, int len, uint32_t seed)