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
3a8801b1
Commit
3a8801b1
authored
Dec 19, 2016
by
Hans Leidekker
Committed by
Alexandre Julliard
Dec 19, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
urlmon/tests: Skip domain tests if the user doesn't have admin rights.
Signed-off-by:
Hans Leidekker
<
hans@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
162a40e1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
2 deletions
+9
-2
sec_mgr.c
dlls/urlmon/tests/sec_mgr.c
+9
-2
No files found.
dlls/urlmon/tests/sec_mgr.c
View file @
3a8801b1
...
@@ -758,7 +758,7 @@ static const zone_domain_mapping zone_domain_mappings[] = {
...
@@ -758,7 +758,7 @@ static const zone_domain_mapping zone_domain_mappings[] = {
{
"wine.testing"
,
NULL
,
"*"
,
URLZONE_CUSTOM2
}
{
"wine.testing"
,
NULL
,
"*"
,
URLZONE_CUSTOM2
}
};
};
static
void
register_zone_domains
(
void
)
static
BOOL
register_zone_domains
(
void
)
{
{
HKEY
domains
;
HKEY
domains
;
DWORD
res
,
i
;
DWORD
res
,
i
;
...
@@ -771,6 +771,12 @@ static void register_zone_domains(void)
...
@@ -771,6 +771,12 @@ static void register_zone_domains(void)
DWORD
zone
=
URLZONE_CUSTOM
;
DWORD
zone
=
URLZONE_CUSTOM
;
res
=
RegCreateKeyA
(
domains
,
"local.machine"
,
&
domain
);
res
=
RegCreateKeyA
(
domains
,
"local.machine"
,
&
domain
);
if
(
res
==
ERROR_ACCESS_DENIED
)
{
skip
(
"need admin rights
\n
"
);
RegCloseKey
(
domains
);
return
FALSE
;
}
ok
(
res
==
ERROR_SUCCESS
,
"RegCreateKey failed: %d
\n
"
,
res
);
ok
(
res
==
ERROR_SUCCESS
,
"RegCreateKey failed: %d
\n
"
,
res
);
res
=
RegSetValueExA
(
domain
,
"http"
,
0
,
REG_DWORD
,
(
BYTE
*
)
&
zone
,
sizeof
(
DWORD
));
res
=
RegSetValueExA
(
domain
,
"http"
,
0
,
REG_DWORD
,
(
BYTE
*
)
&
zone
,
sizeof
(
DWORD
));
...
@@ -810,6 +816,7 @@ static void register_zone_domains(void)
...
@@ -810,6 +816,7 @@ static void register_zone_domains(void)
}
}
RegCloseKey
(
domains
);
RegCloseKey
(
domains
);
return
TRUE
;
}
}
static
void
unregister_zone_domains
(
void
)
static
void
unregister_zone_domains
(
void
)
...
@@ -964,7 +971,7 @@ static void test_zone_domains(void)
...
@@ -964,7 +971,7 @@ static void test_zone_domains(void)
test_zone_domain_cache
();
test_zone_domain_cache
();
register_zone_domains
()
;
if
(
!
register_zone_domains
())
return
;
run_child_process
();
run_child_process
();
unregister_zone_domains
();
unregister_zone_domains
();
}
}
...
...
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