FreeBSD Bugzilla – Attachment 147004 Details for
Bug 193426
lang/mono: allow overriding Environment.SpecialFolder.Personal e.g., HOME=${WRKDIR}
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
reorder
patch-eglib_src_gmisc-unix.c (text/plain), 1.02 KB, created by
Jan Beich
on 2014-09-07 12:32:27 UTC
(
hide
)
Description:
reorder
Filename:
MIME Type:
Creator:
Jan Beich
Created:
2014-09-07 12:32:27 UTC
Size:
1.02 KB
patch
obsolete
>https://github.com/mono/mono/pull/371 > >--- eglib/src/gmisc-unix.c~ >+++ eglib/src/gmisc-unix.c >@@ -93,24 +93,27 @@ get_pw_data (void) > pthread_mutex_unlock (&pw_lock); > return; > } >+ >+ home_dir = g_getenv ("HOME"); >+ user_name = g_getenv ("USER"); >+ > #ifdef HAVE_GETPWUID_R >- if (getpwuid_r (getuid (), &pw, buf, 4096, &result) == 0) { >- home_dir = g_strdup (pw.pw_dir); >- user_name = g_strdup (pw.pw_name); >+ if (home_dir == NULL || user_name == NULL) { >+ if (getpwuid_r (getuid (), &pw, buf, 4096, &result) == 0) { >+ if (home_dir == NULL) >+ home_dir = g_strdup (pw.pw_dir); >+ if (user_name == NULL) >+ user_name = g_strdup (pw.pw_name); >+ } else { >+ if (user_name == NULL) >+ user_name = "somebody"; >+ } > } > #endif >- if (home_dir == NULL) >- home_dir = g_getenv ("HOME"); > >- if (user_name == NULL) { >- user_name = g_getenv ("USER"); >- if (user_name == NULL) >- user_name = "somebody"; >- } > pthread_mutex_unlock (&pw_lock); > } > >-/* Give preference to /etc/passwd than HOME */ > const gchar * > g_get_home_dir (void) > {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 193426
: 147004