Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
7fea0e33
Commit
7fea0e33
authored
Dec 04, 2009
by
Paul Chitescu
Committed by
Alexandre Julliard
Dec 07, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
advapi32: Reduce registry access to MAXIMUM_ALLOWED wherever possible.
parent
73265865
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
registry.c
dlls/advapi32/registry.c
+7
-7
No files found.
dlls/advapi32/registry.c
View file @
7fea0e33
...
...
@@ -137,7 +137,7 @@ static inline HKEY get_special_root_hkey( HKEY hkey )
if
((
hkey
>=
HKEY_SPECIAL_ROOT_FIRST
)
&&
(
hkey
<=
HKEY_SPECIAL_ROOT_LAST
))
{
if
(
!
(
ret
=
special_root_keys
[(
UINT_PTR
)
hkey
-
(
UINT_PTR
)
HKEY_SPECIAL_ROOT_FIRST
]))
ret
=
create_special_root_hkey
(
hkey
,
KEY_ALL_ACCESS
);
ret
=
create_special_root_hkey
(
hkey
,
MAXIMUM_ALLOWED
);
}
return
ret
;
}
...
...
@@ -233,7 +233,7 @@ LSTATUS WINAPI RegCreateKeyExA( HKEY hkey, LPCSTR name, DWORD reserved, LPSTR cl
if
(
reserved
)
return
ERROR_INVALID_PARAMETER
;
if
(
!
is_version_nt
())
{
access
=
KEY_ALL_ACCESS
;
/* Win95 ignores the access mask */
access
=
MAXIMUM_ALLOWED
;
/* Win95 ignores the access mask */
if
(
name
&&
*
name
==
'\\'
)
name
++
;
/* win9x,ME ignores one (and only one) beginning backslash */
}
if
(
!
(
hkey
=
get_special_root_hkey
(
hkey
)))
return
ERROR_INVALID_HANDLE
;
...
...
@@ -279,7 +279,7 @@ LSTATUS WINAPI RegCreateKeyW( HKEY hkey, LPCWSTR lpSubKey, PHKEY phkResult )
/* FIXME: previous implementation converted ERROR_INVALID_HANDLE to ERROR_BADKEY, */
/* but at least my version of NT (4.0 SP5) doesn't do this. -- AJ */
return
RegCreateKeyExW
(
hkey
,
lpSubKey
,
0
,
NULL
,
REG_OPTION_NON_VOLATILE
,
KEY_ALL_ACCESS
,
NULL
,
phkResult
,
NULL
);
MAXIMUM_ALLOWED
,
NULL
,
phkResult
,
NULL
);
}
...
...
@@ -291,7 +291,7 @@ LSTATUS WINAPI RegCreateKeyW( HKEY hkey, LPCWSTR lpSubKey, PHKEY phkResult )
LSTATUS
WINAPI
RegCreateKeyA
(
HKEY
hkey
,
LPCSTR
lpSubKey
,
PHKEY
phkResult
)
{
return
RegCreateKeyExA
(
hkey
,
lpSubKey
,
0
,
NULL
,
REG_OPTION_NON_VOLATILE
,
KEY_ALL_ACCESS
,
NULL
,
phkResult
,
NULL
);
MAXIMUM_ALLOWED
,
NULL
,
phkResult
,
NULL
);
}
...
...
@@ -348,7 +348,7 @@ LSTATUS WINAPI RegOpenKeyExA( HKEY hkey, LPCSTR name, DWORD reserved, REGSAM acc
STRING
nameA
;
NTSTATUS
status
;
if
(
!
is_version_nt
())
access
=
KEY_ALL_ACCESS
;
/* Win95 ignores the access mask */
if
(
!
is_version_nt
())
access
=
MAXIMUM_ALLOWED
;
/* Win95 ignores the access mask */
else
{
/* NT+ allows beginning backslash for HKEY_CLASSES_ROOT */
...
...
@@ -389,7 +389,7 @@ LSTATUS WINAPI RegOpenKeyW( HKEY hkey, LPCWSTR name, PHKEY retkey )
*
retkey
=
hkey
;
return
ERROR_SUCCESS
;
}
return
RegOpenKeyExW
(
hkey
,
name
,
0
,
KEY_ALL_ACCESS
,
retkey
);
return
RegOpenKeyExW
(
hkey
,
name
,
0
,
MAXIMUM_ALLOWED
,
retkey
);
}
...
...
@@ -417,7 +417,7 @@ LSTATUS WINAPI RegOpenKeyA( HKEY hkey, LPCSTR name, PHKEY retkey )
*
retkey
=
hkey
;
return
ERROR_SUCCESS
;
}
return
RegOpenKeyExA
(
hkey
,
name
,
0
,
KEY_ALL_ACCESS
,
retkey
);
return
RegOpenKeyExA
(
hkey
,
name
,
0
,
MAXIMUM_ALLOWED
,
retkey
);
}
...
...
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