linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Miklos Szeredi <miklos@szeredi.hu>
To: Chakra Divi <chakragithub@gmail.com>
Cc: linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH] fuse:send filep uid as part of fuse write req
Date: Wed, 11 Sep 2019 13:35:05 +0200	[thread overview]
Message-ID: <CAJfpegtDZ2ShAwkJ4hbj=sGM96QumWzzg8WsX42=AY2117p3+w@mail.gmail.com> (raw)
In-Reply-To: <1568196917-25674-1-git-send-email-chakragithub@gmail.com>

On Wed, Sep 11, 2019 at 12:15 PM Chakra Divi <chakragithub@gmail.com> wrote:
>
> In current code in fuse write request current_fsuid is sent,
> however this creates an issue in sudo execution context.
> Changes to consider uid and gid from file struture pointer
> that is created as part of open file instead of current_fsuid,gid
>
> Steps to reproduce the issue:
> 1) create user1 and user2
> 2) create a file1 with user1 on fusemount
> 3) change the file1 permissions to 600
> 4) execute the following command
> user1@linux# sudo -u user2 whoami >> /fusemnt/file1
> Here write fails with permission denied error

Not sure what's the issue here.  If filesystem wants to check open
creds, it should do so with the creds sent at open.

Does that solve your problem?

Thanks,
Miklos

  reply	other threads:[~2019-09-11 11:35 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-11 10:15 [PATCH] fuse:send filep uid as part of fuse write req Chakra Divi
2019-09-11 11:35 ` Miklos Szeredi [this message]
     [not found]   ` <CAH7=fot46GSdanJg9P2rRKrxWnpZq7+vW2CVhtZvGzKTzk__nA@mail.gmail.com>
2019-09-12  7:32     ` Miklos Szeredi

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='CAJfpegtDZ2ShAwkJ4hbj=sGM96QumWzzg8WsX42=AY2117p3+w@mail.gmail.com' \
    --to=miklos@szeredi.hu \
    --cc=chakragithub@gmail.com \
    --cc=linux-fsdevel@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).