git.fiddlerwoaroof.com
Browse code

ask for token gets handle

Greg Wiley authored on 06/04/2017 17:38:16
Showing 1 changed files
... ...
@@ -48,12 +48,14 @@ int pam_sm_setcred_returns_success() {
48 48
 int pam_sm_authenticate_validates_with_received_token() {
49 49
     // given
50 50
     token_to_return = "mytoken";
51
+    pam_handle_t *handle = (pam_handle_t*)"";
51 52
 
52 53
     // when
53
-    pam_sm_authenticate(NULL, 0, 0, NULL);
54
+    pam_sm_authenticate(handle, 0, 0, NULL);
54 55
 
55 56
     // then
56 57
     checkstr("mytoken",validated_token, "validated token");
58
+    check(passed_pam_handle == handle, "incorrect handle");
57 59
     succeed();
58 60
 }
59 61