about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorAlexander Barton <alex@barton.de>2011-02-23 22:55:45 +0100
committerAlexander Barton <alex@barton.de>2011-02-23 22:55:45 +0100
commit94e4562c1c732f7bf67bed2f77cc7b3b0aeaeafe (patch)
treef300e9b715c6cd5d179a1babc00731f213f227a8 /src
parent6caa947f989b692cf8bf3568cffa03b5c21374e9 (diff)
downloadngircd-94e4562c1c732f7bf67bed2f77cc7b3b0aeaeafe.tar.gz
ngircd-94e4562c1c732f7bf67bed2f77cc7b3b0aeaeafe.zip
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
Diffstat (limited to 'src')
-rw-r--r--src/ngircd/irc-login.c4
1 files changed, 3 insertions, 1 deletions
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);
 	}