public inbox for cygwin-cvs@sourceware.org help / color / mirror / Atom feed
From: Corinna Vinschen <corinna@sourceware.org> To: cygwin-cvs@sourceware.org Subject: [newlib-cygwin/main] Respect `db_home` setting even for SYSTEM/Microsoft accounts Date: Mon, 3 Apr 2023 18:36:10 +0000 (GMT) [thread overview] Message-ID: <20230403183611.025663858D39@sourceware.org> (raw) https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=cc8404039f50c36100fbad85a3af22d579d3576a commit cc8404039f50c36100fbad85a3af22d579d3576a Author: Johannes Schindelin <johannes.schindelin@gmx.de> AuthorDate: Mon Apr 3 16:45:03 2023 +0200 Commit: Corinna Vinschen <corinna@vinschen.de> CommitDate: Mon Apr 3 18:17:43 2023 +0200 Respect `db_home` setting even for SYSTEM/Microsoft accounts We should not blindly set the home directory of the SYSTEM account (or of Microsoft accounts) to `/home/<name>`, especially `/etc/nsswitch.conf` defines `db_home: env`, in which case we want to respect the `HOME` variable. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Diff: --- winsup/cygwin/uinfo.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/winsup/cygwin/uinfo.cc b/winsup/cygwin/uinfo.cc index baa670478dfe..d493d29b3bd3 100644 --- a/winsup/cygwin/uinfo.cc +++ b/winsup/cygwin/uinfo.cc @@ -2234,7 +2234,11 @@ pwdgrp::fetch_account_from_windows (fetch_user_arg_t &arg, cyg_ldap *pldap) it to a well-known group here. */ if (acc_type == SidTypeUser && (sid_sub_auth_count (sid) <= 3 || sid_id_auth (sid) == 11)) - acc_type = SidTypeWellKnownGroup; + { + acc_type = SidTypeWellKnownGroup; + home = cygheap->pg.get_home ((PUSER_INFO_3) NULL, sid, dom, name, + fully_qualified_name); + } switch ((int) acc_type) { case SidTypeUser:
reply other threads:[~2023-04-03 18:36 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20230403183611.025663858D39@sourceware.org \ --to=corinna@sourceware.org \ --cc=cygwin-cvs@sourceware.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: linkBe 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 read-only IMAP folder(s) and NNTP newsgroup(s).