From 94e4562c1c732f7bf67bed2f77cc7b3b0aeaeafe Mon Sep 17 00:00:00 2001 From: Alexander Barton Date: Wed, 23 Feb 2011 22:55:45 +0100 Subject: [PATCH] PAM-Auth child: log if result can't be reported MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 file changed, 3 insertions(+), 1 deletion(-) 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); } -- 2.39.2