Juan Lang : netapi32: Fix tests on systems with reduced privilege.
Alexandre Julliard
julliard at winehq.org
Fri Feb 13 08:58:36 CST 2009
Module: wine
Branch: master
Commit: c233fd579625578e2628c03d14f625cd40484efe
URL: http://source.winehq.org/git/wine.git/?a=commit;h=c233fd579625578e2628c03d14f625cd40484efe
Author: Juan Lang <juan.lang at gmail.com>
Date: Thu Feb 12 12:36:27 2009 -0800
netapi32: Fix tests on systems with reduced privilege.
---
dlls/netapi32/tests/access.c | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/dlls/netapi32/tests/access.c b/dlls/netapi32/tests/access.c
index dfa68ef..301cd19 100644
--- a/dlls/netapi32/tests/access.c
+++ b/dlls/netapi32/tests/access.c
@@ -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;
More information about the wine-cvs
mailing list