nsswitch: fix a segfault in the krb5 locator plugin
authorChristian Ambach <christian.ambach@de.ibm.com>
Thu, 10 Feb 2011 14:55:50 +0000 (15:55 +0100)
committerMichael Adam <obnox@samba.org>
Thu, 10 Feb 2011 16:01:18 +0000 (17:01 +0100)
after the number of retries was exceeded, the loop did not
    bail out correctly with an error and went on using a null pointer

nsswitch/winbind_krb5_locator.c

index db6e8d0d6cf0593302fe1023ce5976e8e89c9343..e921caea5939af95213435ddc780b0372b2f0fd6 100644 (file)
@@ -192,7 +192,7 @@ static krb5_error_code smb_krb5_locator_call_cbfunc(const char *name,
                        break;
                }
 
-               if (ret == EAI_AGAIN) {
+               if ((ret == EAI_AGAIN) && (count > 1)) {
                        count--;
                        continue;
                }