Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
876189a4
Commit
876189a4
authored
Sep 16, 2013
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
libwine: Don't add a user id to the server directory if not supported.
parent
16c8ca80
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
7 deletions
+10
-7
config.c
libs/wine/config.c
+10
-7
No files found.
libs/wine/config.c
View file @
876189a4
...
...
@@ -36,7 +36,7 @@
#include "wine/library.h"
static
const
char
server_config_dir
[]
=
"/.wine"
;
/* config dir relative to $HOME */
static
const
char
server_root_prefix
[]
=
"/tmp/.wine
-"
;
/* prefix for server root dir */
static
const
char
server_root_prefix
[]
=
"/tmp/.wine
"
;
/* prefix for server root dir */
static
const
char
server_dir_prefix
[]
=
"/server-"
;
/* prefix for server dir */
static
char
*
bindir
;
...
...
@@ -220,16 +220,18 @@ static char *get_runtime_argvdir( const char *argv0 )
/* initialize the server directory value */
static
void
init_server_dir
(
dev_t
dev
,
ino_t
ino
)
{
char
*
p
;
char
*
p
,
*
root
;
#ifdef HAVE_GETUID
const
unsigned
int
uid
=
getuid
();
root
=
xmalloc
(
sizeof
(
server_root_prefix
)
+
12
);
sprintf
(
root
,
"%s-%u"
,
server_root_prefix
,
getuid
()
);
#else
const
unsigned
int
uid
=
0
;
root
=
xstrdup
(
server_root_prefix
)
;
#endif
server_dir
=
xmalloc
(
s
izeof
(
server_root_prefix
)
+
32
+
sizeof
(
server_dir_prefix
)
+
2
*
sizeof
(
dev
)
+
2
*
sizeof
(
ino
)
);
s
printf
(
server_dir
,
"%s%u%s"
,
server_root_prefix
,
uid
,
server_dir_prefix
);
server_dir
=
xmalloc
(
s
trlen
(
root
)
+
sizeof
(
server_dir_prefix
)
+
2
*
sizeof
(
dev
)
+
2
*
sizeof
(
ino
)
+
2
);
strcpy
(
server_dir
,
root
);
s
trcat
(
server_dir
,
server_dir_prefix
);
p
=
server_dir
+
strlen
(
server_dir
);
if
(
dev
!=
(
unsigned
long
)
dev
)
...
...
@@ -241,6 +243,7 @@ static void init_server_dir( dev_t dev, ino_t ino )
sprintf
(
p
,
"%lx%08lx"
,
(
unsigned
long
)((
unsigned
long
long
)
ino
>>
32
),
(
unsigned
long
)
ino
);
else
sprintf
(
p
,
"%lx"
,
(
unsigned
long
)
ino
);
free
(
root
);
}
/* retrieve the default dll dir */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment