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
133ba9f3
Commit
133ba9f3
authored
Jul 24, 2003
by
Mike McCormack
Committed by
Alexandre Julliard
Jul 24, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implemented LookupPrivilegeValueA/W.
parent
40672f99
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
60 additions
and
6 deletions
+60
-6
advapi32.spec
dlls/advapi32/advapi32.spec
+2
-2
security.c
dlls/advapi32/security.c
+58
-4
No files found.
dlls/advapi32/advapi32.spec
View file @
133ba9f3
...
...
@@ -148,8 +148,8 @@
@ stdcall LookupAccountSidW(ptr ptr ptr ptr ptr ptr ptr)
@ stub LookupPrivilegeDisplayNameA
@ stub LookupPrivilegeDisplayNameW
@ st
ub LookupPrivilegeNameA
@ st
ub LookupPrivilegeNameW
@ st
dcall LookupPrivilegeNameA(str ptr ptr long)
@ st
dcall LookupPrivilegeNameW(wstr ptr ptr long)
@ stdcall LookupPrivilegeValueA(ptr ptr ptr)
@ stdcall LookupPrivilegeValueW(ptr ptr ptr)
@ stub MakeAbsoluteSD
...
...
dlls/advapi32/security.c
View file @
133ba9f3
...
...
@@ -757,6 +757,24 @@ BOOL WINAPI IsValidAcl(IN PACL pAcl)
##############################
*/
static
const
char
*
const
DefaultPrivNames
[]
=
{
NULL
,
NULL
,
"SeCreateTokenPrivilege"
,
"SeAssignPrimaryTokenPrivilege"
,
"SeLockMemoryPrivilege"
,
"SeIncreaseQuotaPrivilege"
,
"SeMachineAccountPrivilege"
,
"SeTcbPrivilege"
,
"SeSecurityPrivilege"
,
"SeTakeOwnershipPrivilege"
,
"SeLoadDriverPrivilege"
,
"SeSystemProfilePrivilege"
,
"SeSystemtimePrivilege"
,
"SeProfileSingleProcessPrivilege"
,
"SeIncreaseBasePriorityPrivilege"
,
"SeCreatePagefilePrivilege"
,
"SeCreatePermanentPrivilege"
,
"SeBackupPrivilege"
,
"SeRestorePrivilege"
,
"SeShutdownPrivilege"
,
"SeDebugPrivilege"
,
"SeAuditPrivilege"
,
"SeSystemEnvironmentPrivilege"
,
"SeChangeNotifyPrivilege"
,
"SeRemoteShutdownPrivilege"
,
};
#define NUMPRIVS (sizeof DefaultPrivNames/sizeof DefaultPrivNames[0])
/******************************************************************************
* LookupPrivilegeValueW [ADVAPI32.@]
*
...
...
@@ -765,11 +783,26 @@ BOOL WINAPI IsValidAcl(IN PACL pAcl)
BOOL
WINAPI
LookupPrivilegeValueW
(
LPCWSTR
lpSystemName
,
LPCWSTR
lpName
,
PLUID
lpLuid
)
{
FIXME
(
"(%s,%s,%p): stub
\n
"
,
debugstr_w
(
lpSystemName
),
debugstr_w
(
lpName
),
lpLuid
);
lpLuid
->
LowPart
=
0x12345678
;
lpLuid
->
HighPart
=
0x87654321
;
UINT
i
;
WCHAR
priv
[
0x28
];
TRACE
(
"%s,%s,%p
\n
"
,
debugstr_w
(
lpSystemName
),
debugstr_w
(
lpName
),
lpLuid
);
for
(
i
=
0
;
i
<
NUMPRIVS
;
i
++
)
{
if
(
!
DefaultPrivNames
[
i
]
)
continue
;
MultiByteToWideChar
(
CP_ACP
,
0
,
DefaultPrivNames
[
i
],
-
1
,
priv
,
sizeof
priv
);
if
(
strcmpW
(
priv
,
lpName
)
)
continue
;
lpLuid
->
LowPart
=
i
;
lpLuid
->
HighPart
=
0
;
TRACE
(
"%s -> %08lx-%08lx
\n
"
,
debugstr_w
(
lpSystemName
),
lpLuid
->
HighPart
,
lpLuid
->
LowPart
);
return
TRUE
;
}
return
FALSE
;
}
/******************************************************************************
...
...
@@ -801,6 +834,27 @@ LookupPrivilegeValueA( LPCSTR lpSystemName, LPCSTR lpName, PLUID lpLuid )
return
ret
;
}
/******************************************************************************
* LookupPrivilegeNameA [ADVAPI32.@]
*/
BOOL
WINAPI
LookupPrivilegeNameA
(
LPCSTR
lpSystemName
,
PLUID
lpLuid
,
LPSTR
lpName
,
LPDWORD
cchName
)
{
FIXME
(
"%s %p %p %p
\n
"
,
debugstr_a
(
lpSystemName
),
lpLuid
,
lpName
,
cchName
);
return
FALSE
;
}
/******************************************************************************
* LookupPrivilegeNameW [ADVAPI32.@]
*/
BOOL
WINAPI
LookupPrivilegeNameW
(
LPCWSTR
lpSystemName
,
PLUID
lpLuid
,
LPSTR
lpName
,
LPDWORD
cchName
)
{
FIXME
(
"%s %p %p %p
\n
"
,
debugstr_w
(
lpSystemName
),
lpLuid
,
lpName
,
cchName
);
return
FALSE
;
}
/******************************************************************************
* GetFileSecurityA [ADVAPI32.@]
*
...
...
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