@@ -420,45 +420,45 @@ nc_pam_auth(struct nc_session *session, struct nc_auth_client *client, uint16_t
420420 /* initialize PAM and see if the given configuration file exists */
421421 ret = pam_start (server_opts .pam_config_name , client -> username , & conv , & pam_h );
422422 if (ret != PAM_SUCCESS ) {
423- ERR (NULL , "PAM error occurred (%s).\n " , pam_strerror (pam_h , ret ));
423+ ERR (NULL , "PAM error occurred (%s)." , pam_strerror (pam_h , ret ));
424424 goto cleanup ;
425425 }
426426
427427 /* authentication based on the modules listed in the configuration file */
428428 ret = pam_authenticate (pam_h , 0 );
429429 if (ret != PAM_SUCCESS ) {
430430 if (ret == PAM_ABORT ) {
431- ERR (NULL , "PAM error occurred (%s).\n " , pam_strerror (pam_h , ret ));
431+ ERR (NULL , "PAM error occurred (%s)." , pam_strerror (pam_h , ret ));
432432 goto cleanup ;
433433 } else {
434- VRB (NULL , "PAM error occurred (%s).\n " , pam_strerror (pam_h , ret ));
434+ VRB (NULL , "PAM error occurred (%s)." , pam_strerror (pam_h , ret ));
435435 goto cleanup ;
436436 }
437437 }
438438
439439 /* correct token entered, check other requirements(the time of the day, expired token, ...) */
440440 ret = pam_acct_mgmt (pam_h , 0 );
441441 if ((ret != PAM_SUCCESS ) && (ret != PAM_NEW_AUTHTOK_REQD )) {
442- VRB (NULL , "PAM error occurred (%s).\n " , pam_strerror (pam_h , ret ));
442+ VRB (NULL , "PAM error occurred (%s)." , pam_strerror (pam_h , ret ));
443443 goto cleanup ;
444444 }
445445
446446 /* if a token has expired a new one will be generated */
447447 if (ret == PAM_NEW_AUTHTOK_REQD ) {
448- VRB (NULL , "PAM warning occurred (%s).\n " , pam_strerror (pam_h , ret ));
448+ VRB (NULL , "PAM warning occurred (%s)." , pam_strerror (pam_h , ret ));
449449 ret = pam_chauthtok (pam_h , PAM_CHANGE_EXPIRED_AUTHTOK );
450450 if (ret == PAM_SUCCESS ) {
451451 VRB (NULL , "The authentication token of user \"%s\" updated successfully." , client -> username );
452452 } else {
453- ERR (NULL , "PAM error occurred (%s).\n " , pam_strerror (pam_h , ret ));
453+ ERR (NULL , "PAM error occurred (%s)." , pam_strerror (pam_h , ret ));
454454 goto cleanup ;
455455 }
456456 }
457457
458458cleanup :
459459 /* destroy the PAM context */
460460 if (pam_h && (pam_end (pam_h , ret ) != PAM_SUCCESS )) {
461- ERR (NULL , "PAM error occurred (%s).\n " , pam_strerror (pam_h , ret ));
461+ ERR (NULL , "PAM error occurred (%s)." , pam_strerror (pam_h , ret ));
462462 }
463463 return ret ;
464464}
0 commit comments