Commit c233fd57 authored by Juan Lang's avatar Juan Lang Committed by Alexandre Julliard

netapi32: Fix tests on systems with reduced privilege.

parent 33e32229
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment