Nix
2.93.3
Lix: A modern, delicious implementation of the Nix package manager; unstable internal interfaces
Loading...
Searching...
No Matches
lock.hh
Go to the documentation of this file.
1
#pragma once
3
4
#include <memory>
5
6
#include <sys/types.h>
7
#include <vector>
8
9
namespace
nix {
10
11
struct
UserLock
12
{
13
virtual
~UserLock
() { }
14
18
std::pair<uid_t, uid_t>
getUIDRange
()
19
{
20
auto
first =
getUID
();
21
return
{first, first + getUIDCount() - 1};
22
}
23
27
virtual
uid_t
getUID
() = 0;
28
29
virtual
uid_t getUIDCount() = 0;
30
31
virtual
gid_t getGID() = 0;
32
33
virtual
std::vector<gid_t> getSupplementaryGIDs() = 0;
34
};
35
40
std::unique_ptr<UserLock> acquireUserLock(uid_t nrIds,
bool
useUserNamespace);
41
42
bool
useBuildUsers();
43
44
}
nix::UserLock
Definition
lock.hh:12
nix::UserLock::getUIDRange
std::pair< uid_t, uid_t > getUIDRange()
Definition
lock.hh:18
nix::UserLock::getUID
virtual uid_t getUID()=0
lix
libstore
lock.hh
Generated by
1.15.0