netapi32: Fix tests on systems with reduced privilege.
This commit is contained in:
parent
33e3222920
commit
c233fd5796
|
@ -251,6 +251,11 @@ static void run_userhandling_tests(void)
|
||||||
ret = pNetUserDel(NULL, sTooLongName);
|
ret = pNetUserDel(NULL, sTooLongName);
|
||||||
ok(ret == NERR_Success, "Deleting the user failed : %d\n", ret);
|
ok(ret == NERR_Success, "Deleting the user failed : %d\n", ret);
|
||||||
}
|
}
|
||||||
|
else if (ret == ERROR_ACCESS_DENIED)
|
||||||
|
{
|
||||||
|
skip("not enough permissions to add a user\n");
|
||||||
|
return;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
ok(ret == NERR_BadUsername ||
|
ok(ret == NERR_BadUsername ||
|
||||||
broken(ret == NERR_PasswordTooShort), /* NT4 */
|
broken(ret == NERR_PasswordTooShort), /* NT4 */
|
||||||
|
@ -260,7 +265,8 @@ static void run_userhandling_tests(void)
|
||||||
usri.usri1_password = sTooLongPassword;
|
usri.usri1_password = sTooLongPassword;
|
||||||
|
|
||||||
ret = pNetUserAdd(NULL, 1, (LPBYTE)&usri, NULL);
|
ret = pNetUserAdd(NULL, 1, (LPBYTE)&usri, NULL);
|
||||||
ok(ret == NERR_PasswordTooShort, "Adding user with too long password returned 0x%08x\n", ret);
|
ok(ret == NERR_PasswordTooShort || ret == ERROR_ACCESS_DENIED /* Win2003 */,
|
||||||
|
"Adding user with too long password returned 0x%08x\n", ret);
|
||||||
|
|
||||||
usri.usri1_name = sTooLongName;
|
usri.usri1_name = sTooLongName;
|
||||||
usri.usri1_password = sTooLongPassword;
|
usri.usri1_password = sTooLongPassword;
|
||||||
|
|
Loading…
Reference in New Issue