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
8cb3f92e
Commit
8cb3f92e
authored
Jun 16, 2005
by
Robert Shearman
Committed by
Alexandre Julliard
Jun 16, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- All versions of Windows ignore the access rights of the passed in
parent handle to RegCreateKey(Ex). - Add a test that shows this.
parent
816217e9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
1 deletion
+19
-1
registry.c
dlls/advapi32/tests/registry.c
+17
-0
registry.c
server/registry.c
+2
-1
No files found.
dlls/advapi32/tests/registry.c
View file @
8cb3f92e
...
...
@@ -330,6 +330,22 @@ static void test_reg_open_key()
ok
(
ret
==
ERROR_INVALID_PARAMETER
,
"expected ERROR_INVALID_PARAMETER, got %ld
\n
"
,
ret
);
}
static
void
test_reg_create_key
()
{
LONG
ret
;
HKEY
hkey1
,
hkey2
;
ret
=
RegCreateKeyExA
(
hkey_main
,
"Subkey1"
,
0
,
NULL
,
0
,
KEY_NOTIFY
,
NULL
,
&
hkey1
,
NULL
);
ok
(
!
ret
,
"RegCreateKeyExA failed with error %ld
\n
"
,
ret
);
/* should succeed: all versions of Windows ignore the access rights
* to the parent handle */
ret
=
RegCreateKeyExA
(
hkey1
,
"Subkey2"
,
0
,
NULL
,
0
,
KEY_SET_VALUE
,
NULL
,
&
hkey2
,
NULL
);
ok
(
!
ret
,
"RegCreateKeyExA failed with error %ld
\n
"
,
ret
);
/* clean up */
RegDeleteKey
(
hkey2
,
NULL
);
RegDeleteKey
(
hkey1
,
NULL
);
}
static
void
test_reg_close_key
()
{
DWORD
ret
=
0
;
...
...
@@ -435,6 +451,7 @@ START_TEST(registry)
test_enum_value
();
test_query_value_ex
();
test_reg_open_key
();
test_reg_create_key
();
test_reg_close_key
();
test_reg_delete_key
();
...
...
server/registry.c
View file @
8cb3f92e
...
...
@@ -1690,7 +1690,8 @@ DECL_HANDLER(create_key)
if
(
access
&
MAXIMUM_ALLOWED
)
access
=
KEY_ALL_ACCESS
;
/* FIXME: needs general solution */
reply
->
hkey
=
0
;
if
(
!
(
name
=
copy_req_path
(
req
->
namelen
,
!
req
->
parent
)))
return
;
if
((
parent
=
get_hkey_obj
(
req
->
parent
,
KEY_CREATE_SUB_KEY
)))
/* NOTE: no access rights are required from the parent handle to create a key */
if
((
parent
=
get_hkey_obj
(
req
->
parent
,
0
)))
{
int
flags
=
(
req
->
options
&
REG_OPTION_VOLATILE
)
?
KEY_VOLATILE
:
KEY_DIRTY
;
...
...
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