commit 94e4562c1c732f7bf67bed2f77cc7b3b0aeaeafe from: Alexander Barton date: Wed Feb 23 21:55:45 2011 UTC 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 commit - 6caa947f989b692cf8bf3568cffa03b5c21374e9 commit + 94e4562c1c732f7bf67bed2f77cc7b3b0aeaeafe blob - 6a97074aa94491b067ca2369845ec5f36fefdd9c blob + f76a62707ae8c22cc097385da60ecda80a16db74 --- src/ngircd/irc-login.c +++ 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); }