Commit graph

10 commits

Author SHA1 Message Date
Alex David
98a6bd032c Add reset combinator 2025-11-10 11:50:37 -08:00
Alex David
d596e0bc81 Fix time-zone combinator on missing /etc/localtime
Thanks ~charlie-collard for reporting this

Fixes https://todo.sr.ht/~alexdavid/jail.nix/2
2025-10-14 19:38:49 -07:00
Alex David
dffe5d150c Update readonly-paths-from-var test case
In 8fa6d132e1, ~mathiassven submitted a
patch that fixes the `readonly-paths-from-var` combinator omitting the
final path.

The tests didn't catch this since the final path in the test was a
non-existent path.

This commit backfills the test to catch regressions related to this bug.
The test now makes sure that the first, last, and at least one middle
test path are real paths that show up in the jail.
2025-10-10 16:45:13 -07:00
Alex David
e45e8a7ccb Only forward valid URLs in open-urls-in-browser
This is unlikely to be exploited since the combinator only allows a
single argument and is not parsed by any shell, but it seems like a good
thing to ensure that only valid non-local URLs will be forwarded to
$BROWSER.
2025-10-10 16:28:45 -07:00
Alex David
3ccf1d42e2 Add try-* bind combinators 2025-09-27 10:51:19 -07:00
Alex David
45c2b47d71 Fix time-zone combinator
Most software that wants to know the timezone reads the symlink in
`/etc/localtime`. A previous update broke this assumption when
attempting to fix the combinator to work on non-NixOS systems.

This change should fix the time-zone combinator in both NixOS and
non-NixOS systems.
2025-09-15 22:26:44 -07:00
Alex David
d35e9df391 Add open-urls-in-browser combinator 2025-09-01 21:47:48 -07:00
Alex David
f5cc61ef63 Add jail-to-host-channel combinator 2025-09-01 21:47:48 -07:00
Alex David
275a1296e7 Fix network combinator binding too many paths 2025-09-01 21:47:48 -07:00
Alex David
d8b14ca5ee Rewrite tests in haskell 2025-08-27 12:14:55 -07:00