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
eeb4ed4c
Commit
eeb4ed4c
authored
Oct 17, 2016
by
Jacek Caban
Committed by
Alexandre Julliard
Oct 17, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll/tests: Added more registry symlink tests.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
fb518192
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
65 additions
and
1 deletion
+65
-1
reg.c
dlls/ntdll/reg.c
+1
-1
reg.c
dlls/ntdll/tests/reg.c
+64
-0
No files found.
dlls/ntdll/reg.c
View file @
eeb4ed4c
...
...
@@ -129,7 +129,7 @@ static NTSTATUS open_key( PHANDLE retkey, ACCESS_MASK access, const OBJECT_ATTRI
TRACE
(
"(%p,%s,%x,%p)
\n
"
,
attr
->
RootDirectory
,
debugstr_us
(
attr
->
ObjectName
),
access
,
retkey
);
if
(
options
)
if
(
options
&
~
REG_OPTION_OPEN_LINK
)
FIXME
(
"options %x not implemented
\n
"
,
options
);
SERVER_START_REQ
(
open_key
)
...
...
dlls/ntdll/tests/reg.c
View file @
eeb4ed4c
...
...
@@ -1135,6 +1135,40 @@ static void test_symlinks(void)
"wrong len %u
\n
"
,
len
);
pNtClose
(
key
);
if
(
pNtOpenKeyEx
)
{
/* REG_OPTION_OPEN_LINK flag doesn't matter */
status
=
pNtOpenKeyEx
(
&
key
,
KEY_ALL_ACCESS
,
&
attr
,
REG_OPTION_OPEN_LINK
);
ok
(
status
==
STATUS_SUCCESS
,
"NtOpenKey failed: 0x%08x
\n
"
,
status
);
len
=
sizeof
(
buffer
);
status
=
pNtQueryValueKey
(
key
,
&
symlink_str
,
KeyValuePartialInformation
,
info
,
len
,
&
len
);
ok
(
status
==
STATUS_SUCCESS
,
"NtQueryValueKey failed: 0x%08x
\n
"
,
status
);
ok
(
len
==
FIELD_OFFSET
(
KEY_VALUE_PARTIAL_INFORMATION
,
Data
)
+
target_len
-
sizeof
(
WCHAR
),
"wrong len %u
\n
"
,
len
);
pNtClose
(
key
);
status
=
pNtOpenKeyEx
(
&
key
,
KEY_ALL_ACCESS
,
&
attr
,
0
);
ok
(
status
==
STATUS_SUCCESS
,
"NtOpenKey failed: 0x%08x
\n
"
,
status
);
len
=
sizeof
(
buffer
);
status
=
pNtQueryValueKey
(
key
,
&
symlink_str
,
KeyValuePartialInformation
,
info
,
len
,
&
len
);
ok
(
status
==
STATUS_SUCCESS
,
"NtQueryValueKey failed: 0x%08x
\n
"
,
status
);
ok
(
len
==
FIELD_OFFSET
(
KEY_VALUE_PARTIAL_INFORMATION
,
Data
)
+
target_len
-
sizeof
(
WCHAR
),
"wrong len %u
\n
"
,
len
);
pNtClose
(
key
);
attr
.
Attributes
=
0
;
status
=
pNtOpenKeyEx
(
&
key
,
KEY_ALL_ACCESS
,
&
attr
,
REG_OPTION_OPEN_LINK
);
ok
(
status
==
STATUS_SUCCESS
,
"NtOpenKey failed: 0x%08x
\n
"
,
status
);
len
=
sizeof
(
buffer
);
status
=
pNtQueryValueKey
(
key
,
&
symlink_str
,
KeyValuePartialInformation
,
info
,
len
,
&
len
);
ok
(
status
==
STATUS_OBJECT_NAME_NOT_FOUND
,
"NtQueryValueKey failed: 0x%08x
\n
"
,
status
);
pNtClose
(
key
);
}
attr
.
Attributes
=
OBJ_OPENLINK
;
status
=
pNtCreateKey
(
&
key
,
KEY_ALL_ACCESS
,
&
attr
,
0
,
0
,
0
,
0
);
ok
(
status
==
STATUS_SUCCESS
,
"NtCreateKey failed: 0x%08x
\n
"
,
status
);
len
=
sizeof
(
buffer
);
...
...
@@ -1144,6 +1178,36 @@ static void test_symlinks(void)
"wrong len %u
\n
"
,
len
);
pNtClose
(
key
);
/* delete target and create by NtCreateKey on link */
attr
.
ObjectName
=
&
target_str
;
status
=
pNtOpenKey
(
&
key
,
KEY_ALL_ACCESS
,
&
attr
);
ok
(
status
==
STATUS_SUCCESS
,
"NtOpenKey failed: 0x%08x
\n
"
,
status
);
status
=
pNtDeleteKey
(
key
);
ok
(
status
==
STATUS_SUCCESS
,
"NtDeleteKey failed: 0x%08x
\n
"
,
status
);
pNtClose
(
key
);
attr
.
ObjectName
=
&
link_str
;
attr
.
Attributes
=
0
;
status
=
pNtOpenKey
(
&
key
,
KEY_ALL_ACCESS
,
&
attr
);
ok
(
status
==
STATUS_OBJECT_NAME_NOT_FOUND
,
"NtOpenKey wrong status 0x%08x
\n
"
,
status
);
status
=
pNtCreateKey
(
&
key
,
KEY_ALL_ACCESS
,
&
attr
,
0
,
0
,
0
,
0
);
todo_wine
ok
(
status
==
STATUS_SUCCESS
,
"NtCreateKey failed: 0x%08x
\n
"
,
status
);
pNtClose
(
key
);
if
(
status
)
/* can be removed once todo_wine above is fixed */
{
attr
.
ObjectName
=
&
target_str
;
attr
.
Attributes
=
OBJ_OPENLINK
;
status
=
pNtCreateKey
(
&
key
,
KEY_ALL_ACCESS
,
&
attr
,
0
,
0
,
0
,
0
);
ok
(
status
==
STATUS_SUCCESS
,
"NtCreateKey failed: 0x%08x
\n
"
,
status
);
pNtClose
(
key
);
}
attr
.
ObjectName
=
&
target_str
;
attr
.
Attributes
=
OBJ_OPENLINK
;
status
=
pNtOpenKey
(
&
key
,
KEY_ALL_ACCESS
,
&
attr
);
ok
(
status
==
STATUS_SUCCESS
,
"NtOpenKey wrong status 0x%08x
\n
"
,
status
);
if
(
0
)
/* crashes the Windows kernel on some Vista systems */
{
/* reopen the link from itself */
...
...
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