[PATCH 1/1] libwine: Use WINEUSER as user_name, if set

Lucian Poston lucian.poston at gmail.com
Sun May 8 18:01:05 CDT 2016


Signed-off-by: Lucian Poston <lucian.poston at gmail.com>
---
 libs/wine/config.c | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/libs/wine/config.c b/libs/wine/config.c
index 3b5dd68..98cd783 100644
--- a/libs/wine/config.c
+++ b/libs/wine/config.c
@@ -263,6 +263,7 @@ static void init_paths(void)
     const char *home = getenv( "HOME" );
     const char *user = NULL;
     const char *prefix = getenv( "WINEPREFIX" );
+    const char *wine_user = getenv( "WINEUSER" );
 
 #ifdef HAVE_GETPWUID
     char uid_str[32];
@@ -282,7 +283,15 @@ static void init_paths(void)
     if (!(user = getenv( "USER" )))
         fatal_error( "cannot determine your user name, set the USER environment variable\n" );
 #endif  /* HAVE_GETPWUID */
-    user_name = xstrdup( user );
+
+    if (wine_user)
+    {
+        user_name = xstrdup( wine_user );
+    }
+    else
+    {
+        user_name = xstrdup( user );
+    }
 
     /* build config_dir */
 
-- 
2.7.3




More information about the wine-patches mailing list