Browse code
formatting
jbalcita authored on 12/05/2017 16:30:02
Showing 1 changed files
Showing 1 changed files
... | ... |
@@ -106,7 +106,7 @@ public: |
106 | 106 |
} |
107 | 107 |
|
108 | 108 |
pam_conv *conv_p; |
109 |
- count_ == 0 ? conv_p = &token_conv_ : conv_p = &reason_conv_; |
|
109 |
+ conv_p = count_ == 0 ? &token_conv_ : &reason_conv_; |
|
110 | 110 |
conv_p->appdata_ptr = (void *) (&conversations_[count_]); |
111 | 111 |
conv_p->conv = fake_conv; |
112 | 112 |
*out = conv_p; |
... | ... |
@@ -125,7 +125,8 @@ std::shared_ptr<T> share (T *t) |
125 | 125 |
std::vector<pam_message> create_messages (const std::string &prompt) |
126 | 126 |
{ |
127 | 127 |
pam_message message; |
128 |
- message.msg_style = prompt == token_prompt ? PAM_PROMPT_ECHO_OFF : PAM_PROMPT_ECHO_ON; |
|
128 |
+ message.msg_style = prompt == token_prompt ? PAM_PROMPT_ECHO_OFF : |
|
129 |
+ PAM_PROMPT_ECHO_ON; |
|
129 | 130 |
message.msg = const_cast<char *> (prompt.c_str()); |
130 | 131 |
|
131 | 132 |
std::vector<pam_message> messages; |
... | ... |
@@ -148,8 +149,8 @@ std::vector<pam_response> create_responses (const std::string &answer, |
148 | 149 |
} |
149 | 150 |
|
150 | 151 |
conversation successful_conversation (pam_handle *expected_handle, |
151 |
- const std::string &token_answer, |
|
152 |
- const std::string &reason_answer) |
|
152 |
+ const std::string &token_answer, |
|
153 |
+ const std::string &reason_answer) |
|
153 | 154 |
{ |
154 | 155 |
std::vector<pam_message> token_messages (create_messages ( |
155 | 156 |
token_prompt)); |
... | ... |
@@ -258,7 +259,7 @@ int returns_empty_user_and_token_when_token_answer_fails() |
258 | 259 |
//given |
259 | 260 |
const std::string user ("user"); |
260 | 261 |
const std::string token ("token"); |
261 |
- const std::string token_answer(user + ":" + token); |
|
262 |
+ const std::string token_answer (user + ":" + token); |
|
262 | 263 |
const std::string reason ("test reason"); |
263 | 264 |
int token_retcode = PAM_CONV_ERR; |
264 | 265 |
int reason_retcode = PAM_SUCCESS; |
... | ... |
@@ -304,7 +305,7 @@ int returns_empty_reason_when_reason_answer_fails() |
304 | 305 |
{ |
305 | 306 |
const std::string user ("user"); |
306 | 307 |
const std::string token ("token"); |
307 |
- const std::string token_answer(user + ":" + token); |
|
308 |
+ const std::string token_answer (user + ":" + token); |
|
308 | 309 |
const std::string reason ("test reason"); |
309 | 310 |
int token_retcode = PAM_SUCCESS; |
310 | 311 |
int reason_retcode = PAM_CONV_ERR; |