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
3e853277
Commit
3e853277
authored
Mar 21, 2008
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Refuse to create the .wine directory if the parent belongs to a different user.
parent
4754eb0b
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
1 deletion
+12
-1
server.c
dlls/ntdll/server.c
+12
-1
No files found.
dlls/ntdll/server.c
View file @
3e853277
...
...
@@ -886,13 +886,24 @@ done:
*/
static
void
create_config_dir
(
void
)
{
const
char
*
config_dir
=
wine_get_config_dir
();
const
char
*
p
,
*
config_dir
=
wine_get_config_dir
();
char
*
tmp_dir
;
int
fd
;
pid_t
pid
,
wret
;
if
(
!
(
tmp_dir
=
malloc
(
strlen
(
config_dir
)
+
sizeof
(
"-XXXXXX"
)
)))
fatal_error
(
"out of memory
\n
"
);
if
((
p
=
strrchr
(
config_dir
,
'/'
))
&&
p
!=
config_dir
)
{
struct
stat
st
;
memcpy
(
tmp_dir
,
config_dir
,
p
-
config_dir
);
tmp_dir
[
p
-
config_dir
]
=
0
;
if
(
!
stat
(
tmp_dir
,
&
st
)
&&
st
.
st_uid
!=
getuid
())
fatal_error
(
"'%s' is not owned by you, refusing to create a configuration directory there
\n
"
,
tmp_dir
);
}
strcpy
(
tmp_dir
,
config_dir
);
strcat
(
tmp_dir
,
"-XXXXXX"
);
if
((
fd
=
mkstemps
(
tmp_dir
,
0
))
==
-
1
)
...
...
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