@@ -206,104 +206,17 @@ obtain_prompts(struct confdb_ctx *cdb, TALLOC_CTX *mem_ctx,
206206 char * passkey_init_prompt = NULL ;
207207 char * passkey_pin_prompt = NULL ;
208208 char * passkey_touch_prompt = NULL ;
209- const char * tmp = NULL ;
210- int prompt_type ;
211- size_t c ;
212209 errno_t ret ;
213210
214211 tmp_ctx = talloc_new (NULL );
215212 if (tmp_ctx == NULL ) {
216213 return ENOMEM ;
217214 }
218215
219- if (pc_list != NULL ) {
220- for (c = 0 ; pc_list [c ] != NULL ; c ++ ) {
221- prompt_type = pc_get_type (pc_list [c ]);
222- switch (prompt_type ) {
223- case PC_TYPE_PASSWORD :
224- tmp = pc_get_password_prompt (pc_list [c ]);
225- if (tmp == NULL ) {
226- ret = ENOENT ;
227- }
228- password_prompt = talloc_strdup (tmp_ctx , tmp );
229- if (password_prompt == NULL ) {
230- ret = ENOMEM ;
231- }
232- break ;
233- case PC_TYPE_EIDP :
234- tmp = pc_get_eidp_init_prompt (pc_list [c ]);
235- if (tmp == NULL ) {
236- ret = ENOENT ;
237- }
238- oauth2_init_prompt = talloc_strdup (tmp_ctx , tmp );
239- if (oauth2_init_prompt == NULL ) {
240- ret = ENOMEM ;
241- }
242- tmp = pc_get_eidp_link_prompt (pc_list [c ]);
243- if (tmp == NULL ) {
244- ret = ENOENT ;
245- }
246- oauth2_link_prompt = talloc_strdup (tmp_ctx , tmp );
247- if (oauth2_link_prompt == NULL ) {
248- ret = ENOMEM ;
249- }
250- break ;
251- case PC_TYPE_SMARTCARD :
252- tmp = pc_get_smartcard_init_prompt (pc_list [c ]);
253- if (tmp == NULL ) {
254- ret = ENOENT ;
255- }
256- sc_init_prompt = talloc_strdup (tmp_ctx , tmp );
257- if (sc_init_prompt == NULL ) {
258- ret = ENOMEM ;
259- }
260- tmp = pc_get_smartcard_pin_prompt (pc_list [c ]);
261- if (tmp == NULL ) {
262- ret = ENOENT ;
263- }
264- sc_pin_prompt = talloc_strdup (tmp_ctx , tmp );
265- if (sc_pin_prompt == NULL ) {
266- ret = ENOMEM ;
267- }
268- break ;
269- case PC_TYPE_PASSKEY :
270- tmp = pc_get_passkey_inter_prompt (pc_list [c ]);
271- if (tmp == NULL ) {
272- ret = ENOENT ;
273- }
274- passkey_init_prompt = talloc_strdup (tmp_ctx , tmp );
275- if (passkey_init_prompt == NULL ) {
276- ret = ENOMEM ;
277- }
278- tmp = pc_get_passkey_pin_prompt (pc_list [c ]);
279- if (tmp == NULL ) {
280- ret = ENOENT ;
281- }
282- passkey_pin_prompt = talloc_strdup (tmp_ctx , tmp );
283- if (passkey_pin_prompt == NULL ) {
284- ret = ENOMEM ;
285- }
286- tmp = pc_get_passkey_touch_prompt (pc_list [c ]);
287- if (tmp == NULL ) {
288- ret = ENOENT ;
289- }
290- passkey_touch_prompt = talloc_strdup (tmp_ctx , tmp );
291- if (passkey_touch_prompt == NULL ) {
292- ret = ENOMEM ;
293- }
294- break ;
295- default :
296- ret = EPERM ;
297- goto done ;
298- }
299- }
300- }
301-
302216 if (password_prompt == NULL ) {
303- ret = confdb_get_string (cdb , tmp_ctx , CONFDB_PC_CONF_ENTRY ,
304- CONFDB_PC_PASSWORD_PROMPT , "" ,
305- & password_prompt );
306- if (ret != EOK ) {
217+ password_prompt = talloc_strdup (tmp_ctx , "Password" );
218+ if (password_prompt == NULL ) {
219+ ret = ENOMEM ;
307220 goto done ;
308221 }
309222 }
@@ -334,7 +247,7 @@ obtain_prompts(struct confdb_ctx *cdb, TALLOC_CTX *mem_ctx,
334247 }
335248
336249 if (sc_pin_prompt == NULL ) {
337- sc_pin_prompt = talloc_strdup (tmp_ctx , "PIN" );
250+ sc_pin_prompt = talloc_strdup (tmp_ctx , "Smartcard PIN" );
338251 if (sc_pin_prompt == NULL ) {
339252 ret = ENOMEM ;
340253 goto done ;
0 commit comments