Module: ngircd.git Branch: master Commit: 94e4562c1c732f7bf67bed2f77cc7b3b0aeaeafe URL: http://ngircd.barton.de/cgi-bin/gitweb.cgi?p=ngircd.git&a=commit;h=94e45...
Author: Alexander Barton alex@barton.de Date: Wed Feb 23 22:55:45 2011 +0100
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
---
src/ngircd/irc-login.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/src/ngircd/irc-login.c b/src/ngircd/irc-login.c index 6a97074..f76a627 100644 --- a/src/ngircd/irc-login.c +++ b/src/ngircd/irc-login.c @@ -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); }