Skip to content
Snippets Groups Projects
Commit 39c00746 authored by ale's avatar ale
Browse files

Fix pam_sso tests

parent 48e092ec
No related branches found
No related tags found
1 merge request!5Refactor ticket deserialization code
......@@ -106,7 +106,7 @@ protected:
};
TEST_F(PAMTest, AuthOk) {
char *tkt_str = sign_ticket(sso_ticket_new("user", "service/", "domain", NULL, NULL, 7200));
char *tkt_str = sign_ticket(sso_ticket_new("user", "service/", "domain", NULL, NULL, NULL, 7200));
test_pam_handle_t pamh = {"user", tkt_str};
string key_arg(string("key=") + public_key_file);
const char *pam_argv[] = {"service=service/", "domain=domain", "use_first_pass", key_arg.c_str(), NULL};
......@@ -116,7 +116,7 @@ TEST_F(PAMTest, AuthOk) {
}
TEST_F(PAMTest, AuthFailIfNoKey) {
char *tkt_str = sign_ticket(sso_ticket_new("user", "service/", "domain", NULL, NULL, 7200));
char *tkt_str = sign_ticket(sso_ticket_new("user", "service/", "domain", NULL, NULL, NULL, 7200));
test_pam_handle_t pamh = {"user", tkt_str};
const char *pam_argv[] = {"service=another-service/", "domain=domain", "use_first_pass", NULL};
......@@ -125,7 +125,7 @@ TEST_F(PAMTest, AuthFailIfNoKey) {
}
TEST_F(PAMTest, AuthFailOnBadService) {
char *tkt_str = sign_ticket(sso_ticket_new("user", "service/", "domain", NULL, NULL, 7200));
char *tkt_str = sign_ticket(sso_ticket_new("user", "service/", "domain", NULL, NULL, NULL, 7200));
test_pam_handle_t pamh = {"user", tkt_str};
string key_arg(string("key=") + public_key_file);
const char *pam_argv[] = {"service=another-service/", "domain=domain", "use_first_pass", key_arg.c_str(), NULL};
......@@ -135,7 +135,7 @@ TEST_F(PAMTest, AuthFailOnBadService) {
}
TEST_F(PAMTest, AuthFailIfDifferentUser) {
char *tkt_str = sign_ticket(sso_ticket_new("user", "service/", "domain", NULL, NULL, 7200));
char *tkt_str = sign_ticket(sso_ticket_new("user", "service/", "domain", NULL, NULL, NULL, 7200));
test_pam_handle_t pamh = {"another_user", tkt_str};
string key_arg(string("key=") + public_key_file);
const char *pam_argv[] = {"service=service/", "domain=domain", "use_first_pass", key_arg.c_str(), NULL};
......
  • ale @ale

    mentioned in commit 7a84e90d

    ·

    mentioned in commit 7a84e90d

    Toggle commit list
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment