All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Björn JACKE" <bj@SerNet.DE>
To: "Aurélien Aptel" <aaptel@suse.com>
Cc: linux-cifs@vger.kernel.org
Subject: Re: cifs multiuser mode and per session treatment
Date: Tue, 17 Dec 2019 11:07:23 +0100	[thread overview]
Message-ID: <20191217100723.GB18027@sernet.de> (raw)
In-Reply-To: <8736dkv6ub.fsf@suse.com>

On 2019-12-16 at 12:38 +0100 Aurélien Aptel sent off:
> In terms of implementation each cifs mount stores a dictionnary mapping
> uid to TreeCon (it's the tlink rb-tree, see cifs_sb_tlink(),
> tlink_rb_search(), etc).
> 
> I think it should just be a matter of storing the session id as the key
> in the tlink rb-tree instead of uid (we use fsuid actually). This way
> when a new session does a syscall on the mount, the lookup will fail, it
> will try to create a new tlink, and fail unless there is the krb stuff
> in the keyring.

Awewone, looks like you have a plan already.


> But are you sure root cannot "enter" an existing user session? I think
> I've done it for screen sessions in the past...

screen sessions are only local sockets without access protection from the
kernel. I can't say for sure if there is a way for root to access users'
session keyrings (I didn't find any) but it was one of the goals of the session
keyring implementation that not even root can access the user keys in there.

Cheers
Björn

      reply	other threads:[~2019-12-17 10:07 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-13 12:14 cifs multiuser mode and per session treatment Björn JACKE
2019-12-16 11:38 ` Aurélien Aptel
2019-12-17 10:07   ` Björn JACKE [this message]

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=20191217100723.GB18027@sernet.de \
    --to=bj@sernet.de \
    --cc=aaptel@suse.com \
    --cc=linux-cifs@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 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.