mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ian Bridges <icb@fastmail.org>
To: jan.koester@tuxist.de
Cc: linkinjeon@kernel.org, senozhatsky@chromium.org, tom@talpey.com,
	chenxiaosong@chenxiaosong.com, brauner@kernel.org,
	linux-cifs@vger.kernel.org, linux-fsdevel@vger.kernel.org,
	linux-kernel@vger.kernel.org, Ian Bridges <icb@fastmail.org>
Subject: Re: [RFC PATCH 4/6] ksmbd: map user and group ids to Windows SIDs through user space
Date: Wed, 11 Nov 2026 10:08:03 -0600	[thread overview]
Message-ID: <20261111160803.4128207-1-icb@fastmail.org> (raw)
In-Reply-To: <a1eda764f3c867c02a5a5ce0@groupi3>

Hi Jan,

On Tue, Nov 10, 2026 at 09:02:46AM +0000, Jan Koester wrote:
> + * one) and ksmbd's. Built at login; a
> + * mapping user space couldn't give then is missing for the session (its
> + * ACL entries don't match: access is denied, not granted).
[...]
> +	sids = kcalloc(max, sizeof(*sids), KSMBD_DEFAULT_GFP);
> +	if (!sids)
> +		return;
> +	if (!mapped_uid_sid(user->kuid, &sids[n]))
> +		n++;

If user space cannot answer at login (-EAGAIN), ksmbd_user_set_token()
seems to leave that domain SID out of the token. It builds no token at
all when the allocation fails. The comment says access is then denied.
That holds for an allow ACE on that SID, but wouldn't a deny ACE on it
stop applying? Take a DACL with a deny of WRITE_DATA for a mapped
group, followed by an allow of full access for Everyone. Would a member
whose group SID is missing get write access through the Everyone entry
for the whole session? Could -EAGAIN and allocation failures be
returned from the token build so the login fails, while -ENOENT, for an
account with no mapping, stays as it is?

Thanks,
Ian

  reply	other threads:[~2026-11-11 16:08 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-10  9:02 Jan Koester
2026-11-11 16:08 ` Ian Bridges [this message]
  -- strict thread matches above, loose matches on Subject: below --
2026-10-28  6:19 [RFC PATCH 0/6] ksmbd: Windows SIDs for user and group ids Jan Koester
2026-10-28  6:20 ` [RFC PATCH 4/6] ksmbd: map user and group ids to Windows SIDs through user space Jan Koester

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=20261111160803.4128207-1-icb@fastmail.org \
    --to=icb@fastmail.org \
    --cc=brauner@kernel.org \
    --cc=chenxiaosong@chenxiaosong.com \
    --cc=jan.koester@tuxist.de \
    --cc=linkinjeon@kernel.org \
    --cc=linux-cifs@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=senozhatsky@chromium.org \
    --cc=tom@talpey.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

all inboxes | Powered by JetHome®