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
7cea9434
Commit
7cea9434
authored
Apr 08, 2021
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
services: Propagate the WINEBOOTSTRAPMODE variable to spawned services.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
446f7e3a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
0 deletions
+10
-0
services.c
programs/services/services.c
+10
-0
No files found.
programs/services/services.c
View file @
7cea9434
...
@@ -25,6 +25,7 @@
...
@@ -25,6 +25,7 @@
#include <assert.h>
#include <assert.h>
#include <windows.h>
#include <windows.h>
#include <winsvc.h>
#include <winsvc.h>
#include <winternl.h>
#include <rpc.h>
#include <rpc.h>
#include <userenv.h>
#include <userenv.h>
#include <setupapi.h>
#include <setupapi.h>
...
@@ -1069,7 +1070,16 @@ found:
...
@@ -1069,7 +1070,16 @@ found:
if
(
!
environment
&&
OpenProcessToken
(
GetCurrentProcess
(),
TOKEN_QUERY
|
TOKEN_DUPLICATE
,
&
token
))
if
(
!
environment
&&
OpenProcessToken
(
GetCurrentProcess
(),
TOKEN_QUERY
|
TOKEN_DUPLICATE
,
&
token
))
{
{
WCHAR
val
[
16
];
CreateEnvironmentBlock
(
&
environment
,
token
,
FALSE
);
CreateEnvironmentBlock
(
&
environment
,
token
,
FALSE
);
if
(
GetEnvironmentVariableW
(
L"WINEBOOTSTRAPMODE"
,
val
,
ARRAY_SIZE
(
val
)
))
{
UNICODE_STRING
name
,
value
;
RtlInitUnicodeString
(
&
name
,
L"WINEBOOTSTRAPMODE"
);
RtlInitUnicodeString
(
&
value
,
val
);
RtlSetEnvironmentVariable
(
(
WCHAR
**
)
&
environment
,
&
name
,
&
value
);
}
CloseHandle
(
token
);
CloseHandle
(
token
);
}
}
...
...
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