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
e1a65bed
Commit
e1a65bed
authored
Jul 15, 2015
by
Huw Davies
Committed by
Alexandre Julliard
Jul 15, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Be more selective about which access modes are used to open or create keys.
An installer was failing when trying to create subkeys after denying delete access to their parent key.
parent
4a992fec
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
7 deletions
+6
-7
action.c
dlls/msi/action.c
+6
-7
No files found.
dlls/msi/action.c
View file @
e1a65bed
...
...
@@ -2633,9 +2633,8 @@ static inline REGSAM get_registry_view( const MSICOMPONENT *comp )
return
view
;
}
static
HKEY
open_key
(
const
MSICOMPONENT
*
comp
,
HKEY
root
,
const
WCHAR
*
path
,
BOOL
create
)
static
HKEY
open_key
(
const
MSICOMPONENT
*
comp
,
HKEY
root
,
const
WCHAR
*
path
,
BOOL
create
,
REGSAM
access
)
{
REGSAM
access
=
KEY_ALL_ACCESS
;
WCHAR
*
subkey
,
*
p
,
*
q
;
HKEY
hkey
,
ret
=
NULL
;
LONG
res
;
...
...
@@ -2657,7 +2656,7 @@ static HKEY open_key( const MSICOMPONENT *comp, HKEY root, const WCHAR *path, BO
}
if
(
q
&&
q
[
1
])
{
ret
=
open_key
(
comp
,
hkey
,
q
+
1
,
create
);
ret
=
open_key
(
comp
,
hkey
,
q
+
1
,
create
,
access
);
RegCloseKey
(
hkey
);
}
else
ret
=
hkey
;
...
...
@@ -2882,7 +2881,7 @@ static UINT ITERATE_WriteRegistryValues(MSIRECORD *row, LPVOID param)
strcpyW
(
uikey
,
szRoot
);
strcatW
(
uikey
,
deformated
);
if
(
!
(
hkey
=
open_key
(
comp
,
root_key
,
deformated
,
TRUE
)))
if
(
!
(
hkey
=
open_key
(
comp
,
root_key
,
deformated
,
TRUE
,
KEY_QUERY_VALUE
|
KEY_SET_VALUE
)))
{
ERR
(
"Could not create key %s
\n
"
,
debugstr_w
(
deformated
));
msi_free
(
uikey
);
...
...
@@ -2979,7 +2978,7 @@ static void delete_key( const MSICOMPONENT *comp, HKEY root, const WCHAR *path )
{
*
p
=
0
;
if
(
!
p
[
1
])
continue
;
/* trailing backslash */
hkey
=
open_key
(
comp
,
root
,
subkey
,
FALSE
);
hkey
=
open_key
(
comp
,
root
,
subkey
,
FALSE
,
access
);
if
(
!
hkey
)
break
;
res
=
RegDeleteKeyExW
(
hkey
,
p
+
1
,
access
,
0
);
RegCloseKey
(
hkey
);
...
...
@@ -3001,7 +3000,7 @@ static void delete_value( const MSICOMPONENT *comp, HKEY root, const WCHAR *path
HKEY
hkey
;
DWORD
num_subkeys
,
num_values
;
if
((
hkey
=
open_key
(
comp
,
root
,
path
,
FALSE
)))
if
((
hkey
=
open_key
(
comp
,
root
,
path
,
FALSE
,
KEY_SET_VALUE
|
KEY_QUERY_VALUE
)))
{
if
((
res
=
RegDeleteValueW
(
hkey
,
value
)))
TRACE
(
"failed to delete value %s (%d)
\n
"
,
debugstr_w
(
value
),
res
);
...
...
@@ -3022,7 +3021,7 @@ static void delete_tree( const MSICOMPONENT *comp, HKEY root, const WCHAR *path
LONG
res
;
HKEY
hkey
;
if
(
!
(
hkey
=
open_key
(
comp
,
root
,
path
,
FALSE
)))
return
;
if
(
!
(
hkey
=
open_key
(
comp
,
root
,
path
,
FALSE
,
KEY_ALL_ACCESS
)))
return
;
res
=
RegDeleteTreeW
(
hkey
,
NULL
);
if
(
res
)
TRACE
(
"failed to delete subtree of %s (%d)
\n
"
,
debugstr_w
(
path
),
res
);
delete_key
(
comp
,
root
,
path
);
...
...
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