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
bf25cefe
Commit
bf25cefe
authored
Dec 17, 2002
by
Uwe Bonnes
Committed by
Alexandre Julliard
Dec 17, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
NetUserGetInfo: implemented Level 1.
parent
56710d9c
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
45 additions
and
0 deletions
+45
-0
access.c
dlls/netapi32/access.c
+45
-0
No files found.
dlls/netapi32/access.c
View file @
bf25cefe
...
...
@@ -171,6 +171,51 @@ NetUserGetInfo(LPCWSTR servername, LPCWSTR username, DWORD level,
}
case
1
:
{
static
const
WCHAR
homedirW
[]
=
{
'H'
,
'O'
,
'M'
,
'E'
,
0
};
PUSER_INFO_1
ui
;
PUSER_INFO_0
ui0
;
NET_API_STATUS
status
;
/* sizes of the field buffers in WCHARS */
int
name_sz
,
password_sz
,
home_dir_sz
,
comment_sz
,
script_path_sz
;
password_sz
=
1
;
/* not filled out for security reasons for NetUserGetInfo*/
comment_sz
=
1
;
script_path_sz
=
1
;
/* get data */
status
=
NetUserGetInfo
(
servername
,
username
,
0
,
(
LPBYTE
*
)
&
ui0
);
if
(
status
!=
NERR_Success
)
{
NetApiBufferFree
(
ui0
);
return
status
;
}
name_sz
=
lstrlenW
(
ui0
->
usri0_name
)
+
1
;
home_dir_sz
=
GetEnvironmentVariableW
(
homedirW
,
NULL
,
0
);
/* set up buffer */
NetApiBufferAllocate
(
sizeof
(
USER_INFO_1
)
+
(
name_sz
+
password_sz
+
home_dir_sz
+
comment_sz
+
script_path_sz
)
*
sizeof
(
WCHAR
),
(
LPVOID
*
)
bufptr
);
ui
=
(
PUSER_INFO_1
)
*
bufptr
;
ui
->
usri1_name
=
(
LPWSTR
)
(
ui
+
1
);
ui
->
usri1_password
=
ui
->
usri1_name
+
name_sz
;
ui
->
usri1_home_dir
=
ui
->
usri1_password
+
password_sz
;
ui
->
usri1_comment
=
ui
->
usri1_home_dir
+
home_dir_sz
;
ui
->
usri1_script_path
=
ui
->
usri1_comment
+
comment_sz
;
/* set data */
lstrcpyW
(
ui
->
usri1_name
,
ui0
->
usri0_name
);
NetApiBufferFree
(
ui0
);
ui
->
usri1_password
[
0
]
=
0
;
ui
->
usri1_password_age
=
0
;
ui
->
usri1_priv
=
0
;
GetEnvironmentVariableW
(
homedirW
,
ui
->
usri1_home_dir
,
home_dir_sz
);
ui
->
usri1_comment
[
0
]
=
0
;
ui
->
usri1_flags
=
0
;
ui
->
usri1_script_path
[
0
]
=
0
;
break
;
}
case
2
:
case
3
:
case
4
:
...
...
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