From 1830249a67c807e1bae42eb1fda400ed9420bf24 Mon Sep 17 00:00:00 2001 From: Tony Garnock-Jones Date: Mon, 15 Nov 2021 16:15:24 +0100 Subject: [PATCH] Start sketching system protocols --- protocols/Makefile | 8 ++++++++ protocols/schema-bundle.bin | 1 + protocols/schemas/users-and-groups.prs | 26 ++++++++++++++++++++++++++ 3 files changed, 35 insertions(+) create mode 100644 protocols/Makefile create mode 100644 protocols/schema-bundle.bin create mode 100644 protocols/schemas/users-and-groups.prs diff --git a/protocols/Makefile b/protocols/Makefile new file mode 100644 index 0000000..1efe0bd --- /dev/null +++ b/protocols/Makefile @@ -0,0 +1,8 @@ +all: schema-bundle.bin + +clean: + rm -f schema-bundle.bin + +schema-bundle.bin: schemas/*.prs + preserves-schemac schemas/*.prs > $@.tmp + mv $@.tmp $@ diff --git a/protocols/schema-bundle.bin b/protocols/schema-bundle.bin new file mode 100644 index 0000000..50e1acd --- /dev/null +++ b/protocols/schema-bundle.bin @@ -0,0 +1 @@ +´³bundle·µ³users-and-groups„´³schema·³version‘³ definitions·³Spec´³orµµ± userAccount´³lit³user„„µ± systemAccount´³lit³system„„µ±id´³atom³ SignedInteger„„„„³Group´³rec´³lit³grent„´³tupleµ´³dict·³gid´³named³gid´³atom³ SignedInteger„„³name´³named³name´³atom³String„„„„„„„³Account´³rec´³lit³pwent„´³tupleµ´³dict·³gid´³named³gid´³atom³ SignedInteger„„³uid´³named³uid´³atom³ SignedInteger„„³home´³named³home´³atom³String„„³info´³named³info´³atom³String„„³name´³named³name´³atom³String„„³shell´³named³shell´³atom³String„„„„„„„³ EnsureGroup´³rec´³lit³ ensure-group„´³tupleµ´³named³name´³atom³String„„´³named³spec´³refµ„³Spec„„„„„³ GroupMember´³rec´³lit³ group-member„´³tupleµ´³named³uid´³atom³ SignedInteger„„´³named³gid´³atom³ SignedInteger„„„„„³ EnsureAccount´³rec´³lit³ensure-account„´³tupleµ´³named³name´³atom³String„„´³named³spec´³refµ„³Spec„„„„„„³ embeddedType€„„„„ \ No newline at end of file diff --git a/protocols/schemas/users-and-groups.prs b/protocols/schemas/users-and-groups.prs new file mode 100644 index 0000000..be5e043 --- /dev/null +++ b/protocols/schemas/users-and-groups.prs @@ -0,0 +1,26 @@ +version 1 . + +Account = . + +Group = . + +GroupMember = . + +EnsureAccount = . +EnsureGroup = . + +Spec = +/ @userAccount =user +/ @systemAccount =system +/ @id int +.