engine: resources: Add symlink param to the file res

This adds initial symlink support to the file resource, and while it is
hopefully correct, there are always sneaky edge cases around symlinks
and security, so review and tests are highly encouraged!
This commit is contained in:
James Shubin
2025-04-22 02:21:58 -04:00
parent 60a3d7c65e
commit de970ee557
2 changed files with 147 additions and 9 deletions

17
examples/lang/symlink.mcl Normal file
View File

@@ -0,0 +1,17 @@
file "/tmp/symlink1" {
state => "exists",
source => "foo",
symlink => true,
}
file "/tmp/symlink2" {
state => "exists",
source => "food/",
symlink => true,
}
file "/tmp/symlink3" {
state => "exists",
source => "/tmp/foo",
symlink => true,
}