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
52bf0fbd
Commit
52bf0fbd
authored
Apr 16, 2020
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Export Unix user name in WINEUSERNAME variable.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
081c8e1c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
4 deletions
+13
-4
env.c
dlls/ntdll/env.c
+13
-4
No files found.
dlls/ntdll/env.c
View file @
52bf0fbd
...
...
@@ -377,15 +377,16 @@ static void set_wow64_environment( WCHAR **env )
static
const
WCHAR
winehomedirW
[]
=
{
'W'
,
'I'
,
'N'
,
'E'
,
'H'
,
'O'
,
'M'
,
'E'
,
'D'
,
'I'
,
'R'
,
0
};
static
const
WCHAR
winedatadirW
[]
=
{
'W'
,
'I'
,
'N'
,
'E'
,
'D'
,
'A'
,
'T'
,
'A'
,
'D'
,
'I'
,
'R'
,
0
};
static
const
WCHAR
winebuilddirW
[]
=
{
'W'
,
'I'
,
'N'
,
'E'
,
'B'
,
'U'
,
'I'
,
'L'
,
'D'
,
'D'
,
'I'
,
'R'
,
0
};
static
const
WCHAR
wineusernameW
[]
=
{
'W'
,
'I'
,
'N'
,
'E'
,
'U'
,
'S'
,
'E'
,
'R'
,
'N'
,
'A'
,
'M'
,
'E'
,
0
};
static
const
WCHAR
wineconfigdirW
[]
=
{
'W'
,
'I'
,
'N'
,
'E'
,
'C'
,
'O'
,
'N'
,
'F'
,
'I'
,
'G'
,
'D'
,
'I'
,
'R'
,
0
};
WCHAR
buf
[
64
];
WCHAR
buf
[
256
];
UNICODE_STRING
arch_strW
=
{
sizeof
(
archW
)
-
sizeof
(
WCHAR
),
sizeof
(
archW
),
archW
};
UNICODE_STRING
arch6432_strW
=
{
sizeof
(
arch6432W
)
-
sizeof
(
WCHAR
),
sizeof
(
arch6432W
),
arch6432W
};
UNICODE_STRING
valW
=
{
0
,
sizeof
(
buf
),
buf
};
OBJECT_ATTRIBUTES
attr
;
UNICODE_STRING
nameW
;
const
char
*
p
ath
;
const
char
*
p
,
*
name
;
WCHAR
*
val
;
HANDLE
hkey
;
DWORD
i
;
...
...
@@ -396,14 +397,22 @@ static void set_wow64_environment( WCHAR **env )
set_wine_path_variable
(
env
,
winehomedirW
,
getenv
(
"HOME"
)
);
set_wine_path_variable
(
env
,
winebuilddirW
,
wine_get_build_dir
()
);
set_wine_path_variable
(
env
,
wineconfigdirW
,
wine_get_config_dir
()
);
for
(
i
=
0
;
(
p
ath
=
wine_dll_enum_load_path
(
i
));
i
++
)
for
(
i
=
0
;
(
p
=
wine_dll_enum_load_path
(
i
));
i
++
)
{
NTDLL_swprintf
(
buf
,
winedlldirW
,
i
);
set_wine_path_variable
(
env
,
buf
,
p
ath
);
set_wine_path_variable
(
env
,
buf
,
p
);
}
NTDLL_swprintf
(
buf
,
winedlldirW
,
i
);
set_wine_path_variable
(
env
,
buf
,
NULL
);
/* set user name */
name
=
wine_get_user_name
();
if
((
p
=
strrchr
(
name
,
'/'
)))
name
=
p
+
1
;
if
((
p
=
strrchr
(
name
,
'\\'
)))
name
=
p
+
1
;
ntdll_umbstowcs
(
name
,
strlen
(
name
)
+
1
,
buf
,
ARRAY_SIZE
(
buf
)
);
set_env_var
(
env
,
wineusernameW
,
buf
);
/* set the PROCESSOR_ARCHITECTURE variable */
if
(
!
RtlQueryEnvironmentVariable_U
(
*
env
,
&
arch6432_strW
,
&
valW
))
...
...
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