Skip to content

Commit

Permalink
[antlir] Add standard uidmaps
Browse files Browse the repository at this point in the history
Summary: Adding lists of known UIDs and GIDs. Each file represents a logical namespace (e.g. instagram, wsl, metalos). All UIDs/GIDs should be unique within a namespace. Code is extracted from D66000745, see that diff for more context.

Test Plan: used in next diffs

Reviewed By: epilatow

Differential Revision: D66301414

fbshipit-source-id: c68fcfb67acb91de091b72c58dea4e4d0cb42baf
  • Loading branch information
pzmarzly authored and facebook-github-bot committed Nov 21, 2024
1 parent 57681fd commit 6761581
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 0 deletions.
24 changes: 24 additions & 0 deletions antlir/uidmaps/BUCK
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
load("@prelude//:paths.bzl", "paths")
load("//antlir/bzl:build_defs.bzl", "alias", "export_file", "internal_external")
# @oss-disable

oncall("antlir")

alias(
name = "default",
actual = internal_external(
fb = ":metalos",
oss = ":antlir",
),
visibility = ["PUBLIC"],
)

[
export_file(
name = paths.basename(f).removesuffix(".json"),
src = f,
)
for f in glob(["**/*.json"])
]

# @oss-disable
24 changes: 24 additions & 0 deletions antlir/uidmaps/antlir.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"users": {
"antlir": {
"uid": 1000
},
"foouser": {
"uid": 1001
},
"demoservice": {
"uid": 1002
}
},
"groups": {
"antlir": {
"gid": 1000
},
"foogroup": {
"gid": 1001
},
"demoservice": {
"gid": 1002
}
}
}
10 changes: 10 additions & 0 deletions antlir/uidmaps/centos.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"users": {
"systemd-network": {"uid": 192},
"systemd-resolve": {"uid": 193}
},
"groups": {
"systemd-network": {"gid": 192},
"systemd-resolve": {"gid": 193}
}
}

0 comments on commit 6761581

Please sign in to comment.