From: Junio C Hamano <gitster@pobox.com>
To: "Matthias Aßhauer" <mha1993@live.de>
Cc: "Sören Krecker" <soekkle@freenet.de>,
"Johannes Schindelin" <Johannes.Schindelin@gmx.de>,
git@vger.kernel.org, sunshine@sunshineco.com
Subject: Re: [PATCH V4 1/1] Replace SID with domain/username
Date: Wed, 03 Jan 2024 14:22:58 -0800 [thread overview]
Message-ID: <xmqqil4a83b1.fsf@gitster.g> (raw)
In-Reply-To: <DB9P250MB0692C8B4D93ED92FEE680AA9A560A@DB9P250MB0692.EURP250.PROD.OUTLOOK.COM> ("Matthias Aßhauer"'s message of "Wed, 3 Jan 2024 09:21:16 +0100 (CET)")
Matthias Aßhauer <mha1993@live.de> writes:
> This patch only changes the output of our error message, though.
> It does not change what ownership information we actually compare.
> So if we had a hypothetical user Bob that was part of the domain
> example.com (SID S-1-5-21-100000001-1000000001-10000001-1001) and
> had been moved over from the example.org domain (old SID S-1-5-21-
> 2000000002-2000000002-20000002-2002) and we would detect a repository
> owned by bobs old SID, we would now lookup the old SID, find it
> attached to a user named example.com\Bob, look up Bobs current SID,
> find it belongs to a user named example.com\Bob and print a confusing
> error message.
Yup, that is exactly the kind of breakage I was worried about.
Perhaps we should do something along the lines of ...
- The erroring out should be done purely by SID comparison, as that
is what we have been doing to protect the users.
- When creating a message, use LookupAccountSidA() to come up with
a pair of domain\user strings for the directory and the process
to be used in the error message:
- If they are different (which is expected to be the normal
case), we just use the pair of strings.
- If they are the same, show old and new SID in stringified form
(hopefully different SIDs would strigify to different
strings?), and optionally we give the domain\user string next
to it.
... then? Then we would emit an error message (in the best case)
'directory' is owned by:
'bob@example.org'
but the current user is:
'charlie@example.com'
and in a bad case we would instead see something like:
'directory' is owned by:
SID S-1-5-21-100000001-1000000001-10000001-1001 ('bob@example.org')
but the current user is:
SID S-1-5-21-200000002-2000000002-20000002-2002 ('bob@example.org')
which may still be serviceable. I dunno.
next prev parent reply other threads:[~2024-01-03 22:23 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-29 12:03 [PATCH 0/1 v2] Replace SID with domain/username on Windows Sören Krecker
2023-12-29 12:03 ` [PATCH v2 1/1] Replace SID with domain/username Sören Krecker
2024-01-02 16:20 ` Junio C Hamano
2024-01-02 17:33 ` Junio C Hamano
2023-12-31 4:08 ` [PATCH 0/1 v2] Replace SID with domain/username on Windows Eric Sunshine
2023-12-31 9:12 ` [PATCH V3 0/1] " Sören Krecker
2023-12-31 9:12 ` [PATCH v3 1/1] Replace SID with domain/username Sören Krecker
2024-01-02 17:43 ` Junio C Hamano
2024-01-02 19:15 ` [PATCH V4 0/1] Replace SID with domain/username on Windows Sören Krecker
2024-01-02 19:15 ` [PATCH V4 1/1] Replace SID with domain/username Sören Krecker
2024-01-03 0:43 ` Junio C Hamano
2024-01-03 8:21 ` Matthias Aßhauer
2024-01-03 22:22 ` Junio C Hamano [this message]
2024-01-04 19:22 ` [PATCH v5 0/1] Replace SID with domain/username on Windows Sören Krecker
2024-01-04 19:22 ` [PATCH v5 1/1] Adds domain/username to error message Sören Krecker
2024-01-04 20:09 ` Junio C Hamano
2024-01-06 11:29 ` [PATCH v6 0/1] mingw: give more details about unsafe directory's ownership Sören Krecker
2024-01-06 11:29 ` [PATCH v6 1/1] " Sören Krecker
2024-01-07 20:02 ` Johannes Sixt
2024-01-08 17:38 ` [PATCH v6 0/1] mingw: give more details about unsafe directory's Sören Krecker
2024-01-08 17:38 ` [PATCH v7 1/1] mingw: give more details about unsafe directory's ownership Sören Krecker
2024-01-08 19:18 ` Junio C Hamano
2024-01-09 19:27 ` Johannes Sixt
2024-01-09 20:06 ` Junio C Hamano
2024-01-09 21:05 ` Johannes Sixt
2024-01-09 22:34 ` Junio C Hamano
2024-01-08 17:51 ` [PATCH v6 0/1] mingw: give more details about unsafe directory's Dragan Simic
2023-12-31 9:18 ` [PATCH V3 0/1] Replace SID with domain/username on Windows Eric Sunshine
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=xmqqil4a83b1.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=Johannes.Schindelin@gmx.de \
--cc=git@vger.kernel.org \
--cc=mha1993@live.de \
--cc=soekkle@freenet.de \
--cc=sunshine@sunshineco.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;
as well as URLs for NNTP newsgroup(s).