public inbox for pbs-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Stefan Sterz <s.sterz@proxmox.com>
To: pbs-devel@lists.proxmox.com
Subject: [pbs-devel] [PATCH proxmox-backup] fix: config: remove duplicate privilege lookup in cached_user_info
Date: Fri, 10 Jun 2022 10:13:25 +0200	[thread overview]
Message-ID: <20220610081325.96912-1-s.sterz@proxmox.com> (raw)

`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@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





             reply	other threads:[~2022-06-10  8:14 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-10  8:13 Stefan Sterz [this message]
2022-06-10  8:52 ` Wolfgang Bumiller
2022-06-10  9:00   ` Stefan Sterz
2022-06-10  9:31 ` [pbs-devel] applied: " Wolfgang Bumiller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220610081325.96912-1-s.sterz@proxmox.com \
    --to=s.sterz@proxmox.com \
    --cc=pbs-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal