[PATCH v4 3/3] Respect `db_home: env` even when no uid can be determined
Johannes Schindelin
Johannes.Schindelin@gmx.de
Mon Apr 3 13:19:32 GMT 2023
Hi Corinna,
On Mon, 3 Apr 2023, Johannes Schindelin wrote:
> On Tue, 28 Mar 2023, Corinna Vinschen wrote:
>
> > On Mar 28 10:17, Johannes Schindelin wrote:
>
> > > diff --git a/winsup/cygwin/uinfo.cc b/winsup/cygwin/uinfo.cc
> > > index d493d29b3b..b01bcff5cb 100644
> > > --- a/winsup/cygwin/uinfo.cc
> > > +++ b/winsup/cygwin/uinfo.cc
> > > @@ -883,6 +883,8 @@ fetch_from_path (cyg_ldap *pldap, PUSER_INFO_3 ui, cygpsid &sid, PCWSTR str,
> > > case L'u':
> > > if (full_qualified)
> > > {
> > > + if (!dom)
> > > + break;
> >
> > No domain? Really?
>
> Yes, I distinctly remember that I had to do that, otherwise the code would
> not work as intended.
Right. This is actually really easy to explain: The new call I introduced
in this very patch passes `NULL` as the `dom` parameter (because this is
in a scenario where we do indeed not have a domain to work with):
if (arg.id == cygheap->user.real_uid)
home = cygheap->pg.get_home ((PUSER_INFO_3) NULL,
cygheap->user.sid(),
NULL, NULL, false);
^^^^
this is the `dom` parameter
(see
https://github.com/dscho/msys2-runtime/commit/4cd6ae73074f327064b54a08392906dbc140714a#diff-1ffeda03bc188fa732454f52c4932977bc8233d9db4da19ab5acb0c58c7320ccR2188-R2191
for details)
Ciao,
Johannes
More information about the Cygwin-patches
mailing list