-
Notifications
You must be signed in to change notification settings - Fork 33
Fall back to HOME environment variable #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This fixes the OpenSSH problem here (where @sschuberth @t-b could you have a look? |
if (!home) | ||
{ | ||
char *env = NULL; | ||
env = getenv("HOME"); |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
Looks good to me know. Note that I haven't checked that |
Yeah, I should put in a little bit more information into the commit message. Sorry & thanks for pointing it out! |
minor nit: In the commit message it should be |
014ef9f
to
73c9509
Compare
So far, MSys2 always insists on using /home/<username> as home directory, even when the HOME variable is set. For consistency, let's adopt Git for Windows' strategy to look at the HOME variable, falling back to $HOMEDRIVE$HOMEPATH, and falling back even further to $USERPROFILE. This is particularly important when OpenSSH looks for the .ssh/ directory: it actually asks getpwuid() to determine the user's home directory. The msys2-runtime in turn asks the Cygwin's user info cache: https://github.com/Alexpux/Cygwin/blob/6e95f9f5/winsup/cygwin/passwd.cc#L114 This user info cache is initialized during user_info::initialize() in winsup/cygwin/shared.cc which through a chain of calls ends up calling pwdgrp::fetch_account_from_windows(). Incidentally, the fetch_account_from_windows() function is the only source identified by a `git grep /home/` which this developer ran to find out where the erroneous path came from. It turns out that the fetch_accound_from_windows() function fails to identify the home directory which is why MSys2's fallback kicks in. By enhancing that fallback to follow Git for Windows' reasoning, we fix *all* MSys2 programs to find the correct home directory. Assisted-by: Sebastian Schuberth <[email protected]> Assisted-by: Thomas Braun <[email protected]> Signed-off-by: Johannes Schindelin <[email protected]>
D'oh! In an earlier version, I had the
Fixed, too. |
Looks good! |
Fall back to HOME environment variable
Thank you! |
@Alexpux unfortunately, your suggestion caused us trouble: git-for-windows/git#100. How would you suggest to proceed? |
don't set |
@Alexpux I am certain that you can do much better than throwing out this single line. It is not even a well-considered statement, given that MSys1 did respect the So let me summarize the problem: Cygwin's technique to determine the home directory when And this is how I intend to solve the problem: come up with a patch that uses the This patch will first make it into |
What problem with |
Sorry, I thought you read this ticket: git-for-windows/git#100 To recapitulate: The problem is that setting the Previously, we were able to override such faulty behavior by asking users with such setups to define the |
@Alexpux it would be good if you could read over dscho@bc51eea and commented on it -- keeping in mind that we have to have a way to override the |
Add a new "interleave" allocation policy which stripes pages across domains with a stride or width keeping contiguity within a multi-page region. Move the kernel to the dedicated numbered cpuset #2 making it possible to assign kernel threads and memory policy separately from user. This also eliminates the need for the complicated interrupt binding code. Add a sysctl API for viewing and manipulating domainsets. Refactor some of the cpuset_t manipulation code using the generic bitset type so that it can be used for both. This probably belongs in a dedicated subr file. Attempt to improve the include situation. Reviewed by: kib Discussed with: jhb (cpuset parts) Tested by: pho (before review feedback) Sponsored by: Netflix, Dell/EMC Isilon Differential Revision: https://reviews.freebsd.org/D14839
- The PRU newlib port is supposed to implement case git-for-windows#2 as described in newlib/libc/include/reent.h . Thus drop the defining of MISSING_SYSCALL_NAMES. - libgloss/configure: Regenerate. - libgloss/libnosys/acinclude.m4: Do not define MISSING_SYSCALL_NAMES for pru. Signed-off-by: Dimitar Dimitrov <[email protected]>
So far, MSys2 always insists on using /home/ as home
directory, even when the HOME variable is set.
For consistency, let's adopt Git for Windows' strategy to look
at the HOME variable, falling back to $HOMEDRIVE$HOMEPAT, and falling
back even further to $USERPROFILE.
Signed-off-by: Johannes Schindelin [email protected]