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
6a48bb42
Commit
6a48bb42
authored
Feb 16, 2009
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Feb 16, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
advapi32: Remove superfluous pointer casts.
parent
d10ca7d9
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
19 deletions
+18
-19
cred.c
dlls/advapi32/cred.c
+5
-5
crypt.c
dlls/advapi32/crypt.c
+1
-1
security.c
dlls/advapi32/security.c
+10
-11
service.c
dlls/advapi32/service.c
+2
-2
No files found.
dlls/advapi32/cred.c
View file @
6a48bb42
...
@@ -74,7 +74,7 @@ static DWORD read_credential_blob(HKEY hkey, const BYTE key_data[KEY_SIZE],
...
@@ -74,7 +74,7 @@ static DWORD read_credential_blob(HKEY hkey, const BYTE key_data[KEY_SIZE],
struct
ustring
data
;
struct
ustring
data
;
struct
ustring
key
;
struct
ustring
key
;
ret
=
RegQueryValueExW
(
hkey
,
wszPasswordValue
,
0
,
&
type
,
(
LPVOID
)
credential_blob
,
ret
=
RegQueryValueExW
(
hkey
,
wszPasswordValue
,
0
,
&
type
,
credential_blob
,
credential_blob_size
);
credential_blob_size
);
if
(
ret
!=
ERROR_SUCCESS
)
if
(
ret
!=
ERROR_SUCCESS
)
return
ret
;
return
ret
;
...
@@ -460,7 +460,7 @@ static DWORD write_credential_blob(HKEY hkey, LPCWSTR target_name, DWORD type,
...
@@ -460,7 +460,7 @@ static DWORD write_credential_blob(HKEY hkey, LPCWSTR target_name, DWORD type,
data
.
Buffer
=
encrypted_credential_blob
;
data
.
Buffer
=
encrypted_credential_blob
;
SystemFunction032
(
&
data
,
&
key
);
SystemFunction032
(
&
data
,
&
key
);
ret
=
RegSetValueExW
(
hkey
,
wszPasswordValue
,
0
,
REG_BINARY
,
(
LPVOID
)
encrypted_credential_blob
,
credential_blob_size
);
ret
=
RegSetValueExW
(
hkey
,
wszPasswordValue
,
0
,
REG_BINARY
,
encrypted_credential_blob
,
credential_blob_size
);
HeapFree
(
GetProcessHeap
(),
0
,
encrypted_credential_blob
);
HeapFree
(
GetProcessHeap
(),
0
,
encrypted_credential_blob
);
return
ret
;
return
ret
;
...
@@ -647,7 +647,7 @@ static DWORD get_cred_mgr_encryption_key(HKEY hkeyMgr, BYTE key_data[KEY_SIZE])
...
@@ -647,7 +647,7 @@ static DWORD get_cred_mgr_encryption_key(HKEY hkeyMgr, BYTE key_data[KEY_SIZE])
memcpy
(
key_data
,
my_key_data
,
KEY_SIZE
);
memcpy
(
key_data
,
my_key_data
,
KEY_SIZE
);
count
=
KEY_SIZE
;
count
=
KEY_SIZE
;
ret
=
RegQueryValueExW
(
hkeyMgr
,
wszEncryptionKeyValue
,
NULL
,
&
type
,
(
LPVOID
)
key_data
,
ret
=
RegQueryValueExW
(
hkeyMgr
,
wszEncryptionKeyValue
,
NULL
,
&
type
,
key_data
,
&
count
);
&
count
);
if
(
ret
==
ERROR_SUCCESS
)
if
(
ret
==
ERROR_SUCCESS
)
{
{
...
@@ -668,14 +668,14 @@ static DWORD get_cred_mgr_encryption_key(HKEY hkeyMgr, BYTE key_data[KEY_SIZE])
...
@@ -668,14 +668,14 @@ static DWORD get_cred_mgr_encryption_key(HKEY hkeyMgr, BYTE key_data[KEY_SIZE])
*
(
DWORD
*
)(
key_data
+
4
)
=
value
;
*
(
DWORD
*
)(
key_data
+
4
)
=
value
;
ret
=
RegSetValueExW
(
hkeyMgr
,
wszEncryptionKeyValue
,
0
,
REG_BINARY
,
ret
=
RegSetValueExW
(
hkeyMgr
,
wszEncryptionKeyValue
,
0
,
REG_BINARY
,
(
LPVOID
)
key_data
,
KEY_SIZE
);
key_data
,
KEY_SIZE
);
if
(
ret
==
ERROR_ACCESS_DENIED
)
if
(
ret
==
ERROR_ACCESS_DENIED
)
{
{
ret
=
open_cred_mgr_key
(
&
hkeyMgr
,
TRUE
);
ret
=
open_cred_mgr_key
(
&
hkeyMgr
,
TRUE
);
if
(
ret
==
ERROR_SUCCESS
)
if
(
ret
==
ERROR_SUCCESS
)
{
{
ret
=
RegSetValueExW
(
hkeyMgr
,
wszEncryptionKeyValue
,
0
,
REG_BINARY
,
ret
=
RegSetValueExW
(
hkeyMgr
,
wszEncryptionKeyValue
,
0
,
REG_BINARY
,
(
LPVOID
)
key_data
,
KEY_SIZE
);
key_data
,
KEY_SIZE
);
RegCloseKey
(
hkeyMgr
);
RegCloseKey
(
hkeyMgr
);
}
}
}
}
...
...
dlls/advapi32/crypt.c
View file @
6a48bb42
...
@@ -54,7 +54,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(crypt);
...
@@ -54,7 +54,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(crypt);
static
HWND
crypt_hWindow
;
static
HWND
crypt_hWindow
;
#define CRYPT_Alloc(size) (LocalAlloc(LMEM_ZEROINIT, size))
#define CRYPT_Alloc(size) (LocalAlloc(LMEM_ZEROINIT, size))
#define CRYPT_Free(buffer) (LocalFree(
(HLOCAL)
buffer))
#define CRYPT_Free(buffer) (LocalFree(buffer))
static
inline
PWSTR
CRYPT_GetProvKeyName
(
PCWSTR
pProvName
)
static
inline
PWSTR
CRYPT_GetProvKeyName
(
PCWSTR
pProvName
)
{
{
...
...
dlls/advapi32/security.c
View file @
6a48bb42
...
@@ -341,7 +341,7 @@ static const WCHAR SDDL_AUDIT_FAILURE[] = {'F','A',0};
...
@@ -341,7 +341,7 @@ static const WCHAR SDDL_AUDIT_FAILURE[] = {'F','A',0};
const
char
*
debugstr_sid
(
PSID
sid
)
const
char
*
debugstr_sid
(
PSID
sid
)
{
{
int
auth
=
0
;
int
auth
=
0
;
SID
*
psid
=
(
SID
*
)
sid
;
SID
*
psid
=
sid
;
if
(
psid
==
NULL
)
if
(
psid
==
NULL
)
return
"(null)"
;
return
"(null)"
;
...
@@ -3172,7 +3172,7 @@ VOID WINAPI BuildTrusteeWithSidA(PTRUSTEEA pTrustee, PSID pSid)
...
@@ -3172,7 +3172,7 @@ VOID WINAPI BuildTrusteeWithSidA(PTRUSTEEA pTrustee, PSID pSid)
pTrustee
->
MultipleTrusteeOperation
=
NO_MULTIPLE_TRUSTEE
;
pTrustee
->
MultipleTrusteeOperation
=
NO_MULTIPLE_TRUSTEE
;
pTrustee
->
TrusteeForm
=
TRUSTEE_IS_SID
;
pTrustee
->
TrusteeForm
=
TRUSTEE_IS_SID
;
pTrustee
->
TrusteeType
=
TRUSTEE_IS_UNKNOWN
;
pTrustee
->
TrusteeType
=
TRUSTEE_IS_UNKNOWN
;
pTrustee
->
ptstrName
=
(
LPSTR
)
pSid
;
pTrustee
->
ptstrName
=
pSid
;
}
}
/******************************************************************************
/******************************************************************************
...
@@ -3186,7 +3186,7 @@ VOID WINAPI BuildTrusteeWithSidW(PTRUSTEEW pTrustee, PSID pSid)
...
@@ -3186,7 +3186,7 @@ VOID WINAPI BuildTrusteeWithSidW(PTRUSTEEW pTrustee, PSID pSid)
pTrustee
->
MultipleTrusteeOperation
=
NO_MULTIPLE_TRUSTEE
;
pTrustee
->
MultipleTrusteeOperation
=
NO_MULTIPLE_TRUSTEE
;
pTrustee
->
TrusteeForm
=
TRUSTEE_IS_SID
;
pTrustee
->
TrusteeForm
=
TRUSTEE_IS_SID
;
pTrustee
->
TrusteeType
=
TRUSTEE_IS_UNKNOWN
;
pTrustee
->
TrusteeType
=
TRUSTEE_IS_UNKNOWN
;
pTrustee
->
ptstrName
=
(
LPWSTR
)
pSid
;
pTrustee
->
ptstrName
=
pSid
;
}
}
/******************************************************************************
/******************************************************************************
...
@@ -3955,7 +3955,7 @@ static BOOL ParseStringAclToAcl(LPCWSTR StringAcl, LPDWORD lpdwFlags,
...
@@ -3955,7 +3955,7 @@ static BOOL ParseStringAclToAcl(LPCWSTR StringAcl, LPDWORD lpdwFlags,
StringAcl
++
;
StringAcl
++
;
/* Parse ACE account sid */
/* Parse ACE account sid */
if
(
ParseStringSidToSid
(
StringAcl
,
pAce
?
(
PSID
)
&
pAce
->
SidStart
:
NULL
,
&
sidlen
))
if
(
ParseStringSidToSid
(
StringAcl
,
pAce
?
&
pAce
->
SidStart
:
NULL
,
&
sidlen
))
{
{
while
(
*
StringAcl
&&
*
StringAcl
!=
')'
)
while
(
*
StringAcl
&&
*
StringAcl
!=
')'
)
StringAcl
++
;
StringAcl
++
;
...
@@ -4051,7 +4051,7 @@ static BOOL ParseStringSecurityDescriptorToSecurityDescriptor(
...
@@ -4051,7 +4051,7 @@ static BOOL ParseStringSecurityDescriptorToSecurityDescriptor(
{
{
DWORD
bytes
;
DWORD
bytes
;
if
(
!
ParseStringSidToSid
(
tok
,
(
PSID
)
lpNext
,
&
bytes
))
if
(
!
ParseStringSidToSid
(
tok
,
lpNext
,
&
bytes
))
goto
lend
;
goto
lend
;
if
(
SecurityDescriptor
)
if
(
SecurityDescriptor
)
...
@@ -4069,7 +4069,7 @@ static BOOL ParseStringSecurityDescriptorToSecurityDescriptor(
...
@@ -4069,7 +4069,7 @@ static BOOL ParseStringSecurityDescriptorToSecurityDescriptor(
{
{
DWORD
bytes
;
DWORD
bytes
;
if
(
!
ParseStringSidToSid
(
tok
,
(
PSID
)
lpNext
,
&
bytes
))
if
(
!
ParseStringSidToSid
(
tok
,
lpNext
,
&
bytes
))
goto
lend
;
goto
lend
;
if
(
SecurityDescriptor
)
if
(
SecurityDescriptor
)
...
@@ -4203,8 +4203,7 @@ BOOL WINAPI ConvertStringSecurityDescriptorToSecurityDescriptorW(
...
@@ -4203,8 +4203,7 @@ BOOL WINAPI ConvertStringSecurityDescriptorToSecurityDescriptorW(
NULL
,
&
cBytes
))
NULL
,
&
cBytes
))
goto
lend
;
goto
lend
;
psd
=
*
SecurityDescriptor
=
(
SECURITY_DESCRIPTOR
*
)
LocalAlloc
(
psd
=
*
SecurityDescriptor
=
LocalAlloc
(
GMEM_ZEROINIT
,
cBytes
);
GMEM_ZEROINIT
,
cBytes
);
if
(
!
psd
)
goto
lend
;
if
(
!
psd
)
goto
lend
;
psd
->
Revision
=
SID_REVISION
;
psd
->
Revision
=
SID_REVISION
;
...
@@ -4383,7 +4382,7 @@ static BOOL DumpAce(LPVOID pace, WCHAR **pwptr, ULONG *plen)
...
@@ -4383,7 +4382,7 @@ static BOOL DumpAce(LPVOID pace, WCHAR **pwptr, ULONG *plen)
return
FALSE
;
return
FALSE
;
}
}
piace
=
(
ACCESS_ALLOWED_ACE
*
)
pace
;
piace
=
pace
;
DumpString
(
&
openbr
,
1
,
pwptr
,
plen
);
DumpString
(
&
openbr
,
1
,
pwptr
,
plen
);
switch
(
piace
->
Header
.
AceType
)
switch
(
piace
->
Header
.
AceType
)
{
{
...
@@ -4423,7 +4422,7 @@ static BOOL DumpAce(LPVOID pace, WCHAR **pwptr, ULONG *plen)
...
@@ -4423,7 +4422,7 @@ static BOOL DumpAce(LPVOID pace, WCHAR **pwptr, ULONG *plen)
DumpString
(
&
semicolon
,
1
,
pwptr
,
plen
);
DumpString
(
&
semicolon
,
1
,
pwptr
,
plen
);
/* objects not supported */
/* objects not supported */
DumpString
(
&
semicolon
,
1
,
pwptr
,
plen
);
DumpString
(
&
semicolon
,
1
,
pwptr
,
plen
);
if
(
!
DumpSid
(
(
PSID
)
&
piace
->
SidStart
,
pwptr
,
plen
))
if
(
!
DumpSid
(
&
piace
->
SidStart
,
pwptr
,
plen
))
return
FALSE
;
return
FALSE
;
DumpString
(
&
closebr
,
1
,
pwptr
,
plen
);
DumpString
(
&
closebr
,
1
,
pwptr
,
plen
);
return
TRUE
;
return
TRUE
;
...
@@ -5074,7 +5073,7 @@ DWORD WINAPI GetNamedSecurityInfoW( LPWSTR name, SE_OBJECT_TYPE type,
...
@@ -5074,7 +5073,7 @@ DWORD WINAPI GetNamedSecurityInfoW( LPWSTR name, SE_OBJECT_TYPE type,
return
ERROR_INVALID_SECURITY_DESCR
;
return
ERROR_INVALID_SECURITY_DESCR
;
}
}
relative
=
(
SECURITY_DESCRIPTOR_RELATIVE
*
)
*
descriptor
;
relative
=
*
descriptor
;
relative
->
Control
|=
SE_SELF_RELATIVE
;
relative
->
Control
|=
SE_SELF_RELATIVE
;
buffer
=
(
BYTE
*
)
relative
;
buffer
=
(
BYTE
*
)
relative
;
offset
=
sizeof
(
SECURITY_DESCRIPTOR_RELATIVE
);
offset
=
sizeof
(
SECURITY_DESCRIPTOR_RELATIVE
);
...
...
dlls/advapi32/service.c
View file @
6a48bb42
...
@@ -1809,7 +1809,7 @@ BOOL WINAPI ChangeServiceConfig2A( SC_HANDLE hService, DWORD dwInfoLevel,
...
@@ -1809,7 +1809,7 @@ BOOL WINAPI ChangeServiceConfig2A( SC_HANDLE hService, DWORD dwInfoLevel,
if
(
dwInfoLevel
==
SERVICE_CONFIG_DESCRIPTION
)
if
(
dwInfoLevel
==
SERVICE_CONFIG_DESCRIPTION
)
{
{
LPSERVICE_DESCRIPTIONA
sd
=
(
LPSERVICE_DESCRIPTIONA
)
lpInfo
;
LPSERVICE_DESCRIPTIONA
sd
=
lpInfo
;
SERVICE_DESCRIPTIONW
sdw
;
SERVICE_DESCRIPTIONW
sdw
;
sdw
.
lpDescription
=
SERV_dup
(
sd
->
lpDescription
);
sdw
.
lpDescription
=
SERV_dup
(
sd
->
lpDescription
);
...
@@ -1820,7 +1820,7 @@ BOOL WINAPI ChangeServiceConfig2A( SC_HANDLE hService, DWORD dwInfoLevel,
...
@@ -1820,7 +1820,7 @@ BOOL WINAPI ChangeServiceConfig2A( SC_HANDLE hService, DWORD dwInfoLevel,
}
}
else
if
(
dwInfoLevel
==
SERVICE_CONFIG_FAILURE_ACTIONS
)
else
if
(
dwInfoLevel
==
SERVICE_CONFIG_FAILURE_ACTIONS
)
{
{
LPSERVICE_FAILURE_ACTIONSA
fa
=
(
LPSERVICE_FAILURE_ACTIONSA
)
lpInfo
;
LPSERVICE_FAILURE_ACTIONSA
fa
=
lpInfo
;
SERVICE_FAILURE_ACTIONSW
faw
;
SERVICE_FAILURE_ACTIONSW
faw
;
faw
.
dwResetPeriod
=
fa
->
dwResetPeriod
;
faw
.
dwResetPeriod
=
fa
->
dwResetPeriod
;
...
...
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