[pbs-devel] [PATCH proxmox-backup] fix: config: remove duplicate privilege lookup in cached_user_info
Stefan Sterz
s.sterz at proxmox.com
Fri Jun 10 10:13:25 CEST 2022
`lookup_privs` just uses `lookup_privs_details` but ignores the
propagated privileges it returns. thus, the lookup here is redundant
as it is immediately followed by a call to `lookup_privs_details` with
the same parameters.
Signed-off-by: Stefan Sterz <s.sterz at proxmox.com>
---
pbs-config/src/cached_user_info.rs | 1 -
1 file changed, 1 deletion(-)
diff --git a/pbs-config/src/cached_user_info.rs b/pbs-config/src/cached_user_info.rs
index 8dd2375a..b9534b80 100644
--- a/pbs-config/src/cached_user_info.rs
+++ b/pbs-config/src/cached_user_info.rs
@@ -170,7 +170,6 @@ impl CachedUserInfo {
if auth_id.is_token() {
// limit privs to that of owning user
let user_auth_id = Authid::from(auth_id.user().clone());
- privs &= self.lookup_privs(&user_auth_id, path);
let (owner_privs, owner_propagated_privs) =
self.lookup_privs_details(&user_auth_id, path);
privs &= owner_privs;
--
2.30.2
More information about the pbs-devel
mailing list