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
ce81d843
Commit
ce81d843
authored
Jun 27, 2008
by
Kai Blin
Committed by
Alexandre Julliard
Jun 27, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
netapi32: Don't test NetUserChangePassword for now.
parent
ac7511b9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
37 deletions
+3
-37
access.c
dlls/netapi32/tests/access.c
+3
-37
No files found.
dlls/netapi32/tests/access.c
View file @
ce81d843
...
...
@@ -51,8 +51,6 @@ static WCHAR sTooLongPassword[] = {'a','b','c','d','e','f','g','h','a','b','c','
static
WCHAR
sTestUserName
[]
=
{
't'
,
'e'
,
's'
,
't'
,
'u'
,
's'
,
'e'
,
'r'
,
0
};
static
WCHAR
sTestUserOldPass
[]
=
{
'O'
,
'l'
,
'd'
,
'P'
,
'a'
,
's'
,
's'
,
'W'
,
'0'
,
'r'
,
'd'
,
'S'
,
'e'
,
't'
,
'!'
,
'~'
,
0
};
static
WCHAR
sTestUserNewPass
[]
=
{
'N'
,
'e'
,
'w'
,
'P'
,
'a'
,
's'
,
's'
,
'W'
,
'0'
,
'r'
,
'd'
,
'S'
,
'e'
,
't'
,
'!'
,
'~'
,
0
};
static
const
WCHAR
sLoopbackPath
[]
=
{
'\\'
,
'\\'
,
'1'
,
'2'
,
'7'
,
'.'
,
'0'
,
'.'
,
'0'
,
'.'
,
'1'
,
0
};
static
const
WCHAR
sBadNetPath
[]
=
{
'\\'
,
'\\'
,
'B'
,
'a'
,
' '
,
' '
,
'p'
,
'a'
,
't'
,
'h'
,
0
};
static
const
WCHAR
sInvalidName
[]
=
{
'\\'
,
0
};
static
const
WCHAR
sInvalidName2
[]
=
{
'\\'
,
'\\'
,
0
};
...
...
@@ -64,7 +62,6 @@ static NET_API_STATUS (WINAPI *pNetQueryDisplayInformation)(LPWSTR,DWORD,DWORD,D
static
NET_API_STATUS
(
WINAPI
*
pNetUserGetInfo
)(
LPCWSTR
,
LPCWSTR
,
DWORD
,
LPBYTE
*
)
=
NULL
;
static
NET_API_STATUS
(
WINAPI
*
pNetUserModalsGet
)(
LPCWSTR
,
DWORD
,
LPBYTE
*
)
=
NULL
;
static
NET_API_STATUS
(
WINAPI
*
pNetUserAdd
)(
LPCWSTR
,
DWORD
,
LPBYTE
,
LPDWORD
)
=
NULL
;
static
NET_API_STATUS
(
WINAPI
*
pNetUserChangePassword
)(
LPCWSTR
,
LPCWSTR
,
LPCWSTR
,
LPCWSTR
)
=
NULL
;
static
NET_API_STATUS
(
WINAPI
*
pNetUserDel
)(
LPCWSTR
,
LPCWSTR
)
=
NULL
;
static
int
init_access_tests
(
void
)
...
...
@@ -298,41 +295,11 @@ static void run_userhandling_tests(void)
/* On Windows XP (and newer), calling NetUserChangePassword with a NULL
* domainname parameter creates a user home directory, iff the machine is
* not member of a domain.
*
As we don't want to clutter up the folder containing the home
*
directories, specify \\127.0.0.1 as domainname to access the local samdb
.
*
Note that \\localhost does not work
.
*
Using \\127.0.0.1 as domain name does not work on standalone machines
*
either, unless the ForceGuest option in the registry is turned off
.
*
So let's not test NetUserChangePassword for now
.
*/
ret
=
pNetUserChangePassword
(
sLoopbackPath
,
sNonexistentUser
,
sTestUserOldPass
,
sTestUserNewPass
);
ok
(
ret
==
NERR_UserNotFound
||
ret
==
ERROR_INVALID_PASSWORD
||
ret
==
ERROR_CANT_ACCESS_DOMAIN_INFO
,
"Changing password for nonexistent user returned 0x%08x.
\n
"
,
ret
);
ret
=
pNetUserChangePassword
(
sLoopbackPath
,
sTestUserName
,
sTestUserOldPass
,
sTestUserOldPass
);
/* Apparently NERR_PasswordTooShort can be returned on windows xp if a
* strict password policy is enforced
*/
ok
(
ret
==
NERR_Success
||
ret
==
NERR_PasswordTooShort
||
ret
==
ERROR_CANT_ACCESS_DOMAIN_INFO
||
ret
==
ERROR_INVALID_PASSWORD
,
"Changing old password to old password returned 0x%08x.
\n
"
,
ret
);
ret
=
pNetUserChangePassword
(
sLoopbackPath
,
sTestUserName
,
sTestUserNewPass
,
sTestUserOldPass
);
ok
(
ret
==
ERROR_INVALID_PASSWORD
||
ret
==
ERROR_CANT_ACCESS_DOMAIN_INFO
,
"Trying to change password giving an invalid password returned 0x%08x.
\n
"
,
ret
);
ret
=
pNetUserChangePassword
(
NULL
,
sTestUserName
,
sTestUserOldPass
,
sTooLongPassword
);
ok
(
ret
==
ERROR_PASSWORD_RESTRICTION
,
"Changing to a password that's too long returned 0x%08x.
\n
"
,
ret
);
ret
=
pNetUserChangePassword
(
sLoopbackPath
,
sTestUserName
,
sTestUserOldPass
,
sTestUserNewPass
);
ok
(
ret
==
NERR_Success
||
ret
==
ERROR_CANT_ACCESS_DOMAIN_INFO
||
ret
==
ERROR_INVALID_PASSWORD
,
"Changing the password correctly returned 0x%08x.
\n
"
,
ret
);
ret
=
pNetUserDel
(
NULL
,
sTestUserName
);
ok
(
ret
==
NERR_Success
,
"Deleting the user failed.
\n
"
);
...
...
@@ -350,7 +317,6 @@ START_TEST(access)
pNetUserGetInfo
=
(
void
*
)
GetProcAddress
(
hnetapi32
,
"NetUserGetInfo"
);
pNetUserModalsGet
=
(
void
*
)
GetProcAddress
(
hnetapi32
,
"NetUserModalsGet"
);
pNetUserAdd
=
(
void
*
)
GetProcAddress
(
hnetapi32
,
"NetUserAdd"
);
pNetUserChangePassword
=
(
void
*
)
GetProcAddress
(
hnetapi32
,
"NetUserChangePassword"
);
pNetUserDel
=
(
void
*
)
GetProcAddress
(
hnetapi32
,
"NetUserDel"
);
/* These functions were introduced with NT. It's safe to assume that
...
...
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