all lists on lists.proxmox.com
 help / color / mirror / Atom feed
* [pbs-devel] [PATCH proxmox-backup 1/3] pull: filter local removal candidates by owner
@ 2022-04-29  9:17 Fabian Grünbichler
  2022-04-29  9:17 ` [pbs-devel] [PATCH proxmox-backup 2/3] pull: remove unnecessary `pub` visibility Fabian Grünbichler
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Fabian Grünbichler @ 2022-04-29  9:17 UTC (permalink / raw)
  To: pbs-devel

else this might remove groups which are not part of the pull scope. note
that setting/using remove_vanished already checks the required privs
earlier.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
---
 src/server/pull.rs | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/server/pull.rs b/src/server/pull.rs
index 097bd5cb..c0831417 100644
--- a/src/server/pull.rs
+++ b/src/server/pull.rs
@@ -28,7 +28,7 @@ use pbs_datastore::index::IndexFile;
 use pbs_datastore::manifest::{
     archive_type, ArchiveType, BackupManifest, FileInfo, CLIENT_LOG_BLOB_NAME, MANIFEST_BLOB_NAME,
 };
-use pbs_datastore::{DataStore, StoreProgress};
+use pbs_datastore::{check_backup_owner, DataStore, StoreProgress};
 use pbs_tools::sha::sha256;
 use proxmox_rest_server::WorkerTask;
 
@@ -801,6 +801,10 @@ pub async fn pull_store(
                 if new_groups.contains(local_group.as_ref()) {
                     continue;
                 }
+                let owner = params.store.get_owner(&local_group.group())?;
+                if check_backup_owner(&owner, &params.owner).is_err() {
+                    continue;
+                }
                 if let Some(ref group_filter) = &params.group_filter {
                     if !apply_filters(local_group.as_ref(), group_filter) {
                         continue;
-- 
2.30.2





^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-05-02 12:21 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-29  9:17 [pbs-devel] [PATCH proxmox-backup 1/3] pull: filter local removal candidates by owner Fabian Grünbichler
2022-04-29  9:17 ` [pbs-devel] [PATCH proxmox-backup 2/3] pull: remove unnecessary `pub` visibility Fabian Grünbichler
2022-04-29  9:17 ` [pbs-devel] [PATCH proxmox-backup 3/3] pull: add some comments Fabian Grünbichler
2022-05-02 12:21 ` [pbs-devel] applied-series: [PATCH proxmox-backup 1/3] pull: filter local removal candidates by owner Thomas Lamprecht

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal