summaryrefslogtreecommitdiff
path: root/nsswitch
diff options
context:
space:
mode:
Diffstat (limited to 'nsswitch')
-rw-r--r--nsswitch/libwbclient/tests/wbclient.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/nsswitch/libwbclient/tests/wbclient.c b/nsswitch/libwbclient/tests/wbclient.c
index 7047e09055..09f8fdbae7 100644
--- a/nsswitch/libwbclient/tests/wbclient.c
+++ b/nsswitch/libwbclient/tests/wbclient.c
@@ -529,21 +529,22 @@ static bool test_wbc_get_sidaliases(struct torture_context *tctx)
return true;
}
-static bool test_wbc_authenticate_user(struct torture_context *tctx)
+static bool test_wbc_authenticate_user_int(struct torture_context *tctx,
+ const char *correct_password)
{
struct wbcAuthUserParams params;
struct wbcAuthUserInfo *info = NULL;
struct wbcAuthErrorInfo *error = NULL;
wbcErr ret;
- ret = wbcAuthenticateUser(getenv("USERNAME"), getenv("PASSWORD"));
+ ret = wbcAuthenticateUser(getenv("USERNAME"), correct_password);
torture_assert_wbc_equal(tctx, ret, WBC_ERR_SUCCESS,
"wbcAuthenticateUser failed");
ZERO_STRUCT(params);
params.account_name = getenv("USERNAME");
params.level = WBC_AUTH_USER_LEVEL_PLAIN;
- params.password.plaintext = getenv("PASSWORD");
+ params.password.plaintext = correct_password;
ret = wbcAuthenticateUserEx(&params, &info, &error);
torture_assert_wbc_equal(tctx, ret, WBC_ERR_SUCCESS,
@@ -568,6 +569,11 @@ static bool test_wbc_authenticate_user(struct torture_context *tctx)
return true;
}
+static bool test_wbc_authenticate_user(struct torture_context *tctx)
+{
+ return test_wbc_authenticate_user_int(tctx, getenv("PASSWORD"));
+}
+
static bool test_wbc_logon_user(struct torture_context *tctx)
{
struct wbcLogonUserParams params;