From d4663ceaeb052c28354afc212da8f25dbc53e969 Mon Sep 17 00:00:00 2001 From: Steve Langasek Date: Wed, 29 Aug 2007 10:30:11 +0000 Subject: Relevant BUGIDs: Debian bug #440019 Purpose of commit: bugfix Commit summary: --------------- 2007-08-29 Steve Langasek * modules/pam_rhosts/pam_rhosts_auth.c: getline returns -1 at EOF, not 0. Check accordingly to fix an infinite loop. Thanks to Stephan Springl for catching this. --- modules/pam_rhosts/pam_rhosts_auth.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules') diff --git a/modules/pam_rhosts/pam_rhosts_auth.c b/modules/pam_rhosts/pam_rhosts_auth.c index d50ed478..a798c1f0 100644 --- a/modules/pam_rhosts/pam_rhosts_auth.c +++ b/modules/pam_rhosts/pam_rhosts_auth.c @@ -352,7 +352,7 @@ __ivaliduser (pam_handle_t *pamh, struct _options *opts, char *buf=NULL; int buflen=0; - while (getline(&buf,&buflen,hostf)) { + while (getline(&buf,&buflen,hostf) > 0) { #else char buf[MAXHOSTNAMELEN + 128]; /* host + login */ -- cgit v1.2.3