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
e8d7af2d
Commit
e8d7af2d
authored
Oct 30, 2007
by
Rob Shearman
Committed by
Alexandre Julliard
Oct 31, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
advapi32: Implement filter matching for CredEnumerate.
parent
e6f28ebb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
2 deletions
+32
-2
cred.c
dlls/advapi32/cred.c
+32
-2
No files found.
dlls/advapi32/cred.c
View file @
e8d7af2d
...
...
@@ -676,10 +676,40 @@ BOOL WINAPI CredEnumerateA(LPCSTR Filter, DWORD Flags, DWORD *Count,
static
BOOL
credential_matches_filter
(
HKEY
hkeyCred
,
LPCWSTR
filter
)
{
LPWSTR
target_name
;
DWORD
ret
;
DWORD
type
;
DWORD
count
;
LPCWSTR
p
;
if
(
!
filter
)
return
TRUE
;
FIXME
(
"%s
\n
"
,
debugstr_w
(
filter
));
return
TRUE
;
ret
=
RegQueryValueExW
(
hkeyCred
,
NULL
,
0
,
&
type
,
NULL
,
&
count
);
if
(
ret
!=
ERROR_SUCCESS
)
return
FALSE
;
else
if
(
type
!=
REG_SZ
)
return
FALSE
;
target_name
=
HeapAlloc
(
GetProcessHeap
(),
0
,
count
);
if
(
!
target_name
)
return
FALSE
;
ret
=
RegQueryValueExW
(
hkeyCred
,
NULL
,
0
,
&
type
,
(
LPVOID
)
target_name
,
&
count
);
if
(
ret
!=
ERROR_SUCCESS
||
type
!=
REG_SZ
)
{
HeapFree
(
GetProcessHeap
(),
0
,
target_name
);
return
FALSE
;
}
TRACE
(
"comparing filter %s to target name %s
\n
"
,
debugstr_w
(
filter
),
debugstr_w
(
target_name
));
p
=
strchrW
(
filter
,
'*'
);
ret
=
CompareStringW
(
GetThreadLocale
(),
0
,
filter
,
(
p
&&
!
p
[
1
]
?
p
-
filter
:
-
1
),
target_name
,
(
p
&&
!
p
[
1
]
?
p
-
filter
:
-
1
))
==
CSTR_EQUAL
;
HeapFree
(
GetProcessHeap
(),
0
,
target_name
);
return
ret
;
}
/******************************************************************************
...
...
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