2021-06-02 Fred Gleason <fredg@paravelsystems.com>

* Cleaned up compile warnings in the 'test_pam' harness.

Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
Fred Gleason 2021-06-02 15:24:31 -04:00
parent 803c17ca36
commit 59281dba07
2 changed files with 5 additions and 1 deletions

View File

@ -21836,3 +21836,5 @@
* Cleaned up compile warnings in rdrepld(8).
2021-06-02 Fred Gleason <fredg@paravelsystems.com>
* Cleaned up compile warnings in ripcd(8).
2021-06-02 Fred Gleason <fredg@paravelsystems.com>
* Cleaned up compile warnings in the 'test_pam' harness.

View File

@ -51,7 +51,9 @@ int ConversationResponseCallback(int num_msg,const struct pam_message **msg,
case PAM_PROMPT_ECHO_ON:
printf("%s ",msg[i]->msg);
fflush(NULL);
fgets(resp[i]->resp,256,stdin);
if(fgets(resp[i]->resp,256,stdin)==NULL) {
fprintf(stderr,"failed to read prompt!\n");
}
resp[i]->resp[strlen(resp[i]->resp)-1]=0;
resp[i]->resp_retcode=0;
break;