netapi32: Fix tests on systems with reduced privilege.

This commit is contained in:
Juan Lang 2009-02-12 12:36:27 -08:00 committed by Alexandre Julliard
parent 33e3222920
commit c233fd5796
1 changed files with 7 additions and 1 deletions

View File

@ -251,6 +251,11 @@ static void run_userhandling_tests(void)
ret = pNetUserDel(NULL, sTooLongName);
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
ok(ret == NERR_BadUsername ||
broken(ret == NERR_PasswordTooShort), /* NT4 */
@ -260,7 +265,8 @@ static void run_userhandling_tests(void)
usri.usri1_password = sTooLongPassword;
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_password = sTooLongPassword;