Browse code
work
Ed Langley authored on 31/10/2020 07:50:23
Showing 1 changed files
Showing 1 changed files
... | ... |
@@ -53,15 +53,8 @@ public: |
53 | 53 |
{ |
54 | 54 |
conversation_result result; |
55 | 55 |
|
56 |
- pam_conv_result token_result (conversation ("Dual control token: ", |
|
57 |
- PAM_PROMPT_ECHO_OFF, request)); |
|
58 |
- |
|
59 |
- if (token_result.get_conv_result != PAM_SUCCESS) { |
|
60 |
- return result; |
|
61 |
- } |
|
62 |
- |
|
63 | 56 |
pam_conv_result reason_result (conversation ("Reason: ", PAM_PROMPT_ECHO_ON, |
64 |
- request)); |
|
57 |
+ request)); |
|
65 | 58 |
|
66 | 59 |
if (reason_result.get_conv_result != PAM_SUCCESS) { |
67 | 60 |
return result; |
... | ... |
@@ -72,8 +65,15 @@ public: |
72 | 65 |
result.reason = reason; |
73 | 66 |
} |
74 | 67 |
|
75 |
- if (token_result.conv_result != PAM_SUCCESS) { |
|
76 |
- return result; |
|
68 |
+ pam_conv_result token_result (conversation ("Dual control token: ", |
|
69 |
+ PAM_PROMPT_ECHO_OFF, request)); |
|
70 |
+ |
|
71 |
+ if (token_result.get_conv_result != PAM_SUCCESS) { |
|
72 |
+ return result; |
|
73 |
+ } |
|
74 |
+ |
|
75 |
+ if (reason_result.conv_result != PAM_SUCCESS) { |
|
76 |
+ return result; |
|
77 | 77 |
} |
78 | 78 |
|
79 | 79 |
std::string token_answer (token_result.responses[0]->resp); |
... | ... |
@@ -95,4 +95,3 @@ conversation conversation::create (pam &pam) |
95 | 95 |
{ |
96 | 96 |
return conversation (std::shared_ptr<conversation_ifc> (new impl (pam))); |
97 | 97 |
} |
98 |
- |