]> granicus.if.org Git - linux-pam/commitdiff
Relevant BUGIDs: Debian bug #440019
authorSteve Langasek <vorlon@debian.org>
Wed, 29 Aug 2007 10:30:11 +0000 (10:30 +0000)
committerSteve Langasek <vorlon@debian.org>
Wed, 29 Aug 2007 10:30:11 +0000 (10:30 +0000)
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.

ChangeLog
modules/pam_rhosts/pam_rhosts_auth.c

index edf1c82753bf3f50b3886da899eb0703fc148869..b3a00aed70e974daac51bb3f474ef96db6c850ea 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+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.
+
 2007-08-28  Steve Langasek <vorlon@debian.org>
 
        * configure.in: call AC_CHECK_HEADERS instead of AC_CHECK_HEADER
index d50ed478965ee442d5bbb04516f598cd3b635cac..a798c1f07af27107c7f2b35d594e0b553bd2f54a 100644 (file)
@@ -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 */