Bug#904041: wine64-development: wineserver can no longer create temporary files
Michael,
Did you find a fix for this issue ?
Perhaps we should just add a fallback if /run/user does not exists (or
cannot be used for some reason)
You may find a (non tested) patch as attachment
Thanks,
On 07/20/2018 07:52 PM, debian@jack.fr.eu.org wrote:
> Hi Michael,
>
> XDG_RUNTIME_DIR is not set
>
> There is no systemd here, except the following:
> 8% [jack:~]dpkg -l | grep systemd
> ii libsystemd0:amd64 239-6 amd64 systemd utility library
> ii libsystemd0:i386 239-6 i386 systemd utility library
>
> Thanks
>
> On 07/20/2018 05:13 AM, Michael Gilbert wrote:
>> control: tag -1 moreinfo
>>
>> On Wed, Jul 18, 2018 at 2:01 PM, Jack wrote:
>>> Using the latest release, wineserver dies with the following error:
>>> wineserver: mkdir /run/user/1000/wine: No such file or directory
>>
>> Is XDG_RUNTIME_DIR set in your environment? If so, what does it contain?
>>
>> This is a system that is not using pam_systemd? In an attempt to get
>> ahead of any flame war, I am not suggesting that this is something
>> that should be required, I am just trying to understand your
>> configuration.
>>
>> Best wishes,
>> Mike
>>
>
diff --git a/libs/wine/config.c b/libs/wine/config.c
index c9bc3bf..6625ce1 100644
--- a/libs/wine/config.c
+++ b/libs/wine/config.c
@@ -35,9 +35,10 @@
#endif
#include "wine/library.h"
-static const char server_config_dir[] = "/.wine"; /* config dir relative to $HOME */
-static const char server_root_prefix[] = "/run/user"; /* prefix for server root dir */
-static const char server_dir_prefix[] = "/server-"; /* prefix for server dir */
+static const char server_config_dir[] = "/.wine"; /* config dir relative to $HOME */
+static const char server_root_prefix[] = "/run/user"; /* prefix for server root dir */
+static const char server_root_prefix_fallback[] = "/tmp/.wine"; /* prefix to be used if server_root_prefix does not exists */
+static const char server_dir_prefix[] = "/server-"; /* prefix for server dir */
static char *bindir;
static char *dlldir;
@@ -225,8 +226,18 @@ static void init_server_dir( dev_t dev, ino_t ino )
#ifdef __ANDROID__ /* there's no /tmp dir on Android */
root = build_path( config_dir, ".wineserver" );
#elif defined(HAVE_GETUID)
- root = xmalloc( sizeof(server_root_prefix) + 17 );
- sprintf( root, "%s/%u/wine", server_root_prefix, getuid() );
+ DIR* dir = opendir(server_root_prefix);
+ if(dir)
+ {
+ closedir(dir);
+ root = xmalloc( sizeof(server_root_prefix) + 17 );
+ sprintf( root, "%s/%u/wine", server_root_prefix, getuid() );
+ }
+ else
+ {
+ root = xmalloc( sizeof(server_root_prefix) + 12 );
+ sprintf( root, "%s-%u", server_root_prefix, getuid() );
+ }
#else
fatal_error("unable to get user id for temporary files");
#endif
Reply to: