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
4c8edb1b
Commit
4c8edb1b
authored
Apr 30, 2014
by
Hans Leidekker
Committed by
Alexandre Julliard
Apr 30, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi/tests: Fix a couple of memory leaks (valgrind).
parent
582c5fde
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
25 additions
and
15 deletions
+25
-15
action.c
dlls/msi/tests/action.c
+5
-3
automation.c
dlls/msi/tests/automation.c
+5
-3
install.c
dlls/msi/tests/install.c
+5
-3
msi.c
dlls/msi/tests/msi.c
+5
-3
package.c
dlls/msi/tests/package.c
+5
-3
No files found.
dlls/msi/tests/action.c
View file @
4c8edb1b
...
...
@@ -2255,20 +2255,22 @@ static void init_functionpointers(void)
static
BOOL
is_process_limited
(
void
)
{
SID_IDENTIFIER_AUTHORITY
NtAuthority
=
{
SECURITY_NT_AUTHORITY
};
PSID
Group
;
PSID
Group
=
NULL
;
BOOL
IsInGroup
;
HANDLE
token
;
if
(
!
pCheckTokenMembership
||
!
pOpenProcessToken
)
return
FALSE
;
if
(
!
AllocateAndInitializeSid
(
&
NtAuthority
,
2
,
SECURITY_BUILTIN_DOMAIN_RID
,
DOMAIN_ALIAS_RID_ADMINS
,
0
,
0
,
0
,
0
,
0
,
0
,
&
Group
)
||
DOMAIN_ALIAS_RID_ADMINS
,
0
,
0
,
0
,
0
,
0
,
0
,
&
Group
)
||
!
pCheckTokenMembership
(
NULL
,
Group
,
&
IsInGroup
))
{
trace
(
"Could not check if the current user is an administrator
\n
"
);
FreeSid
(
Group
);
return
FALSE
;
}
FreeSid
(
Group
);
if
(
!
IsInGroup
)
{
/* Only administrators have enough privileges for these tests */
...
...
dlls/msi/tests/automation.c
View file @
4c8edb1b
...
...
@@ -230,20 +230,22 @@ static void init_functionpointers(void)
static
BOOL
is_process_limited
(
void
)
{
SID_IDENTIFIER_AUTHORITY
NtAuthority
=
{
SECURITY_NT_AUTHORITY
};
PSID
Group
;
PSID
Group
=
NULL
;
BOOL
IsInGroup
;
HANDLE
token
;
if
(
!
pCheckTokenMembership
||
!
pOpenProcessToken
)
return
FALSE
;
if
(
!
AllocateAndInitializeSid
(
&
NtAuthority
,
2
,
SECURITY_BUILTIN_DOMAIN_RID
,
DOMAIN_ALIAS_RID_ADMINS
,
0
,
0
,
0
,
0
,
0
,
0
,
&
Group
)
||
DOMAIN_ALIAS_RID_ADMINS
,
0
,
0
,
0
,
0
,
0
,
0
,
&
Group
)
||
!
pCheckTokenMembership
(
NULL
,
Group
,
&
IsInGroup
))
{
trace
(
"Could not check if the current user is an administrator
\n
"
);
FreeSid
(
Group
);
return
FALSE
;
}
FreeSid
(
Group
);
if
(
!
IsInGroup
)
{
/* Only administrators have enough privileges for these tests */
...
...
dlls/msi/tests/install.c
View file @
4c8edb1b
...
...
@@ -2043,20 +2043,22 @@ static void init_functionpointers(void)
static
BOOL
is_process_limited
(
void
)
{
SID_IDENTIFIER_AUTHORITY
NtAuthority
=
{
SECURITY_NT_AUTHORITY
};
PSID
Group
;
PSID
Group
=
NULL
;
BOOL
IsInGroup
;
HANDLE
token
;
if
(
!
pCheckTokenMembership
||
!
pOpenProcessToken
)
return
FALSE
;
if
(
!
AllocateAndInitializeSid
(
&
NtAuthority
,
2
,
SECURITY_BUILTIN_DOMAIN_RID
,
DOMAIN_ALIAS_RID_ADMINS
,
0
,
0
,
0
,
0
,
0
,
0
,
&
Group
)
||
DOMAIN_ALIAS_RID_ADMINS
,
0
,
0
,
0
,
0
,
0
,
0
,
&
Group
)
||
!
pCheckTokenMembership
(
NULL
,
Group
,
&
IsInGroup
))
{
trace
(
"Could not check if the current user is an administrator
\n
"
);
FreeSid
(
Group
);
return
FALSE
;
}
FreeSid
(
Group
);
if
(
!
IsInGroup
)
{
/* Only administrators have enough privileges for these tests */
...
...
dlls/msi/tests/msi.c
View file @
4c8edb1b
...
...
@@ -175,20 +175,22 @@ static BOOL delete_pf(const char *rel_path, BOOL is_file)
static
BOOL
is_process_limited
(
void
)
{
SID_IDENTIFIER_AUTHORITY
NtAuthority
=
{
SECURITY_NT_AUTHORITY
};
PSID
Group
;
PSID
Group
=
NULL
;
BOOL
IsInGroup
;
HANDLE
token
;
if
(
!
pCheckTokenMembership
||
!
pOpenProcessToken
)
return
FALSE
;
if
(
!
AllocateAndInitializeSid
(
&
NtAuthority
,
2
,
SECURITY_BUILTIN_DOMAIN_RID
,
DOMAIN_ALIAS_RID_ADMINS
,
0
,
0
,
0
,
0
,
0
,
0
,
&
Group
)
||
DOMAIN_ALIAS_RID_ADMINS
,
0
,
0
,
0
,
0
,
0
,
0
,
&
Group
)
||
!
pCheckTokenMembership
(
NULL
,
Group
,
&
IsInGroup
))
{
trace
(
"Could not check if the current user is an administrator
\n
"
);
FreeSid
(
Group
);
return
FALSE
;
}
FreeSid
(
Group
);
if
(
!
IsInGroup
)
{
/* Only administrators have enough privileges for these tests */
...
...
dlls/msi/tests/package.c
View file @
4c8edb1b
...
...
@@ -88,20 +88,22 @@ static void init_functionpointers(void)
static
BOOL
is_process_limited
(
void
)
{
SID_IDENTIFIER_AUTHORITY
NtAuthority
=
{
SECURITY_NT_AUTHORITY
};
PSID
Group
;
PSID
Group
=
NULL
;
BOOL
IsInGroup
;
HANDLE
token
;
if
(
!
pCheckTokenMembership
||
!
pOpenProcessToken
)
return
FALSE
;
if
(
!
AllocateAndInitializeSid
(
&
NtAuthority
,
2
,
SECURITY_BUILTIN_DOMAIN_RID
,
DOMAIN_ALIAS_RID_ADMINS
,
0
,
0
,
0
,
0
,
0
,
0
,
&
Group
)
||
DOMAIN_ALIAS_RID_ADMINS
,
0
,
0
,
0
,
0
,
0
,
0
,
&
Group
)
||
!
pCheckTokenMembership
(
NULL
,
Group
,
&
IsInGroup
))
{
trace
(
"Could not check if the current user is an administrator
\n
"
);
FreeSid
(
Group
);
return
FALSE
;
}
FreeSid
(
Group
);
if
(
!
IsInGroup
)
{
if
(
!
AllocateAndInitializeSid
(
&
NtAuthority
,
2
,
...
...
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