summaryrefslogtreecommitdiff
path: root/modules/pam_rhosts
diff options
context:
space:
mode:
authorSteve Langasek <vorlon@debian.org>2007-08-29 10:30:11 +0000
committerSteve Langasek <vorlon@debian.org>2007-08-29 10:30:11 +0000
commitd4663ceaeb052c28354afc212da8f25dbc53e969 (patch)
tree21d2883e1f945ec5fb273e412d2c4c5a6cd9a10a /modules/pam_rhosts
parentc783f0606e223915b947b564a2f53d2d4ff78d6b (diff)
Relevant BUGIDs: Debian bug #440019
Purpose of commit: bugfix Commit summary: --------------- 2007-08-29 Steve Langasek <vorlon@debian.org> * 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 <springl-rhosts@bfw-online.de> for catching this.
Diffstat (limited to 'modules/pam_rhosts')
-rw-r--r--modules/pam_rhosts/pam_rhosts_auth.c2
1 files changed, 1 insertions, 1 deletions
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 */