From 5764300022f7afceb2e54babe5ffed6e56b7aff9 Mon Sep 17 00:00:00 2001 From: Aneesh Nireshwalia <99904+aneesh-n@users.noreply.github.com> Date: Sat, 24 Feb 2024 13:47:49 -0700 Subject: [PATCH] Add changelog and fix lint error --- changelog/unreleased/pull-4708 | 12 ++++++++++++ internal/errors/errors.go | 3 +-- 2 files changed, 13 insertions(+), 2 deletions(-) create mode 100644 changelog/unreleased/pull-4708 diff --git a/changelog/unreleased/pull-4708 b/changelog/unreleased/pull-4708 new file mode 100644 index 000000000..2c666c300 --- /dev/null +++ b/changelog/unreleased/pull-4708 @@ -0,0 +1,12 @@ +Enhancement: Back up and restore SecurityDescriptors on Windows + +Restic did not back up SecurityDescriptors of files on Windows. +Restic now backs up and restores SecurityDescriptors (which includes owner, group, +discretionary access control list (DACL), system access control list (SACL)) +when backing up files and folders on Windows. This requires the user to be +a member of backup operators or the application must be run as admin. +If that is not the case, only the current user's owner, group and DACL will be backed up +and during restore only the DACL of the backed file will be restored while the current +user's owner and group will be set during the restore. + +https://github.com/restic/restic/pull/4708 diff --git a/internal/errors/errors.go b/internal/errors/errors.go index 68a48b325..ca36611eb 100644 --- a/internal/errors/errors.go +++ b/internal/errors/errors.go @@ -65,7 +65,6 @@ func CombineErrors(errors ...error) (err error) { return nil // If no errors, return nil } else if !multipleErrors { return err // If only one error, return that first error - } else { - return fmt.Errorf("multiple errors occurred: [%s]", combinedErrorMsg) } + return fmt.Errorf("multiple errors occurred: [%s]", combinedErrorMsg) }