Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ SystemCallArchitectures=native
# ProtectSystem and PrivateTmp are left out: in a user unit they need unprivileged user namespaces, which some
# systems turn off. Where that works, add them with the drop-in in contrib/rnfs.service.d/hardening.conf
# (https://github.com/afit21/rnfs/blob/main/contrib/rnfs.service.d/hardening.conf). UMask is left out too: what
# `rnfs get` writes gets its permissions from your umask.
# rnfs get writes gets its permissions from your umask.

[Install]
WantedBy=default.target
Expand Down
9 changes: 9 additions & 0 deletions tests/test_packaging.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,15 @@ def test_provenance_names_the_tag(self):
self.assertIn('*--source-ref*) options="$options --source-ref=refs/tags/$RELEASE_TAG"', verify)
self.assertIn('*--deny-self-hosted-runners*) options="$options --deny-self-hosted-runners"', verify)

def test_unit_heredoc_runs_nothing(self):
"""write_unit's heredoc is unquoted (it fills in the launcher's path), so the shell would run anything in
backticks or $(...) there: only the systemd_quote of the launcher may be."""
body = shell_function("write_unit")
heredoc = body[body.index("<<EOF\n") + len("<<EOF\n"):body.index("\nEOF\n")]
self.assertNotIn("`", heredoc)
self.assertEqual(re.findall(r"\$\(", heredoc), ["$("])
self.assertIn('$(systemd_quote "$LAUNCHER")', heredoc)

def test_unit_matches_contrib(self):
"""install.sh's unit has every [Unit] and [Service] line of contrib/rnfs.service, in order, except
ExecStart (the launcher's path) and comments (SUP-6)."""
Expand Down
Loading