1
0
mirror of https://github.com/osmarks/ngircd.git synced 2024-10-28 04:46:17 +00:00

PAM-Auth child: log if result can't be reported

This fixes the followin GCC warning on modern Linux systems as well:

irc-login.c:     In function ‘Hello_User’:
irc-login.c:876: warning: ignoring return value of ‘write’,
                 declared with attribute warn_unused_result
This commit is contained in:
Alexander Barton 2011-02-23 22:55:45 +01:00
parent 6caa947f98
commit 94e4562c1c

View File

@ -873,7 +873,9 @@ Hello_User(CLIENT * Client)
/* Sub process */
Log_Init_Subprocess("Auth");
result = PAM_Authenticate(Client);
write(pipefd[1], &result, sizeof(result));
if (write(pipefd[1], &result, sizeof(result)) != sizeof(result))
Log_Subprocess(LOG_ERR,
"Failed to pipe result to parent!");
Log_Exit_Subprocess("Auth");
exit(0);
}