From: Alexander Barton Date: Wed, 23 Feb 2011 21:55:45 +0000 (+0100) Subject: PAM-Auth child: log if result can't be reported X-Git-Tag: rel-18-rc1~46 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=94e4562c1c732f7bf67bed2f77cc7b3b0aeaeafe;p=ngircd 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 --- diff --git a/src/ngircd/irc-login.c b/src/ngircd/irc-login.c index 6a97074a..f76a6270 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); }