1
0
Fork 0
mirror of https://github.com/restic/restic.git synced 2025-03-09 00:00:02 +01:00
restic/internal
Michael Eischer 99e105eeb6 repository: restrict SaveUnpacked and RemoveUnpacked
Those methods now only allow modifying snapshots. Internal data types
used by the repository are now read-only. The repository-internal code
can bypass the restrictions by wrapping the repository in an
`internalRepository` type.

The restriction itself is implemented by using a new datatype
WriteableFileType in the SaveUnpacked and RemoveUnpacked methods. This
statically ensures that code cannot bypass the access restrictions.

The test changes are somewhat noisy as some of them modify repository
internals and therefore require some way to bypass the access
restrictions. This works by capturing an `internalRepository` or
`Backend` when creating the Repository using a test helper function.
2025-01-13 22:39:57 +01:00
..
archiver repository: restrict SaveUnpacked and RemoveUnpacked 2025-01-13 22:39:57 +01:00
backend Merge pull request #5162 from MichaelEischer/promote-feature-gates 2025-01-13 22:03:06 +01:00
bloblru Fix typos 2024-07-03 20:02:06 +02:00
checker repository: restrict SaveUnpacked and RemoveUnpacked 2025-01-13 22:39:57 +01:00
crypto crypto: cleanup ciphertext verification error 2024-06-05 22:33:20 +02:00
debug improve fprintf related error handling 2024-11-01 17:07:43 +01:00
dump Merge pull request #5054 from phillipp/dump-compress-zip 2024-10-16 19:17:47 +00:00
errors errors, fs: Replace CombineErrors with stdlib Join 2024-10-05 10:56:40 +02:00
feature Stabilize explicit-s3-anonymous-auth and safe-forget-keep-tags flags 2024-11-30 21:22:51 +01:00
filter move include/exclude options to filter package 2024-08-31 18:04:07 +02:00
fs Merge pull request #4990 from m-wild/exclude-cloud-files 2025-01-13 21:24:53 +01:00
fuse fuse: test that the same fs.Node is used for the same file 2024-09-14 18:11:44 +02:00
migrations repository: restrict SaveUnpacked and RemoveUnpacked 2025-01-13 22:39:57 +01:00
options backend, options: Prefer strings.Cut to SplitN 2022-12-02 19:19:14 +01:00
repository repository: restrict SaveUnpacked and RemoveUnpacked 2025-01-13 22:39:57 +01:00
restic repository: restrict SaveUnpacked and RemoveUnpacked 2025-01-13 22:39:57 +01:00
restorer ui: restore --delete indicates number of deleted files (#5100) 2024-12-01 15:29:11 +01:00
selfupdate Replace lots of unused parameters with _ 2023-05-18 21:17:53 +02:00
test use consistent alias for interal/test package 2024-03-29 00:24:03 +01:00
textfile Replace most usages of ioutil with the underlying function 2022-12-02 19:36:43 +01:00
ui ui: restore --delete indicates number of deleted files (#5100) 2024-12-01 15:29:11 +01:00
walker ls: proper error handling if output is not possible 2024-11-01 17:07:43 +01:00